Hi
Actually, I have those plugins in
the classpath.
Thanks
junandersonlee
2006-07-16
发件人:
[EMAIL PROTECTED]
发送时间:
2006-07-16 06:56:25
收件人:
[email protected]
抄送:
主题: Jwebunit-development
Digest, Vol 2, Issue 11
Send Jwebunit-development mailing list submissions
to
To subscribe or unsubscribe via the
World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/jwebunit-development
or, via email, send a message with
subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the
list at
[EMAIL PROTECTED]
When replying, please edit your Subject
line so it is more specific
than "Re: Contents of Jwebunit-development
digest..."
Today's Topics:
1. A runnable example
(junandersonlee)
2. help for a runnable
sample (junandersonlee)
3. Re : help for a
runnable sample (Julien HENRY)
----------------------------------------------------------------------
Message: 1
Date: Sat, 15 Jul 2006 17:58:14
-0800
From: "junandersonlee" <[EMAIL PROTECTED] >
Subject: [Jwebunit-development] A runnable
example
To: "jwebunit-development"
Message-ID: <[EMAIL PROTECTED] >
Content-Type: text/plain; charset="gb2312"
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
Andy
2006-07-15
-------------- next part --------------
An HTML attachment was scrubbed...
Message: 3
Date: Sun, 16 Jul 2006 13:29:32 +0000
(GMT)
From: Julien HENRY <[EMAIL PROTECTED] >
Subject: [Jwebunit-development] Re : help
for a runnable sample
To: JWebUnit Development mail list
Message-ID:
<[EMAIL PROTECTED] >
Content-Type: text/plain; charset="utf-8"
Hi,
It seems you don't have
jwebunit-htmlunit-plugin in your classpath.
++
Julien
_______________________________________________
Jwebunit-development mailing list
https://lists.sourceforge.net/lists/listinfo/jwebunit-development
End of Jwebunit-development Digest, Vol 2,
Issue 11
***************************************************
------------------------------------------------------------------------- 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
