Skip to content
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

Add TestCategory and MachineName to JUnitReport #3416

Open
wants to merge 1 commit into
base: master-se-1
Choose a base branch
from

Conversation

snipex111
Copy link
Collaborator

@snipex111 snipex111 commented Sep 11, 2024

Add TestCategory and MachineName to JUnitReport

Update ExitCode=0 when 0 test case detected, this is done as "if a pipeline fails/cancelled just after all test cases ran and passed but before the summary generation, in rerun our pipeline optimisation script will return "0 test case" and this should be a valid case and only report should be generated and rerun and pipeline should pass.

@snipex111 snipex111 marked this pull request as ready for review January 2, 2025 10:36
@snipex111 snipex111 changed the title Abhitiwaritest Add TestCategory and MachineName to JUnitReport Jan 2, 2025
@LiliDeng LiliDeng self-requested a review January 3, 2025 01:33
LiliDeng
LiliDeng previously approved these changes Jan 3, 2025
@snipex111
Copy link
Collaborator Author

@microsoft-github-policy-service agree company="Microsoft"

@snipex111 snipex111 requested a review from LiliDeng January 3, 2025 07:13
@@ -323,47 +330,48 @@ Class TestController {
}
}
if (!$allTests) {
Throw "Not able to collect any test cases from XML files"
Write-LogWarn "Not able to collect any test cases from XML files"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically , if a pipeline run get cancelled just after all test cases passed, but before the report generation, so in this case if we rerun. "i changed the script in pipeline to run only failed test case."
so in rerun 0 testcases will be there, but task can be sucessfully executed as we only have report generation left in this rerun.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add return here? and keep following contents not changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants