I am getting the following error when I am testing my flutter intetration tests in test lab via sh file script in mac

The uploaded test APK does not contain the test runner class specified in the manifest file. This is probably because the test runner isn't built into the test APK (might be in the app APK instead).

(my flutter version is 3.13)

in default config I have this

            defaultConfig 
           {testInstrumentationRunner "androidx.test.runner.AndroidJunitRunner" } 

and dependencies I have this dependencies { testImplementation 'junit:junit:4.12'. androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'} this is my mainActivity under andrioidTest directory.

   @RunWith(FlutterTestRunner.class)
    public class MainActivityTest {
     @Rule
     public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class, true, false);
  

in app mainfest I have this

          <instrumentation
       android:name="androidx.test.runner.AndroidJunitRunner"
       android:targetPackage="com.hello.integration"></instrumentation>

.sh file

      pushd android
      # # flutter build generates files in android/ for building the app
       flutter build apk
     ./gradlew app:assembleAndroidTest
      ./gradlew app:assembleDebug - 
     Ptarget=integration_test/app_test.dart
      popd


       gcloud firebase test android run --type instrumentation \
          --app build/app/outputs/apk/debug/app-debug.apk \
          --test build/app/outputs/apk/androidTest/debug/app-debug- 
           androidTest.apk \
          --use-orchestrator \
          --timeout 3m \
          --results-bucket=gs://project_bucket_name \
          --results-dir=tests/firebase 

any help would be highly appreciated! Thanks

0

There are 0 best solutions below