This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TestResultsFilesProvider( | |
| private val testResultsDirsProvider: TestResultsDirsProvider, | |
| private val addTimestamps: Boolean | |
| ) { | |
| private val logcatRootDir = File("logcat") | |
| private val screenshotsRootDir = File("screenshots") | |
| private val videoRootDir = File("video") | |
| private val viewHierarchy = File("view_hierarchy") | |
| fun provideLogcatFile(tag: String): File = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class VideoTestInterceptor( | |
| private val zenVideoRecorder: ZenVideoRecorder | |
| ) : TestRunWatcherInterceptor { | |
| override fun onTestStarted(testInfo: TestInfo) { | |
| zenVideoRecorder.start("Video_${testInfo.testName}") | |
| } | |
| override fun onTestFinished(testInfo: TestInfo, success: Boolean) { | |
| zenVideoRecorder.stop()?.attachVideoToReport() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //buildSrc | |
| class PullResultsFromDevicesTask extends DefaultTask { | |
| private Property<TestsRunConfig> config = project.objects.property(TestsRunConfig.class) | |
| private DirectoryProperty testCasesDir = project.objects.directoryProperty() | |
| @Input | |
| Property<TestsRunConfig> getTestsRunConfig() { | |
| return config | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AllureMapperStepInterceptor : StepWatcherInterceptor { | |
| private var allureStep: Step? = null | |
| override fun interceptBefore(stepInfo: StepInfo) { | |
| allureStep = Step().apply { stepStart(stepInfo.description) } | |
| } | |
| override fun interceptAfterWithSuccess(stepInfo: StepInfo) { | |
| allureStep?.stepCompleted() |