Each folder contains a different program and has the following files:
serve.bat/sh: Starts up all the servers neededrun.bat: For Windows Users, to run the system testsrun.sh: For Mac Users, to run the system testssource.txt: The source program we are testing againstsourceNumbered.txt: A well formattedsource.txtto be used for reference only, with proper indentation and line numbering- And various test files based on relationships
-
Open a terminal in the
systemtestfolder orcdinto it. -
For Windows Users, run:
.\serve.bat
For Mac Users:
Remember to set your permissions to allow for execution of your OS's respective files.
chmod u+x run.sh ./serve.sh # alternatively bash serve.shWhat this does is that it starts up all the servers needed for system tests.
i.e If there are 5 system tests, ports 8100, 8200, 8300, ..., 8500 will be used up.
-
Everytime you change a test case and want to re run the output, run the following from the same directory:
.\run.bat
For Mac Users:
Remember to set your permissions to allow for execution of your OS's respective files.
chmod u+x run.sh ./run.sh # alternatively bash run.shThis will trigger each individual system test's
runfile.
E.g: To run systemtest1,
-
Open a terminal in the
systemtest1folder orcdinto it. -
Copy and paste
analysis.xslfromCode06\testsand paste it insidesystemtest1. -
For Windows Users, run:
.\run.bat
For Mac Users:
Remember to set your permissions to allow for execution of your OS's respective files.
chmod u+x run.sh ./run.sh
.outfiles should appear. -
To view the results of the test, run the following command in the same folder: (Having two terminals would help in case you want to re-run the tests)
python -m http.server {PORT_OF_YOUR_CHOICE} -
Visit
localhost:{PORT_OF_YOUR_CHOICE}to view the test results.
Given how we will have an increasing number of systemtests, it would be easier to aid your workflow by just seeing which systemtests are failing.
To do so, you can run the python script found in this directory.
python3 check.pyIt is also used in our CI to check for failing files.
The Control Flow Graphs for each system test can be found here for reference:
systemtest1
systemtest2
systemtest3


