Test - USEPA/USEEIO_API GitHub Wiki
Verification & Validation Testing Instructions
Please refer to the User Manual (UM) and LMMD Software Verification & Validation (V&V)[Internal EPA link only] SOP for more information.
Testing
The test suite consists of Python pass/fail unit tests. The tests work on any version of the USEEIO (Go or Python) that is running locally or remotely.
To test a new instance of the API, build or deploy locally or on a remote server.
To test a running remote instance, you can run the tests directly on that instance.
Prerequisites
-
Python 3
-
numpy >= 1.17
-
requests >= 2.20
Once python is installed and pip is available from the command line, the latter two requirements can be installed like
>pip install numpy
>pip install requests
Testing in Pycharm
In Pycharm, mark the 'python' directory as 'Sources root'. Make sure API is running.
By default, the tests run on the localhost on port 8080.
To run the tests with a remote server, edit the run configuration for the 'tests' folder and create an environmental variable
USEEIO_API
and set it to URL of the base api of the remote server, (e.g. http://someurl.org/api
).
If the remote URL requires an API key, this should also be set as an environmental variable. For example:
USEEIO_API='http://someurl.org/api'
USEEIO_API_KEY='somekey'