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

Results output with unuseful message on test failure #200

Closed
matax87 opened this issue Sep 27, 2017 · 16 comments
Closed

Results output with unuseful message on test failure #200

matax87 opened this issue Sep 27, 2017 · 16 comments

Comments

@matax87
Copy link

matax87 commented Sep 27, 2017

<failure type="Failure" message="UNKNOWN ERROR - PARSING FAILED: XCTestOutputBarrierTest Case '-[Target.TestSuite TestCase]' started.">
Unknown File:0
</failure>
@ob
Copy link
Member

ob commented Sep 27, 2017

I've seen this when the app crashes and we somehow fail to catch it... what does the main bluepill log say? Do you see any crashes in there? Sometimes there is a .crash file left.

@matax87
Copy link
Author

matax87 commented Sep 28, 2017

Sometimes there is a .crash file left.

No there isn't any .crash file.

The main TEST-FinalReport.xmlcontains failure with these kind of messages:

<failure type="Failure" message="UNKNOWN ERROR - PARSING FAILED: XCTestOutputBarrierTest Case '-[Target.TestSuite TestCase]' started.">
Unknown File:0
</failure>

Moreover, each simulator folder contains a TEST-TargetSchemeName-results.xml which presents the same problems of the main report and a N-TargetSchemeName-results.txt plain text file with (null) logs, es.:

Test: TestSuiteName
Start: 2017-09-28 11:08:36 +0000
End: 2017-09-28 11:23:34 +0000
Ended: YES
Passed: NO
Total: 57
Fail: 1
Unexpected: 0
Time: 897.602000
Log:
(null)

@PavloBasiuk
Copy link

I've got same error, any ideas why it's failing like that?

@oliverhu
Copy link
Member

oliverhu commented Oct 5, 2017

Looks like an edge case in BPTreeParser, @PavloBasiuk @matteomatassoni do you have a way to reproduce this?

@PavloBasiuk
Copy link

It fails for each and every failed test-case. And 99% of my tests fails when expected element is not found on view.

@oliverhu
Copy link
Member

oliverhu commented Oct 6, 2017

@PavloBasiuk could you write a sample test to repro (similar to BPTreeParserTests.m's testParsingCrash) and push to a branch?

@krze
Copy link

krze commented Oct 6, 2017

I plan on digging into this too, but just chiming in to say I'm having the same problem. All failed tests have this error in the logs. I confirmed that the failed tests are not the result of the app crashing, it's a legit assertion failure from XCTest

I'm using Xcode 9 and Bluepill 2.0.1 with a project running Swift 4 XCTest UI Tests

@PavloBasiuk
Copy link

PavloBasiuk commented Oct 6, 2017

My setup is practically the same: Xcode9, Bluepill 2.0 with custom changes for jUnit reports, Swift3 and XCUITests. And yeah, I will try to create nice and simple test to reproduce this issue and share with all.

@oliverhu
Copy link
Member

oliverhu commented Oct 6, 2017

Yes, it would be great if you all could provide dummy tests to reproduce this, otherwise it would be super hard for us to understand what is not parsed correctly.

@adamszeremeta
Copy link

I have the same issue as described here. In my case this is happening for tests which crashed and for those where assertion failed.

@PavloBasiuk
Copy link

PavloBasiuk commented Oct 6, 2017

It appeared to be easier then I expected. I've just broke one of existing tests for simplicity, so don't merge this PR: #206
But I was able to reproduce same behavior on BPSampleApp from BPSampleAppUITest

To reproduce:

  1. Break UITest (BPSampleApp/BPSampleAppUITests/BPSampleAppUITests.m)
  2. Build it all and generate .xctestrun file xcodebuild -workspace Bluepill.xcworkspace -scheme BPSampleApp -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 7,OS=11.0' build-for-testing -derivedDataPath "./XCTest"
  3. Run bluepill bluepill -p -f 1 -d "iPhone 7" -T "40" --xctestrun-path "XCTest/Build/Products/BPSampleApp_iphonesimulator11.0-x86_64.xctestrun" -o "./output" -j -i BPSampleAppUITests

@oliverhu
Copy link
Member

oliverhu commented Oct 6, 2017

ah.. i get it. We didn't fully test XCUITest scenarios.

@krze
Copy link

krze commented Oct 10, 2017

If this helps, I'm not specifying any special flags to change the test output format and I get this error. iirc all the switches to change the output format on the command in step 3 are already set to those options by default (plaintext + junit)

@krze
Copy link

krze commented Oct 24, 2017

Is there any progress on this issue? I spent a few hours digging through and couldn't quite figure out what's going on. Has something changed with the Simulator stdout in xcode 9 that's causing this issue?

oliverhu added a commit that referenced this issue Dec 9, 2017
Fix a parsing failure for UI Tests (Issue #200)
@oliverhu
Copy link
Member

oliverhu commented Dec 9, 2017

fixed in #226

@oliverhu oliverhu closed this as completed Dec 9, 2017
@PavloBasiuk
Copy link

👍

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

No branches or pull requests

6 participants