Skip to content

Port sideflow.js to also support Maven Selenium Plugin's selenese goal #12

@paulbors

Description

@paulbors

When the sideflow.js is added to the user-extensions.js for the Selenium Maven Plugin to run the Selenese HTML test suit, the script breaks inside initialiseLabels() as the testCase is not defined in this environment.

For Selenium Maven Plugin documentation see:
http://mojo.codehaus.org/selenium-maven-plugin/selenese-mojo.html

A code snippet I've been using in my POM:

...
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>selenium-maven-plugin</artifactId>
    <version>${maven.selenium.plugin.version}</version>
    <configuration>
        <userExtensions>src/test/selenium/user-extensions.js</userExtensions>
        <browser>*firefox</browser>
        <startURL>http://localhost:${maven.tomcat.port}</startURL>
        <suite>${basedir}/target/test-classes/selenium/DesktopTests.html</suite>
    </configuration>
    <executions>
        <!-- Sanity tests and also screenshots -->
        <execution>
            <id>run-selenium-tests-ff-desktop-sanity</id>
            <phase>integration-test</phase>
            <configuration>
                <browser>*firefox</browser>
                <multiWindow>true</multiWindow>
                <port>${maven.selenium.plugin.port}</port>
                <startURL>http://localhost:${maven.tomcat.port}</startURL>
                <suite>${basedir}/target/test-classes/selenium/DesktopScreenshots.html</suite>
                <results>${basedir}/target/selenium/results-firefox-desktop-screenshots-TestSuite.html</results>
            </configuration>
            <goals>
                <goal>selenese</goal>
            </goals>
        </execution>
        ...
     </executions>
</plugin>
...

I'm researching into a fix and will provide a PR if I find out...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions