Issue
I have set up travis and robolectric for android testing. All my test were working fine on both local machine and travis. But I had to add test were I had to use android assets folder under test folder.
However for this my test are failing on travis but running perfectly well on my local machine.
I had pinpointed the reason being test-> assets
folder not being created on travis server.
My the build->intermediates
folder on local machine is like
|__build
||__intermediates
|||__app
||||__debug
|||__test
||||__app
|||||__debug
However on the travis server build->intermediates
folder is like
|__build
||__intermediates
|||__app
||||__debug
Its missing build->intermediates->test
folder.
What could be the reason for this? How to fix it?
Solution
I finally managed to run test which were using test-> assets
folder by changing my script.
The issue was that all other tests ran without running gradle assembleTest
task . Running them with just gradle testAppDebug
would work.
But for using test/assets
I had to modify my test script to
./gradlew clean
./gradlew assembleTest
./gradlew test --info
And it all worked well.
Answered By - vKashyap
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.