blob: c1dcccc0b1b8bcad9ff9122655ada18d8b6c583e [file] [log] [blame]
Matthew Treinisha9aef872014-07-25 16:03:08 -04001.. _scenario_field_guide:
2
Masayuki Igawac268dd62013-09-18 00:51:05 +09003Tempest Field Guide to Scenario tests
4=====================================
Sean Dague6dbc6da2013-05-08 17:49:46 -04005
6
7What are these tests?
Attila Fazekas23fdf1d2013-06-09 16:35:23 +02008---------------------
Sean Dague6dbc6da2013-05-08 17:49:46 -04009
10Scenario tests are "through path" tests of OpenStack
11function. Complicated setups where one part might depend on completion
12of a previous part. They ideally involve the integration between
13multiple OpenStack services to exercise the touch points between them.
14
Marc Koderer1b29d832013-11-08 08:43:35 +010015Any scenario test should have a real-life use case. An example would be:
16
17 - "As operator I want to start with a blank environment":
18 1. upload a glance image
19 2. deploy a vm from it
20 3. ssh to the guest
21 4. create a snapshot of the vm
Sean Dague6dbc6da2013-05-08 17:49:46 -040022
23
Jordan Pittier74a56ab2017-04-26 16:46:20 +020024Why are these tests in Tempest?
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020025-------------------------------
Jordan Pittier74a56ab2017-04-26 16:46:20 +020026This is one of Tempest's core purposes, testing the integration between
Sean Dague6dbc6da2013-05-08 17:49:46 -040027projects.
28
29
30Scope of these tests
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020031--------------------
ghanshyam50f19472014-11-26 17:04:37 +090032Scenario tests should always use the Tempest implementation of the
33OpenStack API, as we want to ensure that bugs aren't hidden by the
34official clients.
Sean Dague6dbc6da2013-05-08 17:49:46 -040035
David Kranzc15a1ca2013-09-17 20:58:47 -040036Tests should be tagged with which services they exercise, as
37determined by which client libraries are used directly by the test.
Sean Dague6dbc6da2013-05-08 17:49:46 -040038
39
40Example of a good test
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020041----------------------
Sean Dague6dbc6da2013-05-08 17:49:46 -040042While we are looking for interaction of 2 or more services, be
43specific in your interactions. A giant "this is my data center" smoke
44test is hard to debug when it goes wrong.
45
Jordan Pittier74a56ab2017-04-26 16:46:20 +020046A flow of interactions between Glance and Nova, like in the
Sean Dague6dbc6da2013-05-08 17:49:46 -040047introduction, is a good example. Especially if it involves a repeated
48interaction when a resource is setup, modified, detached, and then
49reused later again.