paparazzi
paparazzi copied to clipboard
Decouple snapshot tests from unit tests.
I would like to be able to just run the snapshot tests and not also the unit tests. On my project's CI we have parallel build workflows to run verifications and tests and I would like the snapshot tests to run on a parallel workflow and not require the unit tests to have run first (so they can be run separately).
I have been able to exclude the snapshot tests from the general unit test task using the following:
afterEvaluate {
if (!(props["runSpecificUnitTestsOnly"] as Boolean)) {
tasks.named<Test>("testAlphaDebugUnitTest") {
dependsOn(getModuleTaskList("feature", "testDebugUnitTest"))
dependsOn(getModuleTaskList("base", "testDebugUnitTest"))
filter {
// Exclude snapshot tests - they will be run separately as part of verifyPaparazzi
excludeTestsMatching("*.snapshot.*")
}
}
}
}
I have also tried to just run the snapshot tests using ./gradlew recordPaparazziAlphaDebug --tests "*.snapshot.*"
but it is not really achieving what I want.