SE 3M04 T1 2003
Assignment 9
- Due: Monday November 17, 23:00 through WebCT
- Goals:
- (Automated) Testing.
- Details:
- This continues to build on previous assignments.
For this assignment, you are to write fully automated
(unit) tests for your producer and consumer module(s)
and all their exported functions.
-
- The project description along with
previous assignements provide all the necessary information
you need to
complete this assignment successfully.
- For creating unit tests, I highly recommend that you use
CuTest 1.4, although this
is not manditory. You can take a look at
the CuTest home page
for more details.
- You need to create a suite of tests for each
consumer (and each producer) that test that their behaviour
is as intended. It is expected that, as covered in class,
you will need to create both stub functions and driver functions
(see the courseware for a reminder) to help test your
functions. You should test average cases as well as border
cases (ie things like a demand much higher than the maximal
possible production, negative numbers where positive ones
are expected, etc). You must mimick
CuTest's output; looks at its README file for many
more details.
- It is expected that you will produce approximately
30 tests per consumer and 20 tests per producer (the
consumers are more complex, needing more testing). Of course
some thinking (and then intelligent coding) is needed to
ensure that this number of tests
is reasonable to do instead of an insane amount. Taking
a cue from the provided (partial) solution to assignemnt 7
should help.
- I have created a
minimal test and a
medium sized test from the
ones provided in CuTest to show how to use it. To compile
the first example, I used
gcc -Wall -pedantic -o aaa a09ex_mini.c CuTest.c
which produced an aaa.exe executable (runnable from the
command line).
- You can find a partial solution to assignment #7 on
the assignment 7 web page .
- Deliverables:
- One zip file "MUSS ID".zip containing
a set of .c files, one for each consumer and producer
module(s), as well as the complete contents of assignment 7.
- A plain text file, log.txt, containing a log of
what you did; most important for this assignment is logging
all conversations (or lack thereof) about this assignment you
had with other students, TAs, the prof, etc.
Links to assignments
Back to main page