Skip to content
Snippets Groups Projects
Commit a3e22970 authored by Kumar, Sunil Dr (Comp Sci & Elec Eng)'s avatar Kumar, Sunil Dr (Comp Sci & Elec Eng)
Browse files

Add README.md

parent 1f4ec41a
No related branches found
No related tags found
No related merge requests found
Configuring the simulator
Goto the main directory, near-rt-ric-simulator.
Note that test can be performed both using the nonsecure http port and the secure https port.
Build and start the simulator container using: ./build_and_start.sh This will build and start the container in interactive mode. The built container only resides in the local docker repository. Note, the default port is 8085 for http and 8185 for https. When running the simulator as a container, the defualt ports can be re-mapped to any port on the localhost.
In a second terminal, go to the same folder and run the basic test script, basic_test.sh nonsecure|secure or commands.sh nonsecure|secure depending on version. This script runs a number of tests towards the simulator to make sure it works properply.
Basic test and code coverage
Basic test, or unit test, using a python script is also supported. This test basically the same thing as the bash script mentioned in the section above. Follow the instruction of how to clone the repo described in that section. Only http is tested as the internal flask server is only using http (https is part of the webserver inteface).
Navigate to 'near-rt-ric-simulator/tests'. Choose the version to test and use that file for test.
Use 'python3 -m pytest ' to run unit test only with no coverage check
Or use 'coverage run -m pytest ' to run unit test and produce coverage data. List coverage data by 'coverage report -m --include=../../*' - the include flag makes the list to only contain coverage data from the simulator python file.
To use the 'coverage' cmd, coverage need to be installed use 'pip install coverage'
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