Put jsdk.jar into your classpath...
Hi thanks for replying my topic.
But I did put my classpath and the error is still there, any other suggestion?
How exactly you tried to execute the test from eclipse ?
I will try to explaing how I do my tests from eclipse.
- i have TestNG plugin installed
- I have the testcases (extensions of SeamTest)
- testng.xml is in the same folder as the testcases
Now if I press right mouse on testng and I choose "Run As TestNGSuite" i get an error:
[RunInfo] Adding method selector: org.testng.internal.XmlMethodSelector@ce5b1c priority: 10
- Rightmouse on testng.xml, RunAs->Run
- Select TestNG and press New
- Select "Suite" radio and browse to the testng.xml
- Go to classpath tab and under "User Entries" add the jars you need.
- Press Run
- All works this way
I hope this will also solve your problem.
Firstable, I want to thank you marius.oancea and admin.
I already solved my problem. The solution was so easy!
If you see this line from the console information:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletContext
it is showing "javax/servlet/ServletContext"
It means servlet.jar is missing in Eclipse's configuration. So I added it as external jars and it fixed the problem. The three tests are runing!
servlet.jar _is the same_ as jsdk.jar
So I didn´t set the correct configuration in Eclipse.
How can I get this jsdk.jar? is it par of jsdk1.5?
I have to tell you I'm totally newbie.
You could use jboss-seam\lib\javax.servlet.jar