blob: efcd1394eb577b9518330bc4a8eeb27fc1167586 [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
Masayuki Igawab78b9232017-11-17 16:12:37 +090017- "As 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-------------------------------
Jordan Pittier74a56ab2017-04-26 16:46:20 +020027This is one of Tempest's core purposes, testing the integration between
Sean Dague6dbc6da2013-05-08 17:49:46 -040028projects.
29
30
31Scope of these tests
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020032--------------------
ghanshyam50f19472014-11-26 17:04:37 +090033Scenario tests should always use the Tempest implementation of the
34OpenStack API, as we want to ensure that bugs aren't hidden by the
35official clients.
Sean Dague6dbc6da2013-05-08 17:49:46 -040036
David Kranzc15a1ca2013-09-17 20:58:47 -040037Tests should be tagged with which services they exercise, as
38determined by which client libraries are used directly by the test.
Sean Dague6dbc6da2013-05-08 17:49:46 -040039
40
41Example of a good test
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020042----------------------
Sean Dague6dbc6da2013-05-08 17:49:46 -040043While we are looking for interaction of 2 or more services, be
44specific in your interactions. A giant "this is my data center" smoke
45test is hard to debug when it goes wrong.
46
Jordan Pittier74a56ab2017-04-26 16:46:20 +020047A flow of interactions between Glance and Nova, like in the
Sean Dague6dbc6da2013-05-08 17:49:46 -040048introduction, is a good example. Especially if it involves a repeated
49interaction when a resource is setup, modified, detached, and then
50reused later again.