S T B H P N

Project #4 - Remote TestHarness

Version 1.0
Due Date: Wednesday, December 5th, 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 projects for this year. The projects this Fall focus on building software testing tools. 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 fourth project we will build and test the functionality for remote multi-user testing. Most of the functionality has already been developed in the first three projects. Here, we will focus on the Client Graphical User Interface (GUI). Things now get interesting - in both senses of the word - because C++ and its standard libraries give us little help for building graphical user interfaces. Instead, we are going to reach out to the libraries supported by two other languages for that help: The .Net libraries provide a very well engineered facility for building these interfaces, e.g., Windows Presentation Foundation (WPF). We will elect to use C# with that framework, as shown in the accompanying diagram. C# and WPF will be discussed in class, and we will show you a lot of example code. To alay your concerns, many students in this class in previous semesters have used this approach successfully. We also need a "converter shim" to allow the C# code to communicate with our native Communication Channel code. The shim is built using C++/CLI, a managed .Net language with the same object model as C#, but much of its syntax like C++. You may use a Shim I built for last year's project, probably with no changes. The only constraints for this implementation is that we need to build the Shim, and native Channel code, as a dynamic link library, which the GUI loads at startup. We will give you alot of help with that. You will spend most of your time, in Project #4, working on the GUI to provide facilities for the user to select one or more TestRequests to send, and to display the test results. Display is the most interesting, because we want to allow the test driver to log information that is relevant for a particular test, as well as show the status: pass or fail. We will leave it up to you to design all of the GUI controls and displays to support testing.
As for the earlier projects, the TestHarness must support: The good news is that you have already implemented all of that. Now, we are focusing on the Client. It must support: The TAs and I will give you some help during Help Sessions and Office Hours, but we won't layout the entire GUI design for you.

Requirements:

Your TestHarness Solution:
  1. Shall use Visual Studio 2017 and its C++ Windows Console Projects, as provided in the ECS computer labs.
  2. Shall use Windows Presentation Foundation (WPF) for all user display.
  3. (3) Shall assemble the working parts from Projects #1, #2, and #3 into a Client-Server configuration. Unlike conventional Client-Server architectures, the Client need not wait for a reply for a TestRequest from the TestHarness before sending additional TestRequests.
  4. (3) Shall provide a Graphical User Interface (GUI) for the client that supports selecting test libraires to send for testing, and supports displaying the test results.
  5. (2) Shall provide message designs appropriate for this application. All messages are instances of the same Message class, but have a specified set of attributes and body contents suited for the intended task.
  6. (2) Shall support sending TestRequest messages from Client to TestHarness Server.
  7. (2) Shall support correctly executing each TestRequest, as a sequence of tests, with each TestRequest running in its own Process Pool child process.
  8. (2) Shall support sending test results, via results messages, from the child process executing the tests to the Client that made the request.
  9. (2) Shall demonstrate correct test operations for two or more concurrent clients. You need to ensure that testing takes enough time to ensure that more than one child process is running at the same time.
  10. (4) Shall include an automated unit test suite that demonstrates your Clients and TestHarness satisfy all of the functional requirements, above.

  1. In C#, a package is a single source code file that contains:
    • prologue, providing a name, brief descriptive phrase, author information, and environment information
    • description of the package's responsiblities and required files
    • maintenance history
    • class definitions
    • a main function that implements construction tests for all the defined code
  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.

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 #3 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.