You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Gillespie59 <em...@atosorigin.com> on 2011/02/04 14:13:20 UTC

Test Selenium with Tapestry 5.2.4

Hi 

I am some problems since this morning with my Selenium Test. 

I created a Selenium Test Class : 

public class IEPatchSeleniumTest extends SeleniumTestCase{
	
	@Test
	public void testTypingXSSCode() {
		open("/Index");
	}
}

I configured my testng.xml like that : 

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Kawwa Tests" verbose="1">
	<test name="Integration Tests" enabled="true">
		<parameter name="tapestry.web-app-folder" value="src/test/app0"/>
		<packages>
			<package name="net.atos.mm.tapestry.security.integration" />
		</packages>		
	</test>
</suite>


And my Maven-surefire-plugin declaration looks like : 


<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.4.3</version>
    <configuration>
      <suiteXmlFiles>
        <suiteXmlFile>src/test/conf/testng.xml</suiteXmlFile>
      </suiteXmlFiles>
      <argLine>-Xmx500m -XX:MaxPermSize=256m</argLine>
    </configuration>
</plugin>

But when I ran my tests suite, i have got 2 errors : 

        
<test-method status="FAIL" signature="testStartup(org.testng.ITestContext,
org.testng.xml.XmlTest)" name="testStartup" is-config="true" duration-ms="0"
depends-on-groups="beforeStartup" started-at="2011-02-04T13:46:02Z"
finished-at="2011-02-04T13:46:02Z">
  <exception class="org.testng.TestNGException">
    <message>
      <![CDATA[
Method testStartup requires 2 parameters but 0 were supplied in the
@Configuration annotation.]]>
    </message>
    <full-stacktrace>
      <![CDATA[org.testng.TestNGException: 
        Method testStartup requires 2 parameters but 0 were supplied in the
@Configuration annotation.
	at org.testng.internal.Parameters.checkParameterTypes(Parameters.java:147)
	at org.testng.internal.Parameters.createParameters(Parameters.java:96)
	at org.testng.internal.Parameters.createParameters(Parameters.java:289)
	at
org.testng.internal.Parameters.createConfigurationParameters(Parameters.java:70)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:135)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
	at org.testng.TestRunner.beforeRun(TestRunner.java:501)
	at org.testng.TestRunner.run(TestRunner.java:469)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
	at org.testng.SuiteRunner.run(SuiteRunner.java:198)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
	at org.testng.TestNG.run(TestNG.java:708)
	at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
	at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
	at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
]]>
    </full-stacktrace>
  </exception>
</test-method>



<test-method status="FAIL"
signature="indicateTestMethodName(java.lang.reflect.Method)"
name="indicateTestMethodName" is-config="true" duration-ms="0"
started-at="2011-02-04T13:46:02Z" finished-at="2011-02-04T13:46:02Z">
  <params>
    
      <value>
        <![CDATA[public void
net.atos.mm.tapestry.security.integration.IEPatchSeleniumTest.testTypingXSSCode()]]>
      </value>
    
  </params>
  <exception class="java.lang.NullPointerException">
  <full-stacktrace>
    <![CDATA[java.lang.NullPointerException
	at
org.apache.tapestry5.test.SeleniumTestCase.indicateTestMethodName(SeleniumTestCase.java:292)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:427)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:885)
	at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
	at org.testng.TestRunner.runWorkers(TestRunner.java:712)
	at org.testng.TestRunner.privateRun(TestRunner.java:582)
	at org.testng.TestRunner.run(TestRunner.java:477)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
	at org.testng.SuiteRunner.run(SuiteRunner.java:198)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
	at org.testng.TestNG.run(TestNG.java:708)
	at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
	at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
	at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
]]>
            </full-stacktrace>
          </exception>
        </test-method>

Anyone had these problems before?  Which solution did you choose ?

Thanks a lot. 

Manu
-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/Test-Selenium-with-Tapestry-5-2-4-tp3370957p3370957.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Test Selenium with Tapestry 5.2.4

Posted by Gillespie59 <em...@atosorigin.com>.
Thanks Mark

We have just found the solution. I had the wrong testng version in my
pom.xml .


-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/Test-Selenium-with-Tapestry-5-2-4-tp3370957p3374542.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Test Selenium with Tapestry 5.2.4

Posted by Mark <ma...@xeric.net>.
The stack trace looks like it is saying there is a problem with the
testStartup method not receiving all the parameters it needs.

I'm afraid I don't know why.  Perhaps someone else on the list can help.

I do have a suggestion though. When I run into problems with the
testing, I usually try to checkout the Tapestry project and look at
how the Selenium tests are run internally. Often you can find
something similar to what you are trying to do and use it as a model.

Mark



On Mon, Feb 7, 2011 at 3:37 AM, Gillespie59
<em...@atosorigin.com> wrote:
>
> Does anyone have a solution to my problem ?
>
> I really thank to all of you!
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Test-Selenium-with-Tapestry-5-2-4-tp3370957p3373989.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Test Selenium with Tapestry 5.2.4

Posted by Gillespie59 <em...@atosorigin.com>.
Does anyone have a solution to my problem ? 

I really thank to all of you!
-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/Test-Selenium-with-Tapestry-5-2-4-tp3370957p3373989.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org