Updated docs on how to run tests.
This commit is contained in:
parent
bc524358ff
commit
e355e771b0
1 changed files with 20 additions and 2 deletions
22
README.md
22
README.md
|
|
@ -70,12 +70,30 @@ with Flow(...) as flow:
|
|||
|
||||
## How to test
|
||||
|
||||
There are two test suites: unit tests and integration tests. Integration tests are prepared to plug to some of our
|
||||
AWS resources, hence they are not fully reliable since they require specific credentials and permissions. The
|
||||
recommended policy is:
|
||||
|
||||
- Use the unit tests in any CI process you want.
|
||||
- Use the unit tests frequently as you code.
|
||||
- Do not use the integration tests in CI processes.
|
||||
- Use the integration tests as milestone checks when finishing feature branches.
|
||||
- Make sure to ensure integration tests are working before making a new release.
|
||||
|
||||
When building new tests, please keep this philosophy in mind.
|
||||
|
||||
|
||||
IDE-agnostic:
|
||||
|
||||
1. Set up a virtual environment which contains both `lolafect` and the dependencies listed in `requirements-dev.txt`.
|
||||
2. Run: `pytests tests`
|
||||
2. Run:
|
||||
- For all tests: `pytests tests`
|
||||
- Only unit tests: `pytest tests/test_unit`
|
||||
- Only integration tests: `pytest tests/test_integration`
|
||||
|
||||
In Pycharm:
|
||||
|
||||
- If you configure `pytest` as the project test runner, Pycharm will most probably autodetect the test
|
||||
folder and allow you to run the test suite within the IDE.
|
||||
folder and allow you to run the test suite within the IDE. However, Pycharm has troubles running the integration
|
||||
tests since the shell it runs from does not have the AWS credentials. Hence, for now we recommend you to only use
|
||||
the Pycharm integrated test runner for the unit tests. You can easily set up a Run Configuration for that.
|
||||
Loading…
Add table
Add a link
Reference in a new issue