update readme
This commit is contained in:
parent
8b00d6ed07
commit
50fc79dc42
@ -21,6 +21,8 @@ example sketches compile cleanly against the library.
|
|||||||
With an arduino plugged in, each sketch that has a corresponding python
|
With an arduino plugged in, each sketch that has a corresponding python
|
||||||
test case is built, uploaded and then the tests run.
|
test case is built, uploaded and then the tests run.
|
||||||
|
|
||||||
|
The test suite _does not_ run an MQTT server - it is assumed to be already running.
|
||||||
|
|
||||||
$ python testsuite.py
|
$ python testsuite.py
|
||||||
|
|
||||||
## What it does
|
## What it does
|
||||||
@ -31,10 +33,10 @@ For each example sketch, `sketch.ino`, the suite looks for a matching test case
|
|||||||
The test case must follow these conventions:
|
The test case must follow these conventions:
|
||||||
- sub-class `unittest.TestCase`
|
- sub-class `unittest.TestCase`
|
||||||
- provide the class methods `setUpClass` and `tearDownClass` (TODO: make this optional)
|
- provide the class methods `setUpClass` and `tearDownClass` (TODO: make this optional)
|
||||||
- all test method names must begin with `test_`
|
- all test method names begin with `test_`
|
||||||
|
|
||||||
The suite will call the `setUpClass` method _before_ uploading the sketch. This
|
The suite will call the `setUpClass` method _before_ uploading the sketch. This
|
||||||
allows any test setup to be performed before the the sketch runs - such as connecting
|
allows any test setup to be performed before the sketch runs - such as connecting
|
||||||
a client and subscribing to topics.
|
a client and subscribing to topics.
|
||||||
|
|
||||||
|
|
||||||
@ -46,11 +48,13 @@ The file `testcases/settings.py` is used to config the test environment.
|
|||||||
- `arduino_ip` - the IP address the arduino should us
|
- `arduino_ip` - the IP address the arduino should us
|
||||||
|
|
||||||
Before each sketch is compiled, these values are automatically substituted in. To
|
Before each sketch is compiled, these values are automatically substituted in. To
|
||||||
do this, the suite looks for lines that match the following:
|
do this, the suite looks for lines that _start_ with the following:
|
||||||
|
|
||||||
byte server[] = {
|
byte server[] = {
|
||||||
byte ip[] = {
|
byte ip[] = {
|
||||||
|
|
||||||
|
and replaces them with the appropriate values.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user