kopia lustrzana https://github.com/espressif/esp-idf
tiny-test-fw: add requirements.txt, small docs tweaks
rodzic
8a88dd3590
commit
6a626f7984
|
@ -9,13 +9,13 @@ Welcome to TinyTestFW's documentation!
|
|||
We have a lot of test which depends on interact with DUT via communication port.
|
||||
Usually we send command to the port and then check response to see if the test succeed.
|
||||
TinyTestFW is designed for such scenarios.
|
||||
It supports ESP-IDF applications and is able for other applications by writing new bundles.
|
||||
It supports ESP-IDF applications and can be adapted to other applications by writing new bundles.
|
||||
|
||||
Test FW features
|
||||
----------------
|
||||
|
||||
1. Test Environment:
|
||||
1. DUT: DUT provides methods to interact with DUT
|
||||
1. DUT: DUT class provides methods to interact with DUT
|
||||
* read/write through port
|
||||
* expect method which supports expect one or multiple string or RegEx
|
||||
* tool methods provided by the tool bundle, like ``start_app``, ``reset``
|
||||
|
@ -27,7 +27,7 @@ Test FW features
|
|||
3. Environment Configs:
|
||||
* support get env configs from config file or auto-detect from current PC
|
||||
* provide ``get_variable`` method to get variables
|
||||
2. allow to customize components (DUT, App) to support different devices
|
||||
2. Allow to customize components (DUT, App) to support different devices
|
||||
3. Integrate to CI:
|
||||
* provide interfaces for Gitlab-CI
|
||||
* provide ``search case`` and ``runner`` interfaces, able to integrate with other CI
|
||||
|
@ -35,7 +35,7 @@ Test FW features
|
|||
Example
|
||||
-------
|
||||
|
||||
Let's first check a simple simple::
|
||||
Let's first check a simple example::
|
||||
|
||||
import re
|
||||
import os
|
||||
|
@ -76,23 +76,23 @@ Let's first check a simple simple::
|
|||
SOP for adding test cases
|
||||
-------------------------
|
||||
|
||||
1. import test framework:
|
||||
1. Import test framework:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* we assume ``TEST_FW_PATH`` is pre-defined before running the tests
|
||||
* We assume ``TEST_FW_PATH`` is pre-defined before running the tests
|
||||
* Then we can import python packages and files from ``TEST_FW_PATH``
|
||||
|
||||
2. define test case:
|
||||
2. Define test case:
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1. define test case ``test_xxx(env, extra_data)``
|
||||
1. Define test case ``test_xxx(env, extra_data)``
|
||||
* env: instance of test env, see :doc:`Test Env <Env>` for details
|
||||
* extra_data: extra data passed from test case caller
|
||||
2. add decorator for test case
|
||||
2. Add decorator for test case
|
||||
* add decorator ``TinyFW.test_method`` to test method
|
||||
* define default case configs and filters in decorator, see :doc:`TinyFW.test_method <TinyFW>`
|
||||
|
||||
3. execute test cases:
|
||||
3. Execute test cases:
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* define in ``main`` section and execute from this file
|
||||
|
@ -118,8 +118,8 @@ SOP for adding test cases
|
|||
|
||||
modules
|
||||
|
||||
Dependency
|
||||
==========
|
||||
Dependencies
|
||||
============
|
||||
|
||||
Support for both Python2 and Python3 (tested on python 2.7.13 and 3.6.2).
|
||||
|
||||
|
@ -131,6 +131,8 @@ The following 3rd party lib is required:
|
|||
* netifaces
|
||||
* matplotlib (if use Utility.LineChart)
|
||||
|
||||
These libraries can be installed by running ``pip install -r requirements.txt`` in tiny-test-fw directory.
|
||||
|
||||
To build document, we need to install ``Sphinx`` and ``sphinx-rtd-theme`` (you may replace this with your own theme).
|
||||
|
||||
Indices and tables
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
pyserial
|
||||
pyyaml
|
||||
xunitgen
|
||||
netifaces
|
||||
matplotlib
|
Ładowanie…
Reference in New Issue