-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGES: Add scenario info collector
- Loading branch information
1 parent
af6f9b5
commit b0417d0
Showing
44 changed files
with
22,053 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,27 @@ on: | |
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
build-template-presenter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
working-directory: src/nscenario-report-browser/ | ||
|
||
- name: Build | ||
run: npm run build | ||
working-directory: src/nscenario-report-browser/ | ||
|
||
build-extension: | ||
runs-on: windows-latest | ||
needs: build-template-presenter | ||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
|
@@ -18,11 +37,11 @@ jobs: | |
PackageReleaseNotes: 'https://github.com/${{ github.repository }}/releases' | ||
ContinuousIntegrationBuild: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET Core 5 | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET Core 8 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '5.0' | ||
dotnet-version: '8.0' | ||
- name: Calculate next version | ||
uses: cezarypiatek/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,10 +22,10 @@ jobs: | |
ContinuousIntegrationBuild: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET Core 5 | ||
- name: Setup .NET Core 8 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '5.0' | ||
dotnet-version: '8.0' | ||
- name: Calculate next version | ||
uses: cezarypiatek/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/NScenario.Demo/Tests.should_collect_info_about_exceptions.received.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
ScenarioTitle: should collect info about exceptions, | ||
MethodName: should_collect_info_about_exceptions, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
LineNumber: 138, | ||
Status: Failed, | ||
Steps: [ | ||
{ | ||
Description: This is the first step, | ||
LineNumber: 142, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0190945, | ||
Status: Failed, | ||
SubSteps: [ | ||
{ | ||
Description: This is the first sub-step of first step, | ||
LineNumber: 144, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0011362, | ||
Status: Success | ||
}, | ||
{ | ||
Description: This is the second sub-step of first step, | ||
LineNumber: 148, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0100732, | ||
Status: Failed, | ||
SubSteps: [ | ||
{ | ||
Description: Yet another nesting level p1, | ||
LineNumber: 150, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0090506, | ||
Status: Failed, | ||
Exception: | ||
System.InvalidOperationException: Something wrong | ||
at NScenario.Demo.Tests.<>c.<should_collect_info_about_exceptions>b__5_4() in {ProjectDirectory}UnitTest1.cs:line 152 | ||
at NScenario.StepExecutors.OutputScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) in {SolutionDirectory}NScenario\StepExecutors\OutputScenarioStepExecutor.cs:line 31 | ||
at NScenario.StepExecutors.LevelTrackingScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) in {SolutionDirectory}NScenario\StepExecutors\LevelTrackingScenarioStepExecutor.cs:line 21 | ||
at NScenario.StepExecutors.LevelTrackingScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) in {SolutionDirectory}NScenario\StepExecutors\LevelTrackingScenarioStepExecutor.cs:line 21 | ||
at NScenario.ScenarioInfoCollectorExecutor.Step(String scenarioName, String stepDescription, MaybeAsyncAction action, StepContext stepContext) in {SolutionDirectory}NScenario\ScenarioInfoCollectorExecutor.cs:line 61 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
68 changes: 68 additions & 0 deletions
68
src/NScenario.Demo/Tests.should_collect_info_about_exceptions.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
ScenarioTitle: should collect info about exceptions, | ||
MethodName: should_collect_info_about_exceptions, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
LineNumber: 138, | ||
Status: Failed, | ||
Steps: [ | ||
{ | ||
Description: This is the first step, | ||
LineNumber: 142, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
Status: Failed, | ||
SubSteps: [ | ||
{ | ||
Description: This is the first sub-step of first step, | ||
LineNumber: 144, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
Status: Success | ||
}, | ||
{ | ||
Description: This is the second sub-step of first step, | ||
LineNumber: 148, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
Status: Failed, | ||
SubSteps: [ | ||
{ | ||
Description: Yet another nesting level p1, | ||
LineNumber: 150, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
Status: Failed, | ||
Exception: { | ||
$type: InvalidOperationException, | ||
Type: InvalidOperationException, | ||
Message: Something wrong, | ||
Data: { | ||
NScenarioHandled: true | ||
}, | ||
StackTrace: | ||
at NScenario.Demo.Tests.<>c.<should_collect_info_about_exceptions>b__5_4() | ||
at NScenario.StepExecutors.OutputScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.StepExecutors.LevelTrackingScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.StepExecutors.LevelTrackingScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.ScenarioInfoCollectorExecutor.Step(String scenarioName, String stepDescription, MaybeAsyncAction action, StepContext stepContext) | ||
at NScenario.ScenarioInfoCollectorExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.TestScenario.Step(String description, Func`1 action, String filePath, String methodName, Int32 lineNumber) | ||
--- End of stack trace from previous location --- | ||
at NScenario.StepExecutors.OutputScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.StepExecutors.LevelTrackingScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.StepExecutors.LevelTrackingScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.ScenarioInfoCollectorExecutor.Step(String scenarioName, String stepDescription, MaybeAsyncAction action, StepContext stepContext) | ||
at NScenario.ScenarioInfoCollectorExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.TestScenario.Step(String description, Func`1 action, String filePath, String methodName, Int32 lineNumber) | ||
--- End of stack trace from previous location --- | ||
at NScenario.StepExecutors.OutputScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.StepExecutors.LevelTrackingScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.StepExecutors.LevelTrackingScenarioStepExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.ScenarioInfoCollectorExecutor.Step(String scenarioName, String stepDescription, MaybeAsyncAction action, StepContext stepContext) | ||
at NScenario.ScenarioInfoCollectorExecutor.Step(String scenarioName, String stepDescription, Func`1 action, StepContext stepContext) | ||
at NScenario.TestScenario.Step(String description, Func`1 action, String filePath, String methodName, Int32 lineNumber) | ||
at NScenario.Demo.Tests.should_collect_info_about_exceptions() | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
77 changes: 77 additions & 0 deletions
77
src/NScenario.Demo/Tests.should_present_scenario_with_sub_steps.received.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
ScenarioTitle: should present scenario with sub steps, | ||
MethodName: should_present_scenario_with_sub_steps, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
LineNumber: 104, | ||
Steps: [ | ||
{ | ||
Description: This is the first step, | ||
LineNumber: 106, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0025073, | ||
Status: Success, | ||
SubSteps: [ | ||
{ | ||
Description: This is the first sub-step of first step, | ||
LineNumber: 108, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0001351, | ||
Status: Success | ||
}, | ||
{ | ||
Description: This is the second sub-step of first step, | ||
LineNumber: 112, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0012006, | ||
Status: Success, | ||
SubSteps: [ | ||
{ | ||
Description: Yet another nesting level p1, | ||
LineNumber: 114, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0001024, | ||
Status: Success | ||
}, | ||
{ | ||
Description: Yet another nesting level p2, | ||
LineNumber: 118, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0000864, | ||
Status: Success | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
Description: This is the second step, | ||
LineNumber: 175, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0010105, | ||
Status: Success, | ||
SubSteps: [ | ||
{ | ||
Description: This is the first sub-step of second step, | ||
LineNumber: 177, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0000875, | ||
Status: Success | ||
}, | ||
{ | ||
Description: This is the second sub-step of second step, | ||
LineNumber: 181, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0000664, | ||
Status: Success | ||
} | ||
] | ||
}, | ||
{ | ||
Description: This is the third step, | ||
LineNumber: 127, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0000586, | ||
Status: Success | ||
} | ||
] | ||
} |
77 changes: 77 additions & 0 deletions
77
src/NScenario.Demo/Tests.should_present_scenario_with_sub_steps.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
ScenarioTitle: should present scenario with sub steps, | ||
MethodName: should_present_scenario_with_sub_steps, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
LineNumber: 104, | ||
Steps: [ | ||
{ | ||
Description: This is the first step, | ||
LineNumber: 106, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0014539, | ||
Status: Success, | ||
SubSteps: [ | ||
{ | ||
Description: This is the first sub-step of first step, | ||
LineNumber: 108, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0000699, | ||
Status: Success | ||
}, | ||
{ | ||
Description: This is the second sub-step of first step, | ||
LineNumber: 112, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0007161, | ||
Status: Success, | ||
SubSteps: [ | ||
{ | ||
Description: Yet another nesting level p1, | ||
LineNumber: 114, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0000587, | ||
Status: Success | ||
}, | ||
{ | ||
Description: Yet another nesting level p2, | ||
LineNumber: 118, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0000733, | ||
Status: Success | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
Description: This is the second step, | ||
LineNumber: 175, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0008702, | ||
Status: Success, | ||
SubSteps: [ | ||
{ | ||
Description: This is the first sub-step of second step, | ||
LineNumber: 177, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0000749, | ||
Status: Success | ||
}, | ||
{ | ||
Description: This is the second sub-step of second step, | ||
LineNumber: 181, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0000440, | ||
Status: Success | ||
} | ||
] | ||
}, | ||
{ | ||
Description: This is the third step, | ||
LineNumber: 127, | ||
FilePath: {ProjectDirectory}UnitTest1.cs, | ||
ExecutionTime: 00:00:00.0000508, | ||
Status: Success | ||
} | ||
] | ||
} |
Oops, something went wrong.