Skip to content
Snippets Groups Projects
Commit 5c2f04c6 authored by Nikolay Stanchev's avatar Nikolay Stanchev
Browse files

[ Issue #56 ] - Update README file, info for generating test data

parent fafde653
No related branches found
No related tags found
No related merge requests found
...@@ -119,11 +119,22 @@ use this ...@@ -119,11 +119,22 @@ use this
} }
``` ```
Run a python script to generate the test data sets The next step is to generate the test data, which could be done in two ways.
First option is to run a python script to generate the test data sets
`python3 /vagrant/test/streaming-sim/StreamingSim.py` `python3 /vagrant/test/streaming-sim/StreamingSim.py`
Test the generated data set by executing the following command This script could also be used to clear the generated data by using the '-c' option
`python3 /vagrant/test/streaming-sim/StreamingSim.py -c`
The second option is to directly run the testing module, which will detect if the data was generated, and if not, will automatically
generate the data before executing the tests. Keep in mind that if the test data is being generated using this way, a 10 seconds timeout
is given after the generation is finished so that the data could properly be inserted into the database. If the data was already generated
using the first option, only the tests would be executed.
The command for running the testing module is
`pytest -s /vagrant/test/streaming-sim/VerifySimResults.py` `pytest -s /vagrant/test/streaming-sim/VerifySimResults.py`
......
...@@ -210,6 +210,8 @@ def run_simulation_fixture(): ...@@ -210,6 +210,8 @@ def run_simulation_fixture():
if "CLMCMetrics" not in dbs: if "CLMCMetrics" not in dbs:
simulator = Sim(INFLUX_DB_URL) simulator = Sim(INFLUX_DB_URL)
simulator.run(SIMULATION_TIME_SEC) simulator.run(SIMULATION_TIME_SEC)
print("10 seconds timeout is given so that the data could properly be inserted into the database.")
import time import time
time.sleep(10) time.sleep(10)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment