AFAIK this is not possible and I would not recommend this.
What you could do instead is create a directory, say resources
, under the test
directory where you have your external files that you want to use in your tests. Then from your tests point to your files relatively, like String fileName ="test/resources/1.txt";
.