[openstack-dev] [Openstack-operators] [all][qa][gabbi][rally][tempest] Extend "rally verfiy" to unify work with Gabbi, Tempest and all in-tree functional tests

Boris Pavlovic boris at pavlovic.me
Mon Mar 9 14:29:16 UTC 2015


Davanum,


1. Suppose a project say Nova wants to enable this Rally Integration
> for its functional tests, what does that project have to do? (other
> than the existing well defined tox targets)


Actually project by it self shouldn't do anything.

The whole work regarding to integration belongs to Infra and Rally code.
In Infra we should add job that runs few commands like:

  rally deployment use devstack   # this is already predefined in rally
devstack plugin
  rally verify nova start                  # ...
  rally verify nova results --html /files-that-will-be-plubished/result.html
  rally verify nova results --json /files-that-will-be-plubished/result.json
  rally verify nova check_status            # return 1 if some of tests
failed

In Rally we should add auto generation on nova .conf file, based on
OpenStack credentials.

The whole idea is to make common, short and simple set of command that is
easy to integrate in gates and use locally.

2 more things:
  1) We are going to support running specific releases of Rally in gates
(so projects won't depend on Rally master)
  2) Rally has own DB where it stores full results of rally verify runs, if
we share this DB between different runs, we can collect all results of all
functional test runs in one place, and in future analyze (like generating
graphs failures_of_test_x_per/week)

2. Is there a "test" project with Gabbi based tests that you know of?


As far as I know Ceilometer is first path-finder here:
https://github.com/openstack/ceilometer/tree/master/ceilometer/tests/gabbi


3. What changes if any are needed in Gabbi to make this happen?


More or less no changes. It can be run via testr/nose that is enough.


Best regards,
Boris Pavlovic



On Mon, Mar 9, 2015 at 5:05 PM, Davanum Srinivas <davanum at gmail.com> wrote:

> Boris,
>
> 1. Suppose a project say Nova wants to enable this Rally Integration
> for its functional tests, what does that project have to do? (other
> than the existing well defined tox targets)
> 2. Is there a "test" project with Gabbi based tests that you know of?
> 3. What changes if any are needed in Gabbi to make this happen?
>
> Guessing going forward, we can setup weekly Rally jobs against
> different projects so we can compare performance over time etc?
>
> thanks,
> dims
>
>
> On Fri, Mar 6, 2015 at 6:47 PM, Boris Pavlovic <boris at pavlovic.me> wrote:
> > Hi stackers,
> >
> > Intro (Gabbi)
> > -------------------------
> >
> > Gabbi is amazing tool that allows you to describe in human readable way
> what
> > API requests to execute and what you are expecting as a result. It
> > Simplifies a lot API testing.
> >
> > It's based on unittest so it can be easily run using tox/tester/nose and
> so
> > on..
> >
> >
> > Intro (Functional in-tree tests)
> > ---------------------------------------
> >
> > Keeping all tests in one project like Tempest, that is maintained by one
> > team, was not enough scalable approach. To scale things, projects started
> > maintaining their own functional tests in their own tree. This resolves
> > scale issues and now new features can be merged with functional tests.
> >
> >
> > The Problem
> > -----------------
> >
> > As far as you know there are a lot of OpenStack projects with their own
> > functional tests / gabbi tests in tree. It becomes hard for developers,
> > devops and operators to work with them. (Like it's hard to install
> OpenStack
> > by hands without DevStack. )
> >
> > Usually, end users are choosing 2 approach:
> > 1) Make own tests
> > 2) Make scripts that runs somehow all these tests
> >
> >
> > Small Intro (Rally)
> > ------------------------
> >
> > Rally idea is to make tool that simplifies all kinds of testing of
> multiple
> > OpenStack clouds.
> > It should be for human and as well simple to integrated in CI/CD process.
> >
> > Rally automates all testing process (managing testing systems / running
> > tests / storing results / working with results)
> >
> > At this moment there are 3 major parts:
> > *) deployment  - manages OpenStack deployments (creates or uses existing)
> > *) verify - manages fully tempest (installs/configurtion/running/parsing
> > output/storing results/working with results)
> > *) task - own rally testing framework that allows you to do all kinds of
> > testing functional/load/performance/scale/load/volume and others.
> >
> > I can say that "rally verify" command that automates work with Tempest is
> > very popular. More details here:
> >
> https://www.mirantis.com/blog/rally-openstack-tempest-testing-made-simpler/
> >
> >
> > Proposal to make the life better
> > ------------------------------------------
> >
> > Recently Yair Fried and Prasanth Anbalagan proposed a great idea to
> extend
> > "rally verify" command to add ability to run in-tree functional tests in
> the
> > same way as tempest.
> >
> > In other words to have next syntax:  "rally verify <project> <command>"
> >
> > Something like this:
> >
> >   rally verify swift start   # 1. Check is installed swift for active
> rally
> > deployment.
> >                                      # IF NO:
> >                                      #   Downloads from default (our
> > specified place) swift
> >                                      #   Switch to master or specified
> tag
> >                                      #   Installs in venv swift
> >                                      #   Configure swift functional test
> > config for active deployment
> >                                      # 2. Run swift functional test
> >                                      # 3. Parse subunit output and store
> to
> > Rally DB (for future work)
> >
> >   rally verify swift list                                  # List all
> swift
> > verification runs
> >   rally verify swift show UUID                    # Shows results
> >   rally verify swift compare UUID1 UUID2 # Compare results of two runs
> >
> >
> > Why it makes sense?
> > ----------------------------
> >
> > 1) Unification of testing process.
> >
> > There is a simple to learn set of command "rally verify <project> <cmd>"
> > that works for all projects in the same way.  End users like such
> things=)
> >
> > 2) Simplification of testing process.
> >
> > "rally verify <project> start" - will automate all steps, so you won't
> need
> > to install project manually, and configure functional test, collect and
> > somewhere store results.
> >
> > 3) Avoiding duplication of effort
> >
> > We don't need to implement part of "rally verify" functionality in every
> > project.
> > It is better to implement it in one place with plugin support. Adding new
> > project means implementing new plugin (in most case it will be just
> > functional test conf generation)
> >
> > 4) Reusing already existing code
> >
> > Most of the code that we need is already implemented in Rally,
> > it requires just small refactoring and generalization.
> >
> >
> > Thoughts?
> >
> >
> > Best regards,
> > Boris Pavlovic
> >
> >
> > _______________________________________________
> > OpenStack-operators mailing list
> > OpenStack-operators at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
> >
>
>
>
> --
> Davanum Srinivas :: https://twitter.com/dims
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150309/fa644693/attachment.html>


More information about the OpenStack-dev mailing list