Question

I have created Junit tests on my windows machine. I want to deploy these tests on a linux server. I have put the code in the correct directory and the necessary jar files in the classpath on the server. Locally the junit test runs fine, but when I want to compile on the linux server e.g. the test initiateDeliverProcess1FileTest i get:

InitiateDeliveryProcess1FileTest.java:1029: cannot find symbol
symbol  : method fail(java.lang.String)
location: class com.hp.bes.junit.systest.InitiateDeliveryProcess1FileTest
                            fail("test fail - There should be " + numberOfFiles
                            ^

What can I do to make it compile?

update 1:

  • I have junit-4.11.jar in classpath
Was it helpful?

Solution

I had a similar problem. I was able to get it to work by adding

Assert.fail("My Message");

Instead of just

fail("My Message");

I hope this helps.

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