Code example for InstrumentationTestSuite

Methods: addTestSuite

0
public class RsPerfTestRunner extends InstrumentationTestRunner {
    public int iterations = 10;
 
    @Override 
    public TestSuite getAllTests() {
        TestSuite suite = new InstrumentationTestSuite(this);
        suite.addTestSuite(RsBenchTest.class);
        return suite;
    } 
 
    @Override 
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        String strValue = (String)icicle.get("iterations");
        if (strValue != null) {
            int intValue = Integer.parseInt(strValue);
            if (iterations > 0) {
                iterations = intValue;
            } 
        } 
    }