Question
Part 2: Unit testing activity In this part of the coursework, you are to develop a set of unit tests for one of the example
Part 2: Unit testing activity
In this part of the coursework, you are to develop a set of unit tests for one of the example programs you have seen in the course. The output of this part is some source code and a testing report.
Instructions
Select ONE of the unit test example programs you have seen in the course: snakestats, terriblefall or norestforthewiccad. We recommend that you select the one you feel most confident working on.
* Write a total of 9 tests, organised into three sets. * Each test set should target one functional element of the program (e.g. an API path, a statistical function or a physics simulation function). * Write the code that allows the program to pass your tests. * Explain your approach in each test set. What was your strategy here? * Capture screenshots or console logs of the code before and after it passed the tests, showing the output of the unit testing library. Shorten the output to the most important part, where it lists the number of tests passed and failed. * Write everything up in a report which you should save out to PDF format
Here is a checklist you can use to ensure you have completed all the tasks:
Done? | Marks | |
Select example program to test | 0 | |
Test set 1 target function name (e.g. /spells) | 0 | |
Test set 1 written explanation of strategy | 1 | |
Test set 1 test 1 coded, explained and run | 0.5 | |
Test set 1 test 2 coded, explained and run | 0.5 | |
Test set 1 test 3 coded, explained and run | 0.5 | |
Test set 2 target function name | 0 | |
Test set 2 written explanation of strategy | 1 | |
Test set 2 test 1 coded, explained and run | 0.5 | |
Test set 2 test 2 coded, explained and run | 0.5 | |
Test set 2 test 3 coded, explained and run | 0.5 | |
Test set 3 target function name | 0 | |
Test set 3 written explanation of strategy | 1 | |
Test set 3 test 1 coded, explained and run | 0.5 | |
Test set 3 test 2 coded, explained and run | 0.5 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started