1 / 12

Marvin - Automation for CloudStack Umesh Kute – SunGard Availability Services

Internal Use Only. Marvin - Automation for CloudStack Umesh Kute – SunGard Availability Services. Agenda. What is Marvin? Business use of Marvin Setup Marvin Components Libraries Demo Anatomy of test It can be still be better… Q & A. What is Marvin?. Test framework for CloudStack

varian
Download Presentation

Marvin - Automation for CloudStack Umesh Kute – SunGard Availability Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Internal Use Only Marvin - Automation for CloudStackUmesh Kute – SunGard Availability Services

  2. Agenda • What is Marvin? • Business use of Marvin • Setup Marvin • Components • Libraries • Demo • Anatomy of test • It can be still be better… • Q & A

  3. What is Marvin? • Test framework for CloudStack • Python unittest module • 2 Types of test suites (at present): • Smoke test (approximately 35 test suites) • Component test (approximately 80 test suites) • Also used for performance test • Infrastructure in place? • Infrastructure not in place? (simulator, hypervisor plugin) • How it is organized? • Whenever a new feature comes in, we need to ensure that basic sanity tests are in place.

  4. Business Use of Marvin (Why/Where to use Marvin) • Smoke test and regression test • Build verification testing (integrated with jenkins) • SunGard Public Cloud (lab certification)

  5. Setup Marvin • Build • mvn -P developer -pl :cloud-marvin • Install • pip install tools/marvin/dist/Marvin-0.1.0.tar.gz • Port 8096 is open in cloudstack • Dependencies: • python 2.7 (unittest) • python-paramiko (ssh) • mysql-connector-python (DB) • Nose (test framework to run tests) • should-dsl (asserts) https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python#Marvin-TestingwithPython-Installation

  6. Directory Structure • /cloudstack/test/integration/smoke • Smoke test suites • /cloudstack/test/integration/component • Integration test suites • /cloudstack/tools/marvin/marvin/cloudstackAPI • Cloudstack API’s which marvin uses • /usr/local/lib/python2.7/site-packages/marvin/integration/lib/common.py • Commonly used functions • CloudStack APIs • /usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI

  7. Components • Deploy • deployDataCenter.py • Test Scripts • test*.py • Test Runner • nose • Logging • python logger (logging)

  8. Libraries • cloudstackTestCase • Provides the tests with apiclient and dbclient using which calls can be made to the API server • integration.lib.base.py • Contains all the resources one can manipulate in cloudstack. E.g. virtualmachine, zones, accounts, VPC, etc. • Modules which has all the cloudstack api defined. E.g. network CRUD • Utils • Common utility/housekeeping/verification function. E.g. random string generator, ssh, cleanup • Common.py • Simple methods that are commonly required for most of the tests. E.g. template – get_template, zone – get_zone

  9. Demo • Test_deploy_vm.py

  10. Anatomy of test

  11. It can still be better… • Data and test are closely tied up. Duplicated in each test, can go as separate file • On exception, cleanup of resources is not done • Good if you deploy datacenter using Marvin… (Discussion is going on with community)

  12. Q & A

More Related