You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

We segregated current Integration test cases in to two categories and tagged them as below:

  1. "selfservice"  : tests which can  run on simulator
  2. "provisioning": tests which requires real hardware.

From developers' point of view, whenever they do a change on their local environment, they can now easily validate the changes by running "selfservice" tests before check-in the change using simulator. They can run these tests locally without requiring any hardware.  This will help them to make sure that CS code is not broken with their changes, by running basic integration tests. 


Below are steps to achieve the same: should get the simulator up and running on your local dev environment , generate a datacenter and run tests.

Step1: Get the simulator up and running on your local environment using below mvn commands. 

    mvn -Pdeveloper -Dsimulator clean install -Dmaven.test.skip=true
    mvn -Pdeveloper -pl developer -Ddeploydb
    mvn -Pdeveloper -pl developer -Ddeploydb-simulator
    mvn -pl client jetty:run -Dsimulator

Step2: Create the Data Center using marvin by running the command below:

    python tools/marvin/marvin/deployDataCenter.py -i setup/dev/advanced.cfg

Step3:  Now run "selfservice" tests on the created Data Center, using nose command below. Before running tests, mention a new  log folder path for "LogFolderPath", under config file EX: <setup/dev/advanced.cfg>. 

    nosetests-2.7 --with-marvin --marvin-config=<path_to_marvin_config. EX: setup/dev/advanced.cfg>   --load -w <path_to_sanity_test_cases EX: /root/cloudstack/test/integration/smoke/> -a tags=advanced -a tags=selfservice.

All logs post run are available under the mentioned LogFolderPath for your analysis.

 
 

Note: 

  1. You should have marvin installed on your local environment. This is required for deploying Data Center and running tests. To install marvin and use, follow the link. This is one time setup.
    Marvin - Testing with Python
  2. The segregation of test cases is currently available in master and 4.4 branch.
  3. Any issues you see while running simulator,  you can log a bug for that branch in ASF jira, selecting component "simulator" against CS.

  • No labels