Hi,

It seems you don't have jwebunit-htmlunit-plugin in your classpath.

++
Julien

----- Message d'origine ----
De : junandersonlee <[EMAIL PROTECTED]>
À : jwebunit-development <[email protected]>
Envoyé le : Dimanche, 16 Juillet 2006, 7h39mn 05s
Objet : [Jwebunit-development] help for a runnable sample

Hi
 
I am new to jwebunit, and I had trouble to get jwebunit examples running on my machine.
I am using Eclipse and have Junit and Jwebunit configured. But when I try to run the example, there are always errors.
 
for example
I run the following example by using ECLIPSE -> RUN ->JUNIT TEST
 
import net.sourceforge.jwebunit.WebTestCase;
import net.sourceforge.jwebunit.WebTester;
import net.sourceforge.jwebunit.TestingEngineRegistry;
 
/**
 * @author Andy
 *
 */
public class GoogleTest extends WebTestCase {
 static String searchLink = "";
 //private WebTester tester = null;
 
 public GoogleTest(String name) {
  super(name);
        //setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
  //setTester();
 }
 
 
 
 public static void main(String[] args) {
  searchLink = args[0];
  //junit.textui.TestRunner.run(new WebTester(GoogleTest.class));
 }
 
 public void setUp() throws Exception {
     setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
        getTestContext().setBaseUrl("
http://google.com");
    }
 
 public void testMainPageLinks() {
        beginAt("/mainPage");
        assertLinkPresent("addLink");
        clickLink("addLink");
        assertTitleEquals("Widget Add Page");
        beginAt("/mainPage");
        assertLinkPresentWithText("Edit Widget");
        clickLinkWithText("Edit Widget");
        assertTitleEquals("Widget Edit Page");
    }
 
}
 
GOT FOLLOWING ERROR
 
 
java.lang.NullPointerException
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Unknown Source)
 at net.sourceforge.jwebunit.TestingEngineRegistry.getTestingEngineClass(TestingEngineRegistry.java:55)
 at net.sourceforge.jwebunit.WebTester.initializeDialog(WebTester.java:74)
 at net.sourceforge.jwebunit.WebTester.getDialog(WebTester.java:59)
 at net.sourceforge.jwebunit.WebTester.closeBrowser(WebTester.java:103)
 at net.sourceforge.jwebunit.WebTestCase.closeBrowser(WebTestCase.java:92)
 at net.sourceforge.jwebunit.WebTestCase.tearDown(WebTestCase.java:36)
 at junit.framework.TestCase.runBare(TestCase.java:130)
 at net.sourceforge.jwebunit.WebTestCase.runBare(WebTestCase.java:50)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
 
So I am wondering if anybody can help me out and provide some clue to get started.
 
Thanks a lot
 
 

junandersonlee
2006-07-15

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to