Question

I use Play Framework 2.0 in the project

I need to pass an argument to my test case com.abc.project.filetest(filetest is a test class) e.g. file path "/var/tmp/1.txt"

But i dont know how to pass this argument to this test method.Can i run this test case with something like test-only com.abc.project.filetest /var/tmp/1.txt ?

Was it helpful?

Solution

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";.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top