Merge pull request #8224 from Karumi/configure-shot-test-runner
Update instrumentation test runner and Shot version
This commit is contained in:
commit
e6f8cc2599
|
@ -24,7 +24,7 @@ buildscript {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.16.0"
|
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.16.0"
|
||||||
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
||||||
classpath 'com.karumi:shot:5.5.1'
|
classpath 'com.karumi:shot:5.10.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,9 @@ import android.os.Bundle;
|
||||||
import com.facebook.testing.screenshot.ScreenshotRunner;
|
import com.facebook.testing.screenshot.ScreenshotRunner;
|
||||||
import com.github.tmurakami.dexopener.DexOpener;
|
import com.github.tmurakami.dexopener.DexOpener;
|
||||||
|
|
||||||
import androidx.test.runner.AndroidJUnitRunner;
|
import com.karumi.shot.ShotTestRunner;
|
||||||
|
|
||||||
public class ScreenshotTestRunner extends AndroidJUnitRunner {
|
public class ScreenshotTestRunner extends ShotTestRunner {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Application newApplication(ClassLoader cl, String className, Context context)
|
public Application newApplication(ClassLoader cl, String className, Context context)
|
||||||
|
@ -48,16 +48,4 @@ public class ScreenshotTestRunner extends AndroidJUnitRunner {
|
||||||
|
|
||||||
return super.newApplication(cl, className, context);
|
return super.newApplication(cl, className, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle args) {
|
|
||||||
super.onCreate(args);
|
|
||||||
ScreenshotRunner.onCreate(this, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void finish(int resultCode, Bundle results) {
|
|
||||||
ScreenshotRunner.onDestroy();
|
|
||||||
super.finish(resultCode, results);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue