Starting from:
$35

$29

Lab 6: Managing software Solution


Objective

In this lab, you will explore managing a system of software with test suites via JUnit and build management with Make.

Working alone or in a group of 2, you will apply your knowledge of JUnit and Make les to write a test script for the newest release of the HfxDonairExpress online ordering system, to improve their build automation, and to include your test cases in their existing testing setup.


Preparation

Download and install GNU Make. You can alternatively use it on timberlea.


Procedure

Set-up

1. Download and unzip the source directory posted on Brightspace.


Lab steps

Part 1 - Unit Testing Write a JUnit test suite for HfxDonairExpress, with one test method for each of the following cases. You should put these test cases in a le called UnitTests.java. Your test cases should check that the method in question (either order or makeOrder) returns the correct value.

    1. order method: Ordering a small donair

    2. order method: Ordering a large donair with the coupon code \YOLO5"

    3. order method: Ordering a medium pizza with pepperoni and mushrooms

    4. makeOrder method: Making 1 order

    5. makeOrder method: Making 2 orders in a row









1
Part 2 - Understanding Make les    Answer the following questions about the provided Makefile:

    1. Which  le(s) are included in the SRC variable?

    2. What  le(s) does the all target depend on?

    3. What is the command used to make the hfxdonairexpress.jar  le?

    4. What does the test target do? You may want to try running the command make test to see.


Part 3 - Writing Make les    Add the following features to the existing Makefile:

    1. Modify the Makefile so that your unit test class is compiled and included in hfxdonairexpress.jar

    2. Modify the Makefile to put the compiled .html documentation les into a new sub-directory, docs

    3. Modify the Makefile to include a target clean which deletes the compiled .class and .html les. Note: the rm command can be used to delete a le


Questions

    1. Why is it important to have a portable, reproducible build system that isn’t tied to a particular IDE?

    2. How often should you run a class’ test suite when developing a software system? Explain.

    3. Can you see any reason to split test cases up into separate les, or should you just include all of your test cases for every class in the same le?


Reporting

    1. In one  le, list

The members of your team.

The answers to the questions in part 2.

The answers to the Questions section of the lab.

    2. Generate a PDF from the document.

    3. Submit the PDF, UnitTests.java, and you modi ed Makefile in Brightspace in the Lab/Lab 6 folder.


Assessment

The assessment will be on a letter grade and will re ect how well you have used JUnit and Make, as well as how your answers to the broadening questions demonstrate that you have thought through how unit tests and build automation can help you in maintaining and deploying a complicated piece of software.



2

More products