@@ -564,6 +564,48 @@ public class MainActivityTest {
564
564
);
565
565
});
566
566
567
+ test ('supports kotlin implementation of integration_test runner' , () async {
568
+ const String kotlinTestFileRelativePath =
569
+ 'example/android/app/src/androidTest/MainActivityTest.kt' ;
570
+ final RepositoryPackage plugin =
571
+ createFakePlugin ('plugin' , packagesDir, extraFiles: < String > [
572
+ 'test/plugin_test.dart' ,
573
+ 'example/integration_test/foo_test.dart' ,
574
+ 'example/android/gradlew' ,
575
+ kotlinTestFileRelativePath,
576
+ ]);
577
+
578
+ // Kotlin equivalent of the test runner
579
+ childFileWithSubcomponents (
580
+ plugin.directory, p.posix.split (kotlinTestFileRelativePath))
581
+ .writeAsStringSync ('''
582
+ @DartIntegrationTest
583
+ @RunWith(FlutterTestRunner::class)
584
+ class MainActivityTest {
585
+ @JvmField @Rule var rule = ActivityTestRule(MainActivity::class.java)
586
+ }
587
+ ''' );
588
+
589
+ final List <String > output = await runCapturingPrint (
590
+ runner,
591
+ < String > [
592
+ 'firebase-test-lab' ,
593
+ '--results-bucket=a_bucket' ,
594
+ '--device' ,
595
+ 'model=redfin,version=30' ,
596
+ ],
597
+ );
598
+
599
+ expect (
600
+ output,
601
+ containsAllInOrder (< Matcher > [
602
+ contains ('Running for plugin' ),
603
+ contains ('Testing example/integration_test/foo_test.dart...' ),
604
+ contains ('Ran for 1 package' )
605
+ ]),
606
+ );
607
+ });
608
+
567
609
test ('skips packages with no android directory' , () async {
568
610
createFakePackage ('package' , packagesDir, extraFiles: < String > [
569
611
'example/integration_test/foo_test.dart' ,
0 commit comments