Announcement Announcement Module
Collapse
No announcement yet.
Spring Roo 1.2 maven multi-module and selenium tests Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Roo 1.2 maven multi-module and selenium tests

    Hello,

    I have a maven multi-module project with a parent that contains a core (jar) module and a web (war) module.

    I find these two issues when trying the selenium tests:

    * You have to call "mvn selenium:selenese" from the directory of the web module and not from the parent.

    At least in my case because the parent pom.xml defines the core module before the web module:

    Code:
        <modules>
            <module>multi-core</module>
            <module>multi-web</module>
        </modules>
    In this case, I obtain this error:

    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO]
    [INFO] multi-core ...................................... FAILURE [7.624s]
    [INFO] multi-web ....................................... SKIPPED
    [INFO] multi-parent .................................... SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 10.288s
    [INFO] Finished at: Tue Jan 17 11:15:48 CET 2012
    [INFO] Final Memory: 10M/27M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.codehaus.mojo:selenium-maven-plugin:2.2:selen
    ese (default-cli) on project multi-core: The parameters 'startURL', 'suite', '
    browser' for goal org.codehaus.mojo:selenium-maven-plugin:2.2:selenese are missi
    ng or invalid -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
    ch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    * A second call to "selenium test" for the same controller doesn't modify the test-suite.xhtml file, it only adds another entry below.

    I have had to repeat the command because I forgot to specify my custom localhost port (8081 instead of 8080)

    In such a case, you need to manually edit test-suite.xhtml in order to remove the incorrect reference. In my case:

    Code:
                    <td>
                        <a href="http://localhost:8080/multi-web/resources/selenium/test-account.xhtml">Selenium test for AccountController</a>
                    </td>
    Greetings
Working...
X