How do I need to do to run nuxeo's Selenium/Webdriver tests?

Hi, I've been trying to run nuxeo's Selenium and WebDriver tests for the past few days and have not gotten anywhere. Here's what I have done:

$ git clone git://
$ cd nuxeo
$ python release-5.5

then I added the nuxeo repositories to a few pom.xml files that were complaining, then I did:

$ mvn clean install

that took a while to complete. Then I set the database's environment variables, and then:

$ cd nuxeo/nuxeo-distribution/nuxeo-distribution-tomcat-tests
$ mvn integration-test -Pmysql

but then maven hangs at running ITTests, and nothing happens for a long time. I've looked at a number of various places for running Selenium tests for nuxeo, and I tried all the commands they had listed to no avail.

Please help!

0 votes

1 answers




then I added the nuxeo repositories to a few pom.xml files that were complaining

You should not have to do that. Could you provide some details about those errors?
Also, you don't need to build the whole Nuxeo source tree in order run only some modules: the missing artifacts are downloaded by Maven.

Anyway, you ended at the right place: nuxeo-distribution-tomcat-tests is running a few WebDriver tests. Another interesting module is nuxeo-distribution-dm/ftest/selenium which is running the main Selenium suites.
Give a look at its README, usually mvn verify is enough for running the tests. Later, you can customize the tests using various properties and profiles.

You must know there are some issues between Selenium/WebDriver and Firefox/Chrome depending on their respective versions. In 5.5, some tests were working better with Firefox 3.6 whereas others (the newest WebDriver tests) required Firefox > 5. Since 5.5, we started migrating all tests to WebDriver, using the latest driver working with newer Firefox versions.

The migration from Selenium to WebDriver is still a work in progress but we already did some refactoring and cleanup in the involved modules. We also slightly improved the documentation and README files. Maybe you should first try with the 5.6-SNAPSHOT branch and look at the modules' listing. I would recommend to start with the Selenium and WebDriver tests for DM.

1 votes

Thanks for the pointers Julien! I finally got it working. I checked out nuxeo-distribution, and then:

$ cd nuxeo-distribution/nuxeo-distribution-dm/ftest/selenium
$ mvn verify

And that got it to work.

Since I didn't specify any databases, what is Nuxeo using by default? Is it using HSQLDB?

For the pom modifications (this was release-5.5), I had to modify the following:


The errors looked like the following:

[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   The project org.nuxeo.ecm.platform:nuxeo-platform-localconfiguration-web:5.5 (C:\Users\jnaous\workspace\nuxeo\nuxeo-features\nuxeo-platform-localconfiguration\nuxeo-platform-localconfiguration-web\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Failure to find org.nuxeo.ecm.platform:nuxeo-features-parent:pom:5.5 in was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 5, column 11 -> [Help 2]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
[ERROR] [Help 2]

When not activating the customdb profile (i.e. -Pcustomdb,pgsql), then the default H2 database is used. FYI, that's managed by the integration nuxeo-distribution-tools (Ant-like) script and the DatabaseHelper class; see the README file for a list of configurable properties.

Thanks for the feedback about the wrong POM files. I fixed the nuxeo-platform-localconfiguration/nuxeo-platform-localconfiguration-web/pom.xml parent POM. For nuxeo-launcher/pom.xml and nuxeo-functional-tests/pom.xml, Maven should have found org.nuxeo:nuxeo-ecm in your local repository, that's strange. Are you using Maven 3? Nuxeo distribution is only compliant with Maven 2.2.1. Both versions have different behavior, in particular with parent.relativePath.


Yeah, I may have been using mvn3 when I saw the errors, but have switched to mvn2 since.