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

Issue #217 Fix to eliminate re-counting of retried test cases, and append "retry iteration #" on names of retried tests #240

Closed
wants to merge 15 commits into from

Conversation

ssharma0312
Copy link

@ssharma0312 ssharma0312 commented Nov 18, 2021

Fix for #217
#217

Fix will include:

  1. Eliminating duplicate counts of retried tests in HTML as well JUNIT report
    image
    All = Total Unique Tests (Same as XCode)
    Passed = Passed + Mixed (These tests may have failed but passed on retry, they are categorized as Mixed in XCode)
    Failed = Total Unique Failed Tests (It won't count retried tests)

As now you can see we match closely with XCode pattern.

  1. Appending "retry iteration #" to different retried tests on HTML report
    image

Copy link
Member

@tylervick tylervick left a comment

Choose a reason for hiding this comment

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

Thank you for this @ssharma0312! Would you mind updating the test sample generation & test scripts to cover this as well?

I'm also wondering if these changes need to be upstream in https://github.com/davidahouse/xcresultkit

Comment on lines 13 to 25
#xcodebuild test \
# -project SampleApp.xcodeproj \
# -scheme MainScheme \
# -destination 'platform=iOS Simulator,name=iPhone 8,OS=latest' \
# -test-iterations 5 \
# -retry-tests-on-failure \
# -resultBundlePath "$FILENAME" || true
echo "Even if some test failed this is OK."
echo "${FILENAME} should contain succeed, failed and skipped tests for xchtmlreport functional testing"
rm -rf "../Tests/XCTestHTMLReportTests/${FILENAME}"
mv "$FILENAME" "../Tests/XCTestHTMLReportTests/"
echo "$(tput setaf 2)$(basename "$0") successfully finished$(tput sgr 0)" No newline at end of file
echo "$(tput setaf 2)$(basename "$0") successfully finished$(tput sgr 0)"
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be reverted :)

Choose a reason for hiding this comment

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

@tylervick - If you just pass flags -retry-tests-on-failure and test-iterations 5, then XCode 13 will re-run failed test until they pass for a max of 5 times. I have updated the prepareTestResults script file to reflect same.

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.

None yet

3 participants