Hi, I have downloaded jWebUnit 1.2 and unzipped the jwebunit-1.2.zip in a local directory. I have added path of all jar files in \jwebunit-1.2\lib directory and jwebunit-1.2.jar in classpath environment variable, but getting error while running my java program.
Here is my java file - import junit.framework.TestCase; import net.sourceforge.jwebunit.*; class ExampleWebTestCase { public static WebTestCase tc = new WebTestCase ("Test1"); public static void main(String args[]) { tc.getTestContext().setBaseUrl("http://localhost:8081/kelev"); System.out.println("ONE"); tc.beginAt ("/php/home.php"); System.out.println("TWO"); tc.assertTitleEquals ("Kelev Investments"); } } Result of - java ExampleWebTestCase ONE Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xerces/uti l/ParserConfigurationSettings at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.meterware.httpunit.parsing.HTMLParserFactory.loadParserIfSupporte d(HTMLParserFactory.java:182) at com.meterware.httpunit.parsing.HTMLParserFactory.<clinit>(HTMLParserF actory.java:194) at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:244) at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:1 014) at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:6 11) at com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaSc ript.java:424) at com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80) at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(J avaScriptEngineFactory.java:46) at com.meterware.httpunit.FrameHolder.<init>(FrameHolder.java:44) at com.meterware.httpunit.WebWindow.<init>(WebWindow.java:218) at com.meterware.httpunit.WebClient.<init>(WebClient.java:50) at com.meterware.httpunit.WebConversation.<init>(WebConversation.java:46 ) at net.sourceforge.jwebunit.TestContext.getWebClient(TestContext.java:26 0) at net.sourceforge.jwebunit.HttpUnitDialog.initWebClient(HttpUnitDialog. java:55) at net.sourceforge.jwebunit.HttpUnitDialog.<init>(HttpUnitDialog.java:46 ) at net.sourceforge.jwebunit.WebTester.beginAt(WebTester.java:55) at net.sourceforge.jwebunit.WebTestCase.beginAt(WebTestCase.java:46) at ExampleWebTestCase.main(ExampleWebTestCase.java:13) Here is the information of my m/c configuration - I am using Windows XP SP2 with apache server & PHP installed. JDK version j2sdk1.4.2_08 is installed on my m/c. My web application (http://localhost:8081/kelev) uses apache server & php. Thanks -Devyani
<<attachment: winmail.dat>>