Code example for AndroidTestRunner

Methods: addTestListener

0
     * Subclass and override this if you want to use a different TestRunner type. 
     *  
     * @return the test runner to use 
     */ 
    protected AndroidTestRunner makeAndroidTestRunner() {
        return new AndroidTestRunner();
    } 
 
    @Override 
    protected AndroidTestRunner getAndroidTestRunner() {
        AndroidTestRunner runner = makeAndroidTestRunner();
        mListener = new JUnitReportListener(getContext(), getTargetContext(), mReportFile, mReportDir, mFilterTraces, mMultiFile);
        runner.addTestListener(mListener);
        return runner;
    } 
 
    @Override 
    public void finish(int resultCode, Bundle results) {
        if (mListener != null) {
            mListener.close();
Experience pair programming with AI  Get Codota for Java