Skip to content

Commit 9e26fea

Browse files
committed
refactor: change TestCaseType from Execution to Run in documentation and code
1 parent 2772b1a commit 9e26fea

File tree

11 files changed

+51
-40
lines changed

11 files changed

+51
-40
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ A cli tool to manage executable test cases.
1414
The vision of this tool is to have a tool agnostic file based approach to maintain test cases. A common workflow looks like the following:
1515

1616
1. Team creates Use-Cases
17-
2. out of the Use-Cases Test-Cases will be defined (Test-Case type: Definition) - see [TC-Login-001 Definition sample](samples/Definitions/localhost/TC-Login-001.md)
17+
2. out of the Use-Cases, Test-Cases will be defined (Test-Case type: Definition) - see [TC-Login-001 Definition sample](samples/Definitions/localhost/TC-Login-001.md)
1818
3. once a feature has been implemented the appropriate Test-Cases can be executed against an environment in an E2E automated manner
1919
![Sample Run](TC-001-Login-Run.gif)
20-
4. each run will be historied with Test-Cases known as Runs (Test-Case type: Execution) - see [TC-Login-001 Run sample](samples/Runs/localhost/TC-Login-001.md)
20+
4. each run will be historied with Test-Cases known as Runs (Test-Case type: Run) - see [TC-Login-001 Run sample](samples/Runs/localhost/TC-Login-001.md)
2121

2222
> Note: In case of escaping strings please use a backslash `\` followed by a double quote `"` (e.g. Locator=GetByText Text=\\"Invalid login attempt for user 'Albert'\\" Action=IsVisible)
2323
@@ -98,4 +98,4 @@ Options:
9898
9999
## License
100100
101-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
101+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Id": "896b0660-443d-4e7b-aac9-588afee33a08",
3+
"IssueId": "",
4+
"Prefix": "Changed",
5+
"Tag": "",
6+
"Message": "Changed TestCaseType Execution to Run.",
7+
"CreatedAt": "2025-03-22T11:24:45.376897+01:00",
8+
"CreatedBy": "thomasduft"
9+
}

samples/Runs/commitquality/TC-Documents-001.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# TC-Documents-001: Upload File
22

3-
- **Date**: 2025-01-23
3+
- **Date**: 2025-03-22
44
- **Author**: Thomas Duft
55
- **Test Priority**: High
66
- **Module Name**: Documents
7-
- **Type**: Execution
7+
- **Type**: Run
88
- **Status**: Passed
99
- **Domain**: https://commitquality.com/
1010
- **Route**: practice-file-upload

samples/Runs/localhost/Dashboard/TC-Dashboard-100.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# TC-Dashboard-100: Dashboard as administrator
22

3-
- **Date**: 2025-02-05
3+
- **Date**: 2025-03-22
44
- **Test Priority**: High
55
- **Module Name**: Dashboard
6-
- **Type**: Execution
6+
- **Type**: Run
77
- **Status**: Passed
88
- **Domain**: https://localhost:5001
99
- **Route**: home

samples/Runs/localhost/TC-Login-001.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# TC-Login-001: Login
22

3-
- **Date**: 2025-02-05
3+
- **Date**: 2025-03-22
44
- **Test Priority**: High
55
- **Module Name**: Identity
6-
- **Type**: Execution
6+
- **Type**: Run
77
- **Status**: Passed
88
- **Domain**: https://localhost:5001
99
- **Route**: Login

samples/Runs/localhost/TC-Login-002.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# TC-Login-002: Login with wrong or not existing Username
22

3-
- **Date**: 2025-02-05
3+
- **Date**: 2025-03-22
44
- **Test Priority**: High
55
- **Module Name**: Identity
6-
- **Type**: Execution
6+
- **Type**: Run
77
- **Status**: Passed
88
- **Domain**: https://localhost:5001
99
- **Route**: Login

samples/Runs/localhost/TC-Login-003.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# TC-Login-003: Login with wrong Password
22

3-
- **Date**: 2025-02-05
3+
- **Date**: 2025-03-22
44
- **Test Priority**: High
55
- **Module Name**: Identity
6-
- **Type**: Execution
6+
- **Type**: Run
77
- **Status**: Passed
88
- **Domain**: https://localhost:5001
99
- **Route**: Login

src/testr.Cli/Domain/Constants.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
namespace tomware.TestR;
2-
3-
internal static class Constants
4-
{
5-
internal static class TestCaseType
6-
{
7-
public const string Definition = "Definition";
8-
public const string Execution = "Execution";
9-
}
10-
11-
internal static class TestCaseStatus
12-
{
13-
public const string Passed = "Passed";
14-
public const string Failed = "Failed";
15-
public const string Unknown = "Unknown";
16-
}
17-
}
1+
namespace tomware.TestR;
2+
3+
internal static class Constants
4+
{
5+
internal static class TestCaseType
6+
{
7+
public const string Definition = "Definition";
8+
public const string Run = "Run";
9+
}
10+
11+
internal static class TestCaseStatus
12+
{
13+
public const string Passed = "Passed";
14+
public const string Failed = "Failed";
15+
public const string Unknown = "Unknown";
16+
}
17+
}

src/testr.Cli/Domain/TestCaseRun.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ await File.WriteAllLinesAsync(
4444
private void SetProperties(string[] lines, bool result)
4545
{
4646
ReplacePropertyValue(lines, "Date", DateStringProvider.GetDateString());
47-
ReplacePropertyValue(lines, "Type", "Execution");
48-
ReplacePropertyValue(lines, "Status", result ? "Passed" : "Failed");
47+
ReplacePropertyValue(lines, "Type", Constants.TestCaseType.Run);
48+
ReplacePropertyValue(lines, "Status", result
49+
? Constants.TestCaseStatus.Passed
50+
: Constants.TestCaseStatus.Failed);
4951
}
5052

5153
private void ReplacePropertyValue(string[] lines, string property, string value)
@@ -99,4 +101,4 @@ private void UpdateTestSteps(string[] lines, IEnumerable<TestStepResult> testRes
99101
lines[i] = string.Join('|', splittedItems);
100102
}
101103
}
102-
}
104+
}

src/testr.Cli/Domain/TestCaseValidator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public TestCaseValidationResult Validate()
1919
// check property Type - can be Definition or Execution
2020
var allowedTypes = new[] {
2121
Constants.TestCaseType.Definition,
22-
Constants.TestCaseType.Execution
22+
Constants.TestCaseType.Run
2323
};
2424
if (!allowedTypes.Contains(_testCase.Type))
2525
{
@@ -61,4 +61,4 @@ public TestCaseValidationResult Validate()
6161

6262
return result;
6363
}
64-
}
64+
}

0 commit comments

Comments
 (0)