Selenese goal crashes after executing a test suite
--------------------------------------------------

                 Key: MSELENIUM-13
                 URL: http://jira.codehaus.org/browse/MSELENIUM-13
             Project: Maven 2.x Selenium Plugin
          Issue Type: Bug
          Components: selenese
            Reporter: John Ferguson Smart
            Assignee: Jason Dillon
         Attachments: selenese-goal-fix.patch

I came across this when writing the Selenium chapter for the <a 
href="http://www.javapowertools.com";>Java Power Tools</a> book. The 'selenese' 
goal crashes after executing a test script. 

Using the latest Subversion snapshot, I configured the selenium-maven-plugin as 
follows, to run against an existing JPetStore web application.

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>selenium-maven-plugin</artifactId>
        <executions>
            <execution>
                <id>firefox-testscripts</id>
                <phase>integration-test</phase>
                <goals>
                    <goal>selenese</goal>
                </goals>
                <configuration>
                    <browser>*firefox</browser>
                    <startURL>http://localhost:8080</startURL>
                    <suite>src/test/resources/selenium/TestSuite.html</suite>   
                    
<results>${project.build.directory}/selenium-firefox-results.html</results>
                </configuration>
            </execution>
        </executions>
      </plugin>

Selenium runs the tests against Firefox correctly, but then the build crashes 
with the following message:

[INFO] [selenium:selenese {execution: firefox-testscripts}]
log4j:WARN No appenders could be found for logger (org.mortbay.util.Container).
log4j:WARN Please initialize the log4j system properly.
customProfileDir = C:\DOCUME~1\JOHN~1.EQU\LOCALS~1\Temp\customProfileDir970395
Extracting /customProfileDirCUSTFF to 
C:\DOCUME~1\JOHN~1.EQU\LOCALS~1\Temp\customProfileDir970395
Preparing Firefox profile...
Launching Firefox...
Killing Firefox...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] No such property: result for class: 
org.codehaus.mojo.selenium.SeleneseMojo
[INFO] ------------------------------------------------------------------------
[INFO] Trace
groovy.lang.MissingPropertyException: No such property: result for class: 
org.codehaus.mojo.selenium
.SeleneseMojo
        at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:1396)
        at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2084)
        at gjdk.groovy.lang.MetaClassImpl_GroovyReflector.invoke(Unknown Source)
        at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
        at 
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:560)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:450)
        at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:119)
        at 
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
        at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.jav
a:187)
        at 
org.codehaus.mojo.groovy.GroovyMojoSupport.setProperty(GroovyMojoSupport.groovy)
        at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setGroovyObjectProperty(ScriptBytecodeA
dapter.java:585)
        at 
org.codehaus.mojo.selenium.SeleneseMojo.execute(SeleneseMojo.groovy:132)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor
.java:539)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifec
ycleExecutor.java:480)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.
java:459)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultL
ifecycleExecutor.java:311)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleE
xecutor.java:278)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java
:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22 seconds
[INFO] Finished at: Fri Jun 22 13:49:43 NZST 2007
[INFO] Final Memory: 7M/17M
[INFO] ------------------------------------------------------------------------

The error is apparently an issue of variable scope in the SeleneseMojo.groovy 
file.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to