- COMP.CS.300
- 10. PRG1
- 10.1 Assignment graders
- 10.1.1 Functionality tests
Functionality tests¶
This grader runs the compulsory functionality tests.
Names of each test file describe the purpose of tests, i.e., bites and contours are added, searched, sorted and connected in various ways. Functionality test results are reported in separate sections.
The test files are also available for students under directory:
prg1/functionality-compulsory.
If the files are missing you may need to
update your local repository and pull the latest changes from the course
upstream with the following command:
git pull course-upstream main --allow-unrelated-histories.
You can execute the tests locally in the following manner:
- First compile the program, either in qtcreator, or in the command prompt:
qmake;make
- Execute e.g. the basic-bites test:
testread "functionality-compulsory/test-00-basic-bites-in.txt" "functionality-compulsory/test-00-basic-bites-out.txt"
either
- in GUI,
then typing or selecting the command testread from a dropdown menu in the text field and selecting both in and out files with the file picker, for example the above mentioned "functionality-compulsory/test-00-basic-bites-in.txt" "functionality-compulsory/test-00-basic-bites-out.txt"./prg1
Note!You can change the working directory to the directory where the test files are located to simplify the testread command. With "functionality-compulsory" being part of the working dir, the command will be: testread "test-00-basic-bites-in.txt" "test-00-basic-bites-out.txt" Otherwise, you need to include the path to the test files in the command. - by initiating the console mode,
and then running testread command./prg1 --console
- by saving above-mentioned instructions in a file, and by giving the file as a parameter:
./prg1 cmd_file
- in GUI,
- Question marks (?) in the output of the testread command indicate found differences that must cease to exist. Having a large enough screen, your output versus the expected one are shown side-by-side.
Warning
Before attempting to grade your Project in Plussa, remember to push your commits to the remote repository. Otherwise, the grader will not find it.
A+ esittää tässä kohdassa tehtävän palautuslomakkeen.