Reputation: 5926
I have a simple test class:
public class SimpleTest extends AndroidTestCase {
public void testSomething() throws Throwable {
Assert.assertEquals(1 + 1, 2);
}
}
I know how to run the test, but where can I view the output in Android Studio?
Upvotes: 8
Views: 6935
Reputation: 788
Late answer but it could be helpful.
I have Android Studio Electric Eel | 2022.1.1 and you just need to click on two different options just to show all nested results.
If you click on these two options, it will show all the results.
Upvotes: 1
Reputation: 2062
First of all, go to "Run" in the menu list in Android Studio, then click on "Run", a popup menu shows up, select from it which test you wish to run. Once you run it, you'll have the figure as shown in the attached screenshot: green progressbar means tests were successful, red progressbar indicates at least one of tests failed.For more details, visit android developers website here
Upvotes: 0
Reputation: 323
I was struggling with finding it at first, but eventually, I have managed to find it within the Debug window, under the Console tab.
It shows both progress (status bar) and test results (print within the console).
Upvotes: 1
Reputation: 14226
Run the test by right clicking on it.
The run tab should pop up, you can open it by hand on the very bottom left corner.
It will list your test results.
Upvotes: 8