How do I run WebDriver tests against an older 5.6-SNAPSHOT version?
I'm trying to compare runs of WebDriver in different snapshots against each other. So I want to run the tests using an older snapshot (whether hosted on the public maven repos or in my own local repo).
To run the WebDriver tests, here's what I do:
$ git clone http://github.com/nuxeo/nuxeo-distribution.git
$ git checkout -b 5.6-SNAPSHOT origin/5.6-SNAPSHOT
$ cd nuxeo-distribtution/nuxeo-distribution-dm/ftest/webdriver/
$ mvn verify
Magic happens, and the WebDriver tests start running. But every day I execute the command, it will pull that day's snapshot. Is there anyway I can run yesterday's snapshot or the one from last week? Thanks!
Not without rebuilding the whole source code. “SNAPSHOT” is a Maven keyword which always point to the latest available snapshot artifact.
You could use a different Maven repository (~/.m2/repository
by default) every day. That way, each repository will contain the artifacts from the wanted day. Then, if you want to rerun the tests against a previous day, you will have to run Maven in offline mode (-o
) or to set the snapshots updatePolicy to “never” in your Maven settings (~/.m2/settings.xml
), and to make Maven use the wanted repository using an alias or with the settings property localRepository
.
What is the purpose of the comparison? Note the 5.6-SNAPSHOT artifacts are made publicly available only if the tests run fine.
You can run the tests against a Nuxeo instance that you've started yourself using:
mvn -o test-compile
mvn -o org.apache.maven.plugins:maven-failsafe-plugin:integration-test -Dlog4j.configuration=src/main/resources/log4j.xml -Dnuxeo.log.dir=target
This doc has been added to nuxeo-distribution-dm/ftest/webdriver/README.md
.
I thought it would be better to put it in a separate thread for users with the same issue.