The Artima Developer Community
Sponsored Link

SuiteRunner Forum
Can SuiteRunner use for HttpUnit?

3 replies on 1 page. Most recent reply: Jul 11, 2003 4:57 PM by Harrison Tsang

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Harrison Tsang

Posts: 6
Nickname: htsang
Registered: Jul, 2003

Can SuiteRunner use for HttpUnit? Posted: Jul 8, 2003 7:29 PM
Reply to this message Reply
Advertisement
Hi,

Has anyone tried to use SuiteRunner to run HttpUnit testcases? Or jWebUnit? Please let me know.

Thanks,
Harrison


Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: Can SuiteRunner use for HttpUnit? Posted: Jul 9, 2003 3:09 PM
Reply to this message Reply
We haven't tried that ourselves. Let us know if you problems or success, or both.

Harrison Tsang

Posts: 6
Nickname: htsang
Registered: Jul, 2003

Re: Can SuiteRunner use for HttpUnit? Posted: Jul 11, 2003 3:40 AM
Reply to this message Reply
When I run the AllTests directly which is a JUnit TestSuite including a WebTestCase which is from jWebUnit and WebTestCase is subclass of JUnit TestCase, it's passed.

However, when I run it by SuiteRunner, I got the error listed below.

BTW, the srj I used is as:
--------------------------
org.suiterunner.Suites=-s com.e2open.e2nd.webtest.E2ndTryWebTest org.suiterunner.Runpath=p "classes /home/htsang/projects/e2nd/lib/junit.jar /home/htsang/projects/e2nd/lib/jwebunit.jar /home/htsang/projects/e2nd/lib/httpunit.jar /home/htsang/projects/e2nd/lib/js.jar /home/htsang/projects/e2nd/lib/nekohtml.jar /home/htsang/projects/e2nd/lib/optional.jar /home/htsang/projects/e2nd/lib/servlet.jar /home/htsang/projects/e2nd/lib/Tidy.jar /home/htsang/projects/e2nd/lib/xercesImpl.jar
/home/htsang/projects/e2nd/lib/xm lapis.jar /home/htsang/suiterunner-1.0beta6/example"
org.suiterunner.Reporters=-r com.artima.examples.reporter.xml.ex1.XMLReporter

Error I got:
------------
<throwable>
java.lang.NoClassDefFoundError: org/mozilla/javascript/NativeFunction
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
at org.mozilla.classfile.DefiningClassLoader.defineClass(Unknown Source)
at org.mozilla.javascript.optimizer.Codegen.compile(Unknown Source)
at org.mozilla.javascript.Context.compile(Unknown Source)
at org.mozilla.javascript.Context.compile(Unknown Source)
at org.mozilla.javascript.Context.compileReader(Unknown Source)
at org.mozilla.javascript.Context.evaluateReader(Unknown Source)
at org.mozilla.javascript.Context.evaluateString(Unknown Source)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.executeScript(Jav aScript.java:115)
at com.meterware.httpunit.scripting.ScriptableDelegate.runScript(ScriptableDelegat e.java:55)
at com.meterware.httpunit.ScriptFilter.getTranslatedScript(ScriptFilter.java:140)
at com.meterware.httpunit.ScriptFilter.endElement(ScriptFilter.java:121)
at org.cyberneko.html.HTMLTagBalancer.endElement(Unknown Source)
at org.cyberneko.html.HTMLScanner$SpecialScanner.scan(Unknown Source)
at org.cyberneko.html.HTMLScanner.scanDocument(Unknown Source)
at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at com.meterware.httpunit.NekoHTMLParser.parse(NekoHTMLParser.java:49)
at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:249)
at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:918)
at com.meterware.httpunit.WebResponse.access$100(WebResponse.java:49)
at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:572)
at com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaScript.java: 390)
at com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80)
at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(JavaScriptE ngineFactory.java:46)
at com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:82)
at com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:184)
at com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:472)
at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:167)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:111)
at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:165)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:111)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
at net.sourceforge.jwebunit.HttpUnitDialog.<init>(Unknown Source)
at net.sourceforge.jwebunit.WebTester.beginAt(Unknown Source)
at net.sourceforge.jwebunit.WebTestCase.beginAt(Unknown Source)
at com.e2open.e2nd.webtest.E2ndTryWebTest.testMainPage(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.suiterunner.JUnitSuite.execute(JUnitSuite.java:180)
at org.suiterunner.SuiteRunnerThread.run(SuiteRunnerThread.java:128)
</throwable>

Why the class is not found? Did I miss anything? Thanks for the help!

Harrison Tsang

Posts: 6
Nickname: htsang
Registered: Jul, 2003

Re: Can SuiteRunner use for HttpUnit? Posted: Jul 11, 2003 4:57 PM
Reply to this message Reply
Never mind. The problem has been resolved by using HttpUnit instead of jWebUnit as well as extends the class to org.suiterunner.Suite instead of JUnit testcase so that all test functions can be run all at once.

Flat View: This topic has 3 replies on 1 page
Topic: How to use Invoker Previous Topic   Next Topic Topic: Automatically calling a SRJ File

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use