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

How to get more detail from failed tests? #361

Open
merlinpaypal opened this issue Dec 19, 2023 · 2 comments
Open

How to get more detail from failed tests? #361

merlinpaypal opened this issue Dec 19, 2023 · 2 comments

Comments

@merlinpaypal
Copy link

I just stared using android-emulator-runner and love how easy it is to set up.

Is there a way to get more detail about failed tests?

The current output just says a test fails but doesn't tell me which assertion it fails on.

It also doesn't tell me how many other tests pass.

Also is there any way to get the test output to post to the PR as a comment?

This is my current output

> Task :library:connectedDebugAndroidTest
additionalTestOutput is not supported on this device running API level 23 because the additional test output directory could not be found

[DDMLIB]: An unexpected packet was received before the handshake.
[DDMLIB]: An unexpected packet was received before the handshake.

> Task :library:connectedDebugAndroidTest
Starting 23 tests on test(AVD) - 6.0

com.paypal.messages.io.ApiTest > testCreateMessageDataRequestWithAllData[test(AVD) - 6.0] FAILED 
	java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:87)

com.paypal.messages.io.ApiTest > testCreateMessageDataRequestWithNoData[test(AVD) - 6.0] FAILED 
	java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:87)

com.paypal.messages.logger.LoggerTest > testLog[test(AVD) - 6.0] FAILED 
	java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:87)
Tests on test(AVD) - 6.0 failed: There was 3 failure(s).
@andreynovikov
Copy link

Same problem. I have another error ('attach to root') but there is no way to understand where exactly test fails. Difficulty is that with the same AVD image it passes without errors locally.

@johnjohndoe
Copy link

Did you try out other assertion libraries, e.g. Google Truth? They might output more details.

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

3 participants