Skip to content
This repository has been archived by the owner on Jul 25, 2019. It is now read-only.

resources are not accessible when running tests with JUnit test runner #29

Closed
elliatab opened this issue Dec 10, 2014 · 2 comments
Closed

Comments

@elliatab
Copy link

My test folder contains Robolectric and JUnit tests.
Some of those tests are fetching files from a resource folder located inside the test folder.
When running the test gradle task, the tests can use the files places in resource folder and everything works well.

The same tests fail to find the resource files when running with the JUnit test runner.

I'm not sure if this is an issue with the IDE plugin or with JCAndKSolutions' android-unit-test gradle plugin.
Is it related to JCAndKSolutions/android-unit-test#80 ?

@evant
Copy link
Owner

evant commented Dec 10, 2014

When you say "resources", are you talking "res" or "resources"? The former would be caused by that issue you linked, which you can workaround by running gradle copyDebugTestResources after you change any of your resources. If it's the later, then you are looking at #4.

@elliatab
Copy link
Author

I was talking about "resources" folder so it's the later.
Thanks for pointing to #4 I will follow up with this thread.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants