Masayuki Igawa | c268dd6 | 2013-09-18 00:51:05 +0900 | [diff] [blame] | 1 | Tempest Field Guide to Scenario tests |
| 2 | ===================================== |
Sean Dague | 6dbc6da | 2013-05-08 17:49:46 -0400 | [diff] [blame] | 3 | |
| 4 | |
| 5 | What are these tests? |
Attila Fazekas | 23fdf1d | 2013-06-09 16:35:23 +0200 | [diff] [blame] | 6 | --------------------- |
Sean Dague | 6dbc6da | 2013-05-08 17:49:46 -0400 | [diff] [blame] | 7 | |
| 8 | Scenario tests are "through path" tests of OpenStack |
| 9 | function. Complicated setups where one part might depend on completion |
| 10 | of a previous part. They ideally involve the integration between |
| 11 | multiple OpenStack services to exercise the touch points between them. |
| 12 | |
| 13 | An example would be: start with a blank environment, upload a glance |
| 14 | image, deploy a vm from it, ssh to the guest, make changes, capture |
| 15 | that vm's image back into glance as a snapshot, and launch a second vm |
| 16 | from that snapshot. |
| 17 | |
| 18 | |
| 19 | Why are these tests in tempest? |
Attila Fazekas | 23fdf1d | 2013-06-09 16:35:23 +0200 | [diff] [blame] | 20 | ------------------------------- |
Sean Dague | 6dbc6da | 2013-05-08 17:49:46 -0400 | [diff] [blame] | 21 | This is one of tempests core purposes, testing the integration between |
| 22 | projects. |
| 23 | |
| 24 | |
| 25 | Scope of these tests |
Attila Fazekas | 23fdf1d | 2013-06-09 16:35:23 +0200 | [diff] [blame] | 26 | -------------------- |
David Kranz | c15a1ca | 2013-09-17 20:58:47 -0400 | [diff] [blame] | 27 | Scenario tests should use the official python client libraries for |
Sean Dague | 6dbc6da | 2013-05-08 17:49:46 -0400 | [diff] [blame] | 28 | OpenStack, as they provide a more realistic approach in how people |
| 29 | will interact with the services. |
| 30 | |
David Kranz | c15a1ca | 2013-09-17 20:58:47 -0400 | [diff] [blame] | 31 | Tests should be tagged with which services they exercise, as |
| 32 | determined by which client libraries are used directly by the test. |
Sean Dague | 6dbc6da | 2013-05-08 17:49:46 -0400 | [diff] [blame] | 33 | |
| 34 | |
| 35 | Example of a good test |
Attila Fazekas | 23fdf1d | 2013-06-09 16:35:23 +0200 | [diff] [blame] | 36 | ---------------------- |
Sean Dague | 6dbc6da | 2013-05-08 17:49:46 -0400 | [diff] [blame] | 37 | While we are looking for interaction of 2 or more services, be |
| 38 | specific in your interactions. A giant "this is my data center" smoke |
| 39 | test is hard to debug when it goes wrong. |
| 40 | |
| 41 | A flow of interactions between glance and nova, like in the |
| 42 | introduction, is a good example. Especially if it involves a repeated |
| 43 | interaction when a resource is setup, modified, detached, and then |
| 44 | reused later again. |