Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

the rerun failed tests button is missing in android studio

When I run unit tests, I need to be able to rerun just the failed tests but the "rerun failed tests" button is missing from the run toolbar. I only get the run and stop buttons. I can't see any way to set which buttons are in the toolbar and have found no one else with this problem. I don't want to spend 48 minutes running all 295 tests when only 9 failed!

enter image description here

like image 698
Angienator Avatar asked Nov 08 '17 14:11

Angienator


People also ask

Can we rerun failed test cases in Junit?

We guys encounter sometime in need to rerun our failed test cases instantly, But if we wanna retry our test case twice/thrice etc then it is not achievable with Junit. But if we are following TestNG we can do that very fast. But in Junit as well, we can achieve this using following way and can rerun failed test cases.

How do you rerun the failed scenarios using TestNG?

For retrying the failure test runs automatically during the test run itself, we need to implement the IRetryAnalyzer interface provided by TestNG. The IRetryAnalyzer interface provides methods to control retrying the test runs.


1 Answers

Your Run tab shows Android tests running, not unit tests. 'Rerun Failed Tests' is only available for unit tests: https://developer.android.com/studio/test/index.html

like image 174
Ewan Avatar answered Jan 02 '23 08:01

Ewan