You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should be a rare scenario, I haven't seen it before.
Basically I was running a JUnit5 test on an android S device, using ./gradlew connectedDebugAndroid. Inside my test project, there are 9 cases, each is run with @RepeatedTest(9), so if everything goes well, there should be 81 cases in total.
Now I ran this suite for multiple times, and met twice of the below issue:
During my test, something goes wrong(should be a bug in the android system), from the console log of the android device, I can see the android system crashed with a Kernel panic. So the test suite was terminated, somehow, the xml test file was still generated and pulled to the computer.
From the generated xml test report, I can see something like this:
<testcase classname="com.xxx.MainTest" name="testFrameDropTunnelModeEnabled: repetition 1 of 9" time="109.09"/>
<testcase classname="com.xxx.MainTest" name="testFrameDropTunnelModeEnabled: repetition 2 of 9" time="107.962"/>
<testcase classname="com.xxx.MainTest" name="testFrameDropTunnelModeEnabled: repetition 3 of 9" time="107.832"/>
<testcase classname="com.xxx.MainTest" name="testFrameDropTunnelModeEnabled: repetition 4 of 9" time="108.991"/>
<testcase classname="com.xxx.MainTest" name="testFrameDropTunnelModeEnabled: repetition 5 of 9" time="107.835"/>
<testcase classname="com.xxx.MainTest" name="testFrameDropTunnelModeEnabled: repetition 6 of 9" time="107.884"/>
<testcase classname="com.xxx.MainTest" name="testFrameDropTunnelModeEnabled: repetition 7 of 9" time="107.725"/>
<testcase classname="com.xxx.MainTest" name="testFrameDropTunnelModeEnabled: repetition 8 of 9" time="-1.73649439603E9"/>
<testcase classname="com.xxx.MainTest" name="testVerticalTunnelModeEnabled: repetition 1 of 9" time="21.424"/>
<testcase classname="com.xxx.MainTest" name="testVerticalTunnelModeEnabled: repetition 2 of 9" time="20.345"/>
<testcase classname="com.xxx.MainTest" name="testVerticalTunnelModeEnabled: repetition 3 of 9" time="-1.736494169664E9"/>
Note the two special execution time: time="-1.73649439603E9" and time="-1.736494169664E9".
This is unexpected, I think JUnit should set them as failure or error?
The plugins I'm using:
// In project level build.grale
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'de.mannodermaus.gradle.plugins:android-junit5:1.6.0.0'
If additional info is required, please kindly let me know.
The text was updated successfully, but these errors were encountered:
ZzhengSyna
changed the title
JUnit5 generates a negative execution time for test case unexpected
JUnit5 generates a negative execution time for test case unexpectedly
Jan 10, 2025
This should be a rare scenario, I haven't seen it before.
Basically I was running a JUnit5 test on an android S device, using
./gradlew connectedDebugAndroid
. Inside my test project, there are 9 cases, each is run with@RepeatedTest(9)
, so if everything goes well, there should be 81 cases in total.Now I ran this suite for multiple times, and met twice of the below issue:
During my test, something goes wrong(should be a bug in the android system), from the console log of the android device, I can see the android system crashed with a
Kernel panic
. So the test suite was terminated, somehow, the xml test file was still generated and pulled to the computer.From the generated xml test report, I can see something like this:
Note the two special execution time:
time="-1.73649439603E9"
andtime="-1.736494169664E9"
.This is unexpected, I think JUnit should set them as failure or error?
The plugins I'm using:
If additional info is required, please kindly let me know.
The text was updated successfully, but these errors were encountered: