Hello,

I assume you checked that jwebunit-htmlunit-plugin is in the classpath ?

I only know that current implementation of TestingEngineRegistry is very bad. I will try to clean it this WE, and publish a snapshot you can try to know if it solves your problem.

++

Julien


----- Message d'origine ----
De : Tom Ziemer <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Vendredi, 4 Août 2006, 11h08mn 41s
Objet : [Jwebunit-users] Concurrent testing problem

Hi,

I have just started using jWebUnit yet I am already convinced that it's
a great tool since it's really easy to use and does exactly what I want.

Having said that, unfortunately I have a little problem. Some of my
tests have to run concurrently, yet this causes exceptions. The odd
thing is, it's not always happening, yet quite often.

Basically I have a number of threads that use a webTester to login to a
web application and then click on some links. Nothing fancy. The problem
seems to appear when accessing the TestingEngine:

java.lang.NullPointerException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    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.beginAt(WebTester.java:152)
    at
com.test.ConcurrentAccessTest$DemoUserThread.runTest(ConcurrentAccessTest.java:54)
    at
net.sourceforge.groboutils.junit.v1.TestRunnable.run(TestRunnable.java:154)
    at java.lang.Thread.run(Thread.java:595)


Here a snip of my testing code (around line 54):

45: public DemoUserThread(String[] user){
46:            this.user = user;
47:            this.active = true;
48:            this.webTester = new WebTester();
49:
this.webTester.setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
50:        this.webTester.getTestContext().setBaseUrl(TestingConstants.BASE_URL);
51:        }
52:        
53:        public void runTest(){
54:            this.webTester.beginAt("/login.jsp");
55:            // fill in info
56:        this.webTester.setTextField("loginForm:accountInput", this.user[0]);

Any idea why this is happening?

Regards,
Tom

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to