-
Notifications
You must be signed in to change notification settings - Fork 283
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
Html report is reporting wrong number of test cases #351
Comments
Try https://github.com/xcpretty/trainer instead. It parses the the test plist report rather than the test output, so it should be more accurate. |
@silverhammermba : Right now my plist file has 2 failures for single test case, so will that be handled with trainer ? And also my requirement is for HTML file, but as per the README.md document it seems like it doesn't support HTML output. Anyways i have found a temporary solution for this problem ( #352 ) and it seems to be working absolutely fine for me. Thanks for the suggestion though, may be if my requirement changes than i will try "trainer". |
I'm trying to get HTML report using xcpretty for my iOS app tests (using Earlgrey framework).
Whenever the test cases fails it gives exception and fails the test case. The xcpretty report takes failure as 1 count and exception as another count, which doubles the number of failed test cases for me.
eg :
1 ===> Exception: NoMatchingElementException
func swipeToProducts() { EarlGrey.selectElement(with: grey_text(FileReader_UITests.objFileReader.dict_Object["scrollLabel"]!)).perform(grey_swipeSlowInDirection(GREYDirection.up)) }
2 ===> failed: caught "EarlGreyInternalTestInterruptException", "Immediately halt execution of testcase"
@discardableResult public func perform(_ action: GREYAction!) -> Self { return self.__perform(action) }
Here both of these failures are related (since element was not found perform operation failed) but xcpretty is taking them as 2 separate test case thus resulting in doubling the failed test case count.
In commandline it showed exact no of test case :
"Executed 10 tests, with 16 failures (16 unexpected) in 82.666 (82.782) seconds"
but in html report it is showing 18 test cases (8*2 fail + 2 pass)
The text was updated successfully, but these errors were encountered: