Dear Users,
I am having issues running the JWebUnit test cases as a jar file on a comand
prompt on Windows. It is working fine in the Eclipse environment on Windows.
Please let me know how to specify testing engine in the classpath, so that
it can be loaded into the registry.
I added: setTestingEngineKey(TestingEngineRegistry.*TESTING_ENGINE_HTMLUNIT
*); to the code after,
I got an error saying:
java.lang.RuntimeException: TestingEngineRegistry contains no testing
engine. Check you put at least one p
lugin in the classpath.
After that, I got the Null Pointer exception.
Please let me know where I am going wrong.
Thank you,
Lakshmi
*My setup method:*
*
public* *void* setUp() {
*super*.setBaseUrl("URL");
setTestingEngineKey(TestingEngineRegistry.*TESTING_ENGINE_HTMLUNIT*);
}
*One of the Test Cases:*
*public* *void* testNRRSLoginPage(){
Properties props = *new* Properties();
*try* {
props.load(*new* FileInputStream("nrrs.properties"));
}
*catch* (IOException e) {
// *TODO* Auto-generated catch block
e.printStackTrace();
}
beginAt(http://some url <http://some%20url/>);
assertTextPresent("Web Services Log-In");
dumpScreen("eAuthScreen");
submit("ibContinue");
assertTextPresent("Password");
setTextField("USER", props.getProperty("user_name"));
setTextField("PASSWORD", props.getProperty("user_password"));
submit("ibLogin");
assertTextPresent("NRRS");
}
*The command I used for executing the jar:*
java -Djavax.net.debug=all -classpath
c:/JWebUnit/lib/jwebunit-core-2.2.jar;c:/JWebUnit/lib/jwebunit-htmlunit-plugin-2.1.jar;c:/JWebUnit/lib/commons-codec
-1.3.jar;c:/JWebUnit/lib/commons-collections-3.2.1.jar;c:/JWebUnit/lib/commons-httpclient-3.1.jar;c:/JWebUnit/lib/co
mmons-io-1.4.jar;c:/JWebUnit/lib/commons-lang-2.4.jar;c:/JWebUnit/lib/commons-logging-1.1.1.jar;c:/JWebUnit/lib/cssp
arser-0.9.5.jar;c:/JWebUnit/lib/htmlunit-2.5.jar;c:/JWebUnit/lib/htmlunit-core-js-2.5.jar;c:/JWebUnit/lib/junit-3.8.
2.jar;c:/JWebUnit/lib/log4j-1.2.13.jar;c:/JWebUnit/lib/nekohtml-1.9.12.jar;c:/JWebUnit/lib/regexp-1.3.jar;c:/JWebUni
t/lib/sac-1.3.jar;c:/JWebUnit/lib/servlet-api-2.4.jar;c:/JWebUnit/lib/slf4j-api-1.5.0.jar;c:/JWebUnit/lib/slf4j-log4
j12-1.5.0.jar;c:/JWebUnit/lib/xalan-2.7.1.jar;c:/JWebUnit/lib/xercesImpl-2.8.1.jar;c:/JWebUnit/lib/xml-apis-1.3.04.j
ar;c:/JWebUnit/lib/dbunit-2.4.7.jar;c:/JWebUnit/nrrs.properties;
NRRSTestSuite.jar tco.test.NRRSExample
*The Error I am getting:*
2) testNRRSLoginPage(gov.usda.fsa.tco.test.NRRSExample)*
java.lang.NullPointerExce
ption
* at
net.sourceforge.jwebunit.junit.WebTester.initializeDialog(WebTester.j
ava:125)
at
net.sourceforge.jwebunit.junit.WebTester.getTestingEngine(WebTester.j
ava:105)
at
net.sourceforge.jwebunit.junit.WebTester.beginAt(WebTester.java:212)
at
net.sourceforge.jwebunit.junit.WebTestCase.beginAt(WebTestCase.java:1
78)
at
gov.usda.fsa.tco.test.NRRSExample.testNRRSLoginPage(NRRSExample.java:
107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at
net.sourceforge.jwebunit.junit.WebTestCase.runBare(WebTestCase.java:7
9)
at gov.usda.fsa.tco.test.NRRSExample.main(NRRSExample.java:34)
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users