tests, doc(testing): added pytest-dependency plugin to backend_e2e image + doc
This commit is contained in:
parent
7527b54bd7
commit
ad3aea8ec0
2 changed files with 19 additions and 2 deletions
|
|
@ -41,7 +41,6 @@ details).
|
|||
|
||||
In addition to pytest option, some flags can be set with the following arguments:
|
||||
|
||||
|
||||
``--visual``
|
||||
Launch a VNC viewer to see in real time browser based tests. You must have ``vncviewer``
|
||||
executable available in your path (this is part of `TigerVNC`_)
|
||||
|
|
@ -73,7 +72,25 @@ In addition to pytest option, some flags can be set with the following arguments
|
|||
|
||||
Then run a python console with given instructions
|
||||
|
||||
It's also good to know that in the e2e test environment, the following pytest plugins are
|
||||
installed and used:
|
||||
|
||||
`pytest-timeout`_
|
||||
To avoid having test stuck, it's good to terminate them after a while. A timeout of 60s
|
||||
is set by default for each test (lower value can give false negatives, as some e2e tests
|
||||
can be long, notably with Selenium).
|
||||
|
||||
`pytest-dependency`_
|
||||
Even if good testing practice normally means that tests can be run independently, in the
|
||||
case of e2e tests we are using a real environment, and some tests do create files,
|
||||
PubSub nodes, accounts, etc. It would be resource consuming to delete then recreate them
|
||||
only to have standalone tests, thus to keep tests short and simple, some of them must be
|
||||
run in order. The *dependecy* plugin is used to manage that, and will skip tests if one
|
||||
of their dependencies is failing. The markup help also to document the tests order.
|
||||
|
||||
.. _TigerVNC: https://tigervnc.org
|
||||
.. _pytest-timeout: https://github.com/pytest-dev/pytest-timeout
|
||||
.. _pytest-dependency: https://github.com/RKrahl/pytest-dependency
|
||||
|
||||
common fixtures
|
||||
---------------
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ USER sat
|
|||
|
||||
RUN \
|
||||
# pytest and its plugins
|
||||
pip install pytest pytest-timeout \
|
||||
pip install pytest pytest-timeout pytest-dependency \
|
||||
# needed to test jp
|
||||
sh \
|
||||
# needed to test libervia
|
||||
|
|
|
|||
Loading…
Reference in a new issue