blob: 835ba994f79a290ef3147170e8a67b6706ad0a62 [file] [log] [blame]
Masayuki Igawac268dd62013-09-18 00:51:05 +09001Tempest Field Guide to Scenario tests
2=====================================
Sean Dague6dbc6da2013-05-08 17:49:46 -04003
4
5What are these tests?
Attila Fazekas23fdf1d2013-06-09 16:35:23 +02006---------------------
Sean Dague6dbc6da2013-05-08 17:49:46 -04007
8Scenario tests are "through path" tests of OpenStack
9function. Complicated setups where one part might depend on completion
10of a previous part. They ideally involve the integration between
11multiple OpenStack services to exercise the touch points between them.
12
Marc Koderer1b29d832013-11-08 08:43:35 +010013Any scenario test should have a real-life use case. An example would be:
14
15 - "As operator I want to start with a blank environment":
16 1. upload a glance image
17 2. deploy a vm from it
18 3. ssh to the guest
19 4. create a snapshot of the vm
Sean Dague6dbc6da2013-05-08 17:49:46 -040020
21
22Why are these tests in tempest?
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020023-------------------------------
Sean Dague6dbc6da2013-05-08 17:49:46 -040024This is one of tempests core purposes, testing the integration between
25projects.
26
27
28Scope of these tests
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020029--------------------
David Kranzc15a1ca2013-09-17 20:58:47 -040030Scenario tests should use the official python client libraries for
Sean Dague6dbc6da2013-05-08 17:49:46 -040031OpenStack, as they provide a more realistic approach in how people
32will interact with the services.
33
David Kranzc15a1ca2013-09-17 20:58:47 -040034Tests should be tagged with which services they exercise, as
35determined by which client libraries are used directly by the test.
Sean Dague6dbc6da2013-05-08 17:49:46 -040036
37
38Example of a good test
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020039----------------------
Sean Dague6dbc6da2013-05-08 17:49:46 -040040While we are looking for interaction of 2 or more services, be
41specific in your interactions. A giant "this is my data center" smoke
42test is hard to debug when it goes wrong.
43
44A flow of interactions between glance and nova, like in the
45introduction, is a good example. Especially if it involves a repeated
46interaction when a resource is setup, modified, detached, and then
47reused later again.