Hi,
A few developers I have been working with have a habit of using "not fully
qualified" pathnames for directories and files in Junit test cases.
Consequently I have been getting "files not founds" in case I call my Junit build.xml
file from other files in higher level directories, as it searches the included xml
file relative to wherever the classfile is running from.
If I drill down the directory where these test cases are , it seems to pick up the
relative path fine and it works manually.
Can anyone think of a possible way of setting the current working directory to a lower
level directory or any other way of resolving this problem.
Regards,
Viraj Purang
Error Logs
--------------------------------------------------------------------------------
[junit] Tests run: 5, Failures: 0, Errors: 1, Time elapsed: 90.851 sec
[junit] Testcase: M0_PurchaseOrder took 1.643 sec
[junit] Caused an ERROR
[junit] test-files\M0_PurchaseOrder.in.xml (The system cannot find the path
specified)
[junit] java.io.FileNotFoundException: test-files\M0_PurchaseOrder.in.xml (T
he system cannot find the path specified)
[junit] at java.io.FileInputStream.open(Native Method)
[junit] at java.io.FileInputStream.<init>(FileInputStream.java:59)
[junit] at java.io.FileInputStream.<init>(FileInputStream.java:90)