Hi..
i am trying a JUnit Framework (JWebUnit) in my project and this link is my reference JWebUnit - Quick Start.
but when i try code in snippet 1&2, exactly in this part (see code below) :
@Test
public void test1() {
beginAt("home.xhtml");
/*
assertTitleEquals("Login");
setTextField("username", "test");
setTextField("password", "test123");
submit();
assertTitleEquals("Welcome, test!");
*/
}
i've got an error message like this :
java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.startsWithIgno reCase(Ljava/lang/String;Ljava/lang/String;)Z
at com.gargoylesoftware.htmlunit.util.URLCreator$URLC reatorStandard.toUrlUnsafeClassic(URLCreator.java: 66)
at com.gargoylesoftware.htmlunit.util.UrlUtils.toUrlU nsafe(UrlUtils.java:193)
at com.gargoylesoftware.htmlunit.util.UrlUtils.toUrlS afe(UrlUtils.java:171)
at com.gargoylesoftware.htmlunit.WebClient.<clinit>(W ebClient.java:162)
at net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingE ngineImpl.createWebClient(HtmlUnitTestingEngineImp l.java:804)
at net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingE ngineImpl.initWebClient(HtmlUnitTestingEngineImpl. java:813)
at net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingE ngineImpl.beginAt(HtmlUnitTestingEngineImpl.java:2 14)
at net.sourceforge.jwebunit.junit.WebTester.beginAt(WebTester.java:226)
at id.co.myproject.core.webapp.LoginTestCase.test1(Lo ginTestCase.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at org.junit.internal.runners.TestMethod.invoke(TestM ethod.java:59)
at org.junit.internal.runners.MethodRoadie.runTestMet hod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(Meth odRoadie.java:79)
at org.junit.internal.runners.MethodRoadie.runBefores ThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(Me thodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(Method Roadie.java:42)
at org.junit.internal.runners.JUnit4ClassRunner.invok eTestMethod(JUnit4ClassRunner.java:88)
at org.junit.internal.runners.JUnit4ClassRunner.runMe thods(JUnit4ClassRunner.java:51)
at org.junit.internal.runners.JUnit4ClassRunner$1.run (JUnit4ClassRunner.java:44)
at org.junit.internal.runners.ClassRoadie.runUnprotec ted(ClassRoadie.java:27)
at org.junit.internal.runners.ClassRoadie.runProtecte d(ClassRoadie.java:37)
at org.junit.internal.runners.JUnit4ClassRunner.run(J Unit4ClassRunner.java:42)
at org.junit.runner.JUnitCore.run(JUnitCore.java:130)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunn erWithArgs(JUnit4IdeaTestRunner.java:71)
at com.intellij.rt.execution.junit.JUnitStarter.prepa reStreamsAndStart(JUnitStarter.java:202)
at com.intellij.rt.execution.junit.JUnitStarter.main( JUnitStarter.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main (AppMain.java:120)
may anybody help me ?