blob: 6c51f22749d1dd3a297d1fd00ed425ca10bb7b43 [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
Martin Kopecd76178e2024-01-16 20:43:56 +010010Scenario tests are "through path" tests of OpenStack function.
11Complicated setups where one part might depend on the completion
Sean Dague6dbc6da2013-05-08 17:49:46 -040012of 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
Martin Kopecd76178e2024-01-16 20:43:56 +010017- "As an operator, I want to start with a blank environment":
Masayuki Igawabbbaad62017-11-21 16:04:03 +090018
Masayuki Igawab78b9232017-11-17 16:12:37 +090019 1. upload a glance image
20 2. deploy a vm from it
21 3. ssh to the guest
22 4. create a snapshot of the vm
Sean Dague6dbc6da2013-05-08 17:49:46 -040023
24
Jordan Pittier74a56ab2017-04-26 16:46:20 +020025Why are these tests in Tempest?
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020026-------------------------------
Martin Kopecd76178e2024-01-16 20:43:56 +010027
Jordan Pittier74a56ab2017-04-26 16:46:20 +020028This is one of Tempest's core purposes, testing the integration between
Sean Dague6dbc6da2013-05-08 17:49:46 -040029projects.
30
31
32Scope of these tests
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020033--------------------
Martin Kopecd76178e2024-01-16 20:43:56 +010034
ghanshyam50f19472014-11-26 17:04:37 +090035Scenario tests should always use the Tempest implementation of the
36OpenStack API, as we want to ensure that bugs aren't hidden by the
37official clients.
Sean Dague6dbc6da2013-05-08 17:49:46 -040038
David Kranzc15a1ca2013-09-17 20:58:47 -040039Tests should be tagged with which services they exercise, as
40determined by which client libraries are used directly by the test.
Sean Dague6dbc6da2013-05-08 17:49:46 -040041
42
43Example of a good test
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020044----------------------
Martin Kopecd76178e2024-01-16 20:43:56 +010045
Sean Dague6dbc6da2013-05-08 17:49:46 -040046While we are looking for interaction of 2 or more services, be
47specific in your interactions. A giant "this is my data center" smoke
48test is hard to debug when it goes wrong.
49
Jordan Pittier74a56ab2017-04-26 16:46:20 +020050A flow of interactions between Glance and Nova, like in the
Sean Dague6dbc6da2013-05-08 17:49:46 -040051introduction, is a good example. Especially if it involves a repeated
52interaction when a resource is setup, modified, detached, and then
53reused later again.