Currently I have standard structure of project:
src
|---androidTest
|-------------------|---java
|----------------------------|---robotium
|----------------------------|---unit
|---main
|---------|---AndroidManifest.xml
|---------|---java
|---------|---res
According to documentation
I've placed unit and integration tests under androidTest folder.
Since instrumentation tests need lot of time, I placed it inside robotium folder(I use Robotium). Inside unti - jUnit tests respectively.
To run all tests I invoke ./gradlew connectedCheck
- it's taking lot of time.
How to to run integration (inside robotium folder) tests and unit tests separately? I want to run these tests using gradle - it's for CI server. For example I want to run integration tests every night and unit tests - every hour..
Thanks!
According to the documentation JUnit
tests should be places under - src/test/java and then you'll be able to switch between test sources
by changing Test Artifact
when selecting Build variants
as shown:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.