Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I view JUnit test results in Android Studio?

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?

like image 605
Matt Logan Avatar asked Nov 18 '13 02:11

Matt Logan


People also ask

Where are JUnit test results stored?

This data is stored within JENKINS_HOME , and the current storage format requires huge overheads when retrieving statistics and, especially, trends. In order to display trends, each report has to be loaded and then processed in-memory.

How do I check JUnit test cases?

We use the assertEquals() method to check the actual result with the expected output. We create the TestRunner. java class to execute the test cases. It contains the main() method in which we run the TestJunitTestCaseExample.

Where does Gradle store test results?

By default, gradle test displays only the test summary. P.S Gradle test generates the detailed tests' result at the build/reports/tests/test/index. html page.


1 Answers

Run the test by right clicking on it.

enter image description here

The run tab should pop up, you can open it by hand on the very bottom left corner.

enter image description here

It will list your test results.

like image 132
flx Avatar answered Sep 28 '22 16:09

flx