I have a maven project where I run automated tests only. Under
src/test/resources
I have a folder
books
which contains 2 xml files
(src/test/resources/books/1.xml,
src/test/resources/books/2.xml).
During my test I check how many files I have in folder
'books'
int filesNumber = new File(".\\src\\test\\resources\\books").listFiles().length;
Everything works fine localy on my machine when I run my test with maven
"clean test"
The problem starts when I run my tests on TeamCity server because I get a
NullPointer
when it looks for 'books' folder. It just can't find it. Can someone tell me why? Maybe I shouldn't put this folder to the resources directory? If yes then which directory I should use..