Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 95

...

Warning
titleUnder development

This feature is still being developed and tested, might not work as expected

Integrated Simulator+Marvin test

The agent simulator and marvin are integrated into build steps to help a developer ensure that some simple tests pass before making a commit. The developer environment needs to have Marvin installed for the integration-test to work: These tests are lightweight and should ensure that your checkin doesn't break critical functionality for others working with branch: master.

To run the basic tests. Your build steps should be as follows

Building

Code Block

$ mvn -Pdeveloper -Dsimulator clean install 

Deploy database

Code Block

$ mvn -Pdeveloper -pl developer -Ddeploydb
$ mvn -Pdeveloper -pl developer -Ddeploydb-simulator

Start the management server

Code Block

mvn -pl client jetty:run

(One time installation of Marvin)

The integration test uses marvin and needs it to be installed in your system libraries where python can find them. The developer profile compilation above builds marvin for you and puts the tarball in tools/marvin/dist/Marvin-0.1.0.tar.gz.

To install marvin:

Code Block

easy_install pip #if you need to install pip
pip install Marvin-0.1.0.tar.gz

Alternatively one can install/upgrade marvin using the sync mechanism.

Sync latest APIs

Sometimes you want to synchronize marvin with the new APIs that you have introduced locally or any alterations you may have made to an existing API. In such cases you can sync marvin's libraries as follows. 

Code Block

$ sudo mvn -Pdeveloper,marvin.sync -Dendpoint=localhost -pl :cloud-marvin

This needs sudo privileges since it will call on pip to upgrade the existing marvin installation on your machine. The endpoint is where your management server is running and is exposing the API discovery plugin.

Run the integration test

In a separate session you can use the following commands to bring up an advanced zone with two simulator hypervisors followed by run tests that are 'tagged' to run on the simulator:

Code Block

$ mvn -Pdeveloper,marvin.setup -Dmarvin.config=setup/dev/advanced.cfg -pl :cloud-marvin integration-test #Setup environment
$ mvn -Pdeveloper,marvin.test -Dmarvin.config=setup/dev/advanced.cfg -pl :cloud-marvin integration-test  #Run checkin tests

Instructions on how to roll your own tests into the checkin tests can be found here

Building Specific Versions of CloudStack

...