cancel
Showing results for 
Search instead for 
Did you mean: 

How do I run WebDriver tests against an older 5.6-SNAPSHOT version?

jadtn_
Champ on-the-rise
Champ on-the-rise

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!

1 ACCEPTED ANSWER

Julien_Carsique
Elite Collaborator
Elite Collaborator

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.

View answer in original post

5 REPLIES 5

Julien_Carsique
Elite Collaborator
Elite Collaborator

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.

That will most likely work. Thanks!

Florent_Guillau
World-Class Innovator
World-Class Innovator

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.

Cool. This was the next thing I needed, and I was starting to spend time figuring out how to do it.

The command you specified fails with "No target specified" for nuxeo-distribution-dm/ftest/webdriver. I've asked a related question here