CSCI Lab 6: Managing software Solution

$35.00 $29.00

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,…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

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

  1. order method: Ordering a large donair with the coupon code \YOLO5″

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

  1. makeOrder method: Making 1 order

  1. 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?

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

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

  1. 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

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

  1. 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?

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

  1. 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.

  1. Generate a PDF from the document.

  1. 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

CSCI Lab 6: Managing software Solution
$35.00 $29.00