Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Checkout the cloudstack-oss project from git:incubator.apache.org
  2. You will need Python - version 2.6 to install marvin but 2.7 to run the tests. Additional modules installed by Marvin - python-paramiko, ipython (optional but useful)mysql-connector-python, nose (optional)
  3. You should install Eclipse and the PyDev plugin. PyDev features auto-completion and some good documentation on how to install it.
  4. On the master branch the 'developer' profile compiles, packages and installs Marvin.
    Code Block
    mvn -P developer -pl: cloud-apidoc, :cloud-marvin
    
  5. The mvn deploy goal will install marvin using pip. If not you may install it by hand by pip or easy_install
    Code Block
    pip install tools/marvin/dist/Marvin-0.1.0.tar.gz
    
Code Block

easy_install tools/marvin/dist/Marvin-0.1.0.tar.gz

QA

If you are a QA engineer you won't need the entire codebase to build marvin.

  1. Jenkins holds artifacts of the marvin builds and you can download it.
  2. The artifact (.tar.gz) is available after the build succeeds. Download it.
  3. On the client machine where you will be writing/running tests from setup the following:
    1. Install python 2.7 (http://www.python.org/download/releases/)
    2. Install setuptools. Follow the instructions for your client machine from here
    3. Install pip. http://www.pip-installer.org/en/latest/installing.html pycrypto on Windows because windows does not bundle gcc to compile pycrypto. 
  4. The Marvin artifact you downloaded can now be installed using pip. Any required python packages will be installed automatically
    Code Block
    pip install
    
    easy_install tools/marvin/dist/Marvin-0.
    *
    1.0.tar.gz
    
  5. To test if the installation was successful get into a python shell
    Code Block
    root@cloud:~/cloudstack-oss/tools/marvin/dist# python
    Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
    [GCC 4.5.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import marvin
    >>> from marvin.cloudstackAPI import *
    
    import imports should happen without reporting errors.

...

  1. The single largest python resource is the python website itself - http://www.python.org
  2. Mark Pilgrim's - "Dive Into Python" - is another great resource. The book is available for free online - http://www.diveintopython.net. Chapter 1- 6 cover a good portion of language basics and Chapter 13 & 14 are essential for anyone doing test script development
  3. To read more about the assert methods the language reference is the ideal place - http://docs.python.org/library/unittest.htmlPython testing cookbook: We have a local copy that can be shared for internal use only. Please email me.

More Examples

Examples of tests with more backend verification and complete integration of suites for network, snapshots, templates etc can be found in the test/integration/smoke directory. Almost all of these test suites use common library wrappers written around the test framework to simplify writing tests. These libraries are part of marvin.integration. You may start using these libraries at your convenience but there's no better way than to write the complete API call yourself to understand its behaviour.

...

For any feedback, typo corrections please email Prasanna SanthanamHappy Testing!the -dev lists