S T B H P N

Project #1 - Single-User Test Harness

Version 1.4
Due Date: Wednesday, September 19th, 2018

Purpose:

One focus area for this course is understanding how to structure and implement big software systems. By big we mean systems that may consist of hundreds or even thousands of packages1 and perhaps several million lines of code. We won't be building anything quite that large, but our projects may be considerably bigger than anything you've worked on before. In order to successfully implement big systems we need to partition code into relatively small parts and thoroughly test each of the parts before inserting them into the software baseline2. As new parts are added to the baseline and as we make changes to fix latent errors or performance problems we will re-run test sequences for those parts and, perhaps, for the entire baseline. Managing that process efficiently requires effective tools for code analysis as well as testing. How we do that code analysis is illustrated by the SMA projects for this year. In OOD, we will focus, this year, on testing applications. The projects this Fall build software testing tools in several phases. We will emphasize C++ code but want our tools to be easily extendable to other similar languages like C# and Java. You will find it useful to look at the SW Testing blog for a brief introduction to production testing.
In this first project we will build and test a small framework for single-user testing that:
Succeeding projects will build, progressively, on the work of the prior projects.

Requirements:

Your Single-User TestHarness Solution:
  1. Shall use Visual Studio 2017 and its C++ Windows Console Projects, as provided in the ECS computer labs.
  2. Shall use the standard streams libraries for all I/O and operators new and delete for memory management.
  3. (2) Shall provide an ITest interface that all tests must implement.
  4. (4) Shall provide a container that provides references to a sequence of one or more test instances.
  5. (2) Shall provide a function that extracts callable test objects from the container and executes them within a single try-catch block.
  6. (1) Shall provide a logging facility that logs test success or failure, and test identification messages that provide information to the user during test execution.
  7. (1) The logger shall provide for writing a test message on the console, and into a file for persistant storage, with a single write3 statement.
  8. (1) Each message shall provide information about the test, author, and time-date of execution. This information should be as compact as practical while still providing useful information.
  9. (4) Shall develop tests for each class in the CodeUtilities package, and execute them in your Single-User TestHarness.
  10. (4) Shall include an automated unit test suite that demonstrates that you meet all the functional requirements above. Note that this is just a set of tests that is used to test the TestHarness packages.
  11. (1) Each test shall provide comments in the test driver code that cite what each part of the test does, and the expected results.
Here is a link to the grade sheet used to guide evaluatation of your work.

  1. In C++, a package consists of two source code files, a header (.h) and an implementation (.cpp), that contain:
    • prologue, providing a name, brief descriptive phrase, author information, and environment information
    • description of the package's responsiblities and required files
    • maintenance history
    • class declarations
    • class method definitions
    • a main function that implements construction tests for all the defined code
    The Blocking Queue CodeSnap is a good example.
  2. A software baseline is the set of all code considered to be part of the current system, excluding experimental code that individual developers are working on.
  3. You may name the writing method however you wish. The intent is that there is some way of registering streams for output so that a write goes to every registered stream.

What you need to know:

In order to successfully meet these requirements you will need to know:
  1. Basics of the C++ language: C++ Reference
  2. How to implement a simple class hierarchy. This will be covered briefly in lecture #2 and in more detail later.
  3. The standard Containers.
  4. How to use Visual Studio. We will discuss this in one of the Help Sessions.