xref: /openbmc/telemetry/redfish-tests/README.md (revision 405c1e4bf8b993cb3800adead546e91b030ecb9b)
1# Requirements
2
3At least python3.6 is required and following two python packages installed -
4requests, pytest.
5
6```
7$ python3 --version
8Python 3.6.8
9
10$ pytest --version
11This is pytest version 5.4.2, imported from /usr/local/lib/python3.6/site-packages/pytest/__init__.py
12
13$ sudo pip3 install request pytest
14```
15
16# Config
17
18There are few options included to tests:
19- `--host_addr` - address of an OpenBMC together with protocol and port, ex.
20'https://localhost:443', default: 'https://localhost:4443'
21- `--username` - name of the user that is used during tests, user should have
22'ConfigureManager' privilege, default: 'root'
23- `--password` - plain password, default: '0penBmc'
24- `--metric_limit` - allows to limit number of detected metrics in system,
25default: 200
26
27SSL verification is disabled during tests.
28
29# Run
30
31```
32# To run all tests in verbose mode and with stop on first failed test (s option direct all print to stdout)
33 pytest test_telemetry.py -xsv
34
35# To run specific test using statement
36 pytest test_telemetry.py -xsv -k 'test_get_telemetry_service or test_get_metric_report'
37```
38