20
20
Once juju is published to the test clouds, individual tests can be performed.
21
21
Most tests accept an env name. The envs define the cloud and series to test.
23
## Requirements for running tests
24
You will need some python libraries in order to run the existing CI tests.
27
sudo apt-get install python-launchpadlib python-yaml python-boto python-mock
28
python-jenkins python-novaclient python-pexpect python-winrm python-coverage
30
In addition, if you wish to use azure, you will need to install pip, and the
31
associated client library from pip for azure.
33
sudo apt-get install python-pip
36
# Creating a New CI Test
38
Test scripts will be run under many conditions to reproduce real cases.
39
Most scripts cannot assume special knowledge of the substrate, region,
40
bootstrap constraints, tear down, and log collection, etc.
42
If this is your first time, consider asking one of the QA team to pair-program
45
You can base your new script and its unit tests on the template files.
46
They provide the infrastructure to setup and tear down a test. Your script
47
can focus on the unique aspects of your test. Start by making a copy of
48
template_assess.py.tmpl, and don't forget unit tests!
50
make new-assess name=my_function
52
Run make lint early and often. (You may need to do sudo apt-get install python-
53
flake8). If you forget, you can run autopep8 to fix certain issues. Please use
54
--ignore E24,E226,E123 with autopep8. Code that's been hand-written to follow
55
PEP8 is generally more readable than code which has been automatically
56
reformatted after the fact. By running make lint often, you'll absorb the style
57
and write nice PEP8-compliant code.
59
Please avoid creating diffs longer than 400 lines. If you are writing a new
60
test, that may mean creating it as a series of branches. You may find bzr-
61
pipeline to be a useful tool for managing a series of branches.
63
If your tests require new charms, please write them in Python.