• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Espresso-web framework with cordova android project

Nitin Gupta

Lurker
I’m trying to write UI tests for a cordova hybrid app using espresso-web framework[1]. Even after mentioning the required dependencies in build.gradle, the tests are not running and the build is erroring out with the dependency packages not found. But when I’m trying out the same thing with a standalone android studio project (non- cordova), I’m able to succeed. I think it has something to do with the difference in the default project structure of cordova with respect to that of Android Studio. The classes in the packages under the androidTest folder are not being recognized as Test Classes in the cordova project. How can I integrate espresso-web framework in a cordova android project successfully?

errors:
Error:(20, 47) error: package android.support.test.espresso.web.sugar does not exist
Error:(23, 51) error: package android.support.test.espresso.web.webdriver does not exist
Error:(24, 51) error: package android.support.test.espresso.web.webdriver does not exist
Error:(25, 36) error: package android.support.test.filters does not exist
Error:(26, 33) error: package android.support.test.rule does not exist
Error:(27, 35) error: package android.support.test.runner does not exist
Error:(30, 24) error: package org.junit.runner does not exist
Error:(50, 2) error: cannot find symbol class LargeTest
Error:(51, 2) error: cannot find symbol class RunWith
Error:Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
 
If you don't get any response to your question here, then you may want to ask the question on StackOverflow.
Cordova is a specialised form of app development, so probably not many people reading here have much experience of it.
 
Back
Top Bottom