-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Irregularities found when extending a test class with annotations - Bug #2454
Comments
Similar issue on my side regarding the support of the package com.example.test_app.bar
import com.example.test_app.BaseInstrumentedTest
import org.junit.runner.RunWith
import org.junit.runners.Suite
import com.example.test_app.bar.BarInstrumentedTest
import com.example.test_app.foo.FooInstrumentedTest
@Suite.SuiteClasses(
BarInstrumentedTest::class,
FooInstrumentedTest::class
)
@RunWith(Suite::class)
class FooBarTestSuite : BaseInstrumentedTest() It is properly supported using an adb command I was able to run my test suite in both cases but it fails using Flank with the following output:
At first sight, it seems to be either a filter or shard calculation issue, maybe in private suspend fun List<AndroidTestContext>.setupShards(): List<AndroidTestContext> = coroutineScope {
map { testContext ->
async {
val newArgs = testContext.args
val filters = TestFilters.fromTestTargets(newArgs.testTargets, newArgs.testTargetsForShard)
when {
testContext !is InstrumentationTestContext -> testContext
newArgs.useCustomSharding -> testContext.userShards(newArgs.customSharding)
newArgs.useTestTargetsForShard -> testContext.downloadApks().calculateDummyShards(newArgs, filters)
else -> testContext.downloadApks().calculateShards(newArgs, filters)
}
}
}.awaitAll().dropEmptyInstrumentationTest()
} The Is there any workaround I could apply to run my test suites on Firebase Test Lab using Flank? I tried to deactivate the sharding using Thanks EDIT: I was able to find a workaround -> Adding an empty fake test succeeds in executing the test suite. package com.example.test_app.bar
import com.example.test_app.BaseInstrumentedTest
import org.junit.runner.RunWith
import org.junit.runners.Suite
import com.example.test_app.bar.BarInstrumentedTest
import com.example.test_app.foo.FooInstrumentedTest
@Suite.SuiteClasses(
BarInstrumentedTest::class,
FooInstrumentedTest::class
)
@RunWith(Suite::class)
class FooBarTestSuite : BaseInstrumentedTest(){
@Test
fun workaroundTestToWorkWithFlank() {
}
} That being said, it seems that if any of the tests inside the suite is failing and I set Also, the sharding is not efficient either in this case as it takes longer to execute 62 tests using Do you think this is something that could be improved? |
Describe the bug
Gcloud takes into account the
Parameterized
annotation associated with the base class while the flank requires that theParameterized
annotation to be associated with the extended class as well.To Reproduce
Example ->
GCloud
executes tests for SampleScreenshotDarkTest where asflank
doesn't.Expected behavior
Details (please complete the following information):
The text was updated successfully, but these errors were encountered: