osama-raddad / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
0 stars 0 forks source link

AndroidJUnit4 should skip tests with failing assumptions #126

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a testcase using the AndroidJUnit4.class runner
2. Create a test with a failing assumption
3. Run test

What is the expected output? What do you see instead?

"The default JUnit runner treats tests with failing assumptions as ignored. 
Custom runners may behave differently."

Expected: Test report contains the test marked as skipped via the <skipped /> 
node

Actual:   The test counts a failure due to a AssumptionViolatedException

What version of the product are you using? On what operating system?

Espresso 2.0 on any operating system

Please provide any additional information below.

Test skips are currently possible through the @Ignore annotation

Attached is an example project.

Original issue reported on code.google.com by Wmbe...@gmail.com on 26 Jan 2015 at 8:27

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by vale...@google.com on 18 Mar 2015 at 5:56

GoogleCodeExporter commented 9 years ago
Fixed in next version.

Original comment by nkors...@google.com on 24 Mar 2015 at 6:13

GoogleCodeExporter commented 9 years ago
Fixed in espresso 2.1

Original comment by valera.z...@gmail.com on 21 Apr 2015 at 10:12

GoogleCodeExporter commented 9 years ago
This does not seem to be fixed in espresso 2.1
Just tried it, using sample from Stephan Linzner : 
https://github.com/googlesamples/android-testing

Adding assumeTrue, or assumeThat to simple espresso tests throws exactly same 
exception and does not mark tests ignored - exactly as stated in the original 
bug report.

Original comment by kiru...@gmail.com on 25 Apr 2015 at 9:35

GoogleCodeExporter commented 9 years ago
Sorry about that, I reopened the issue and check it again.

Quick question though, are you guys using Android Studio, Eclipse or command 
line? 

Original comment by nkors...@google.com on 6 May 2015 at 5:21

GoogleCodeExporter commented 9 years ago
I have been experiencing this issue in Android Studio. 

Original comment by designat...@gmail.com on 19 May 2015 at 7:56