diff --git a/README.md b/README.md index 5407eb93cd089fcd50bcf3d4c838021c463f8809..48e1606100cbd30ef3a1fd4e53c5d5b70f24fe65 100644 --- a/README.md +++ b/README.md @@ -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` -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` diff --git a/test/streaming-sim/StreamingSim.py b/test/streaming-sim/StreamingSim.py index 9c9b35e586010f8bc2249f0e1db7fdce4dfab0a1..a2e37375945cec6f56f09b7a74c72d19af04a071 100644 --- a/test/streaming-sim/StreamingSim.py +++ b/test/streaming-sim/StreamingSim.py @@ -210,6 +210,8 @@ def run_simulation_fixture(): if "CLMCMetrics" not in dbs: simulator = Sim(INFLUX_DB_URL) simulator.run(SIMULATION_TIME_SEC) + + print("10 seconds timeout is given so that the data could properly be inserted into the database.") import time time.sleep(10)