8000 [xray-exporter] Fix test case status evaluation if comment is present… by uarlouski · Pull Request #3858 · vividus-framework/vividus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[xray-exporter] Fix test case status evaluation if comment is present… #3858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ private static TestExecutionItem createTestInfo(Entry<String, Scenario> scenario

private static TestExecutionItemStatus calculateStatus(AbstractStepsContainer steps)
{
return steps.createStreamOfAllSteps().allMatch(step -> "successful".equals(step.getOutcome()))
? TestExecutionItemStatus.PASS
: TestExecutionItemStatus.FAIL;
return steps.createStreamOfAllSteps().anyMatch(step -> "failed".equals(step.getOutcome()))
? TestExecutionItemStatus.FAIL
: TestExecutionItemStatus.PASS;
}

private static String asOffsetDateTime(long millis)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private static Scenario createPlainScenario(String outcome, List<Step> beforeSys
Scenario scenario = createScenario();
scenario.setBeforeSystemScenarioSteps(beforeSystemScenarioSteps);
scenario.setBeforeUserScenarioSteps(beforeUserScenarioSteps);
scenario.setSteps(List.of(createStep(SUCCESS), createStep(outcome)));
scenario.setSteps(List.of(createStep(SUCCESS), createStep(outcome), createStep(COMMENT)));
scenario.setAfterUserScenarioSteps(afterUserScenarioSteps);
scenario.setAfterSystemScenarioSteps(afterSystemScenarioSteps);
return scenario;
Expand All @@ -166,13 +166,13 @@ private static Scenario createExamplesScenario(String outcome, List<Step> before
Example example1 = new Example();
example1.setBeforeSystemScenarioSteps(beforeSystemScenarioSteps);
example1.setBeforeUserScenarioSteps(beforeUserScenarioSteps);
example1.setSteps(List.of(createStep(SUCCESS), createStep(SUCCESS)));
example1.setSteps(List.of(createStep(SUCCESS), createStep(SUCCESS), createStep(COMMENT)));
example1.setAfterUserScenarioSteps(List.of(createStep(SUCCESS), createStep(SUCCESS)));
example1.setAfterSystemScenarioSteps(afterSystemScenarioSteps);

Example example2 = new Example();
example2.setBeforeSystemScenarioSteps(beforeSystemScenarioSteps);
example2.setBeforeUserScenarioSteps(List.of(createStep(SUCCESS), createStep(SUCCESS)));
example2.setBeforeUserScenarioSteps(List.of(createStep(COMMENT), createStep(SUCCESS), createStep(SUCCESS)));
example2.setSteps(List.of(createStep(SUCCESS), createStep(outcome)));
example2.setAfterUserScenarioSteps(afterUserScenarioSteps);
example2.setAfterSystemScenarioSteps(afterSystemScenarioSteps);
Expand Down
0