On Android Studio 0.4.2

The timings shown in test results include the time for setUp() in each test 
case, resulting in skewed timings for tests with long setup times.

I created a NoOp test case that just performs sleep(), in setUp and two 
test cases.

public class NoopTest extends TestCase {

    private long startmillis = 0;

    @Override
    protected void setUp() throws Exception {
        startmillis = System.currentTimeMillis();
        Thread.sleep(10000);
    }

    public void testNoop1() throws Exception {

        Thread.sleep(1000);
    }

    public void testNoop2() throws Exception {

        Thread.sleep(2000);

        long endmillis = System.currentTimeMillis();

        System.err.println("Actual elapsed time = "+(endmillis - 
startmillis));
    }

}

These are the results displayed for the test:

<?xml version="1.0" encoding="UTF-8"?>
<testrun duration="23261" footerText="Generated by Android Studio on 
3/19/14 1:43 PM" name="Noop">
    <count name="total" value="2"/>
    <count name="passed" value="2"/>
    <suite duration="23261" status="passed" 
name="com.couchbase.lite.performance.NoopTest">
        <test duration="11005" status="passed" name="testNoop1"/>
        <test duration="12256" status="passed" name="testNoop2"/>
    </suite>
</testrun>

Is there a way to format the report with the setup times separated from the 
actual test times?

Andy


-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to