Skip to content
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

Lambdatest integration java.lang.RuntimeException: Unable to instantiate instrumentation #2493

Open
DmytroChuchmaiBarges opened this issue Jan 16, 2025 · 0 comments

Comments

@DmytroChuchmaiBarges
Copy link

DmytroChuchmaiBarges commented Jan 16, 2025

Steps to reproduce

  1. Write any patrol test, and make sure it is running with patrol_cli 3.4.1
  2. open /app/build.gradle and replace testInstrumentationRunner "pl.leancode.patrol.PatrolJUnitRunner" with pl.leancode.patrol.LambdaTestPatrolJUnitRunner
  3. run "patrol test --targets integration_test/your_test.dart --debug --verbose"
    expected: the tests should normally run
    actual: test don't run, an app is installed on emulator and then deleted
    when upload to LambdaTest, same behavior in the test logs, as in local test report

Actual results

When I build an app with testInstrumentationRunner "pl.leancode.patrol.LambdaTestPatrolJUnitRunner"
upload to lambdatest or run tests locally via "patrol test" command
it produces an error in test report:

java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo{com.myapp.stage.test/pl.leancode.patrol.LambdaTestPatrolJUnitRunner}: java.lang.ClassNotFoundException: Didn't find class "pl.leancode.patrol.LambdaTestPatrolJUnitRunner"

Logs

Logs
java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo{com.myapp.stage.test/pl.leancode.patrol.LambdaTestPatrolJUnitRunner}: java.lang.ClassNotFoundException: Didn't find class "pl.leancode.patrol.LambdaTestPatrolJUnitRunner"
on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/android.test.base.jar", zip file "/data/app/~mMW9Tm-zvsGOd0DDxE2vhA==/com.myapp.stage.test-ElPT892YUgrP1yN5Z3ZkSg==/base.apk", zip file "/data/app/~~JQpVigu8CctLgvcT3ao-qg==/com.myapp.stage.test-plChV-l37OLMbYeJfvtJiw==/base.apk"],nativeLibraryDirectories=[/system/lib64, /system_ext/lib64]]

Patrol version

patrol: 3.13.1

Patrol Doctor output

Patrol Doctor output
Patrol CLI version: 3.4.1
Flutter command: flutter 
  Flutter 3.24.4 • channel [user-branch]
Android: 
• Program adb found in /Users/dchuchmai/Library/Android/sdk/platform-tools/adb
• Env var $ANDROID_HOME set to /Users/dchuchmai/Library/Android/sdk
iOS / macOS: 
• Program xcodebuild found in /usr/bin/xcodebuild
• Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller

Flutter Doctor output

Flutter Doctor output
[!] Flutter (Channel [user-branch], 3.24.4, on macOS 15.1.1 24B91 darwin-arm64, locale en-UA)
    ! Flutter version 3.24.4 on channel [user-branch] at /Users/dchuchmai/src/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.95.3)
[✓] Connected device (4 available)
[✓] Network resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant