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

Running Appium automation junit tests with espresso driver #2071

Open
AlfredAfutu opened this issue Dec 11, 2024 · 1 comment
Open

Running Appium automation junit tests with espresso driver #2071

AlfredAfutu opened this issue Dec 11, 2024 · 1 comment

Comments

@AlfredAfutu
Copy link

Describe the bug
I keep getting the error "java.lang.IllegalStateException: KoinApplication has not been started" when i run my unit automation tests using appium and espresso driver

To Reproduce
Steps to reproduce the behavior:

  1. Run "appium start"
  2. Run the unit tests

Expected behavior
The tests should start the application under tests and automate it accordingly

Koin module and version:
koin-test:4.0.0

Snippet or Sample project to help reproduce
Add a snippet or even a small sample project to hel reproduce your case.

@AlfredAfutu AlfredAfutu changed the title Running Appium automation junit tests with espresso Running Appium automation junit tests with espresso driver Dec 11, 2024
@AlfredAfutu
Copy link
Author

After moving my koin start code to the attachBaseContext of my Application class, it works. See below:

override fun attachBaseContext(base: Context) {
        startKoin {
            androidContext(base)
            modules(appModules)
        }
        super.attachBaseContext(base)
        MultiDex.install(this)
    } 

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