ECE 322 Lab Assignment 2

Black Box Testing #2

Overview

The objective of this laboratory experiment is to become familiar with several black-box testing

techniques, specifically the Extreme Point Combination (EPC), and weak n x 1 testing strategies.

Introduction

The following sections will serve as an introduction to the testing techniques used in this lab.

Please be aware that only those testing techniques required for the assignment need to be used for

each task.

Extreme point combination (EPC)

For a given subdomain, complete a single domain analysis in order to identify the domain

limits for each dimension (variable).

Choose test cases for xi max, min, slightly under min, slightly over max.

Produce all possible combinations of inputs with each of its variables taking on one of the

four values shown above in the n-dimensional space. This should result in 4 n + 1 test

cases (one test is added somewhere within the valid subdomain).

Weak n x 1 strategy

Linear boundaries of the problem must be identified through domain analysis

Select n points located on the boundary, n is the dimensionality of the problem

Plus one point located off the boundary

Boundaries are linear, hence n independent points fully specify each boundary

If the boundary is open then all points on the boundary receive exterior processing, choose

the additional point within the boundary.

Else if the boundary is closed the all points on the boundary receive interior processing,

choose the additional point outside the boundary.

This strategy produces b(n+1)+1 test cases where b is the number of linear boundaries, and

n is the dimensionality.

Test case automation

In many forms of testing the number of required test cases can become very large very

quickly as the system complexity increases.

Performing large numbers of manual test cases is time consuming and tiresome, something

to be avoided.

Many types of testing can be automated to speed up testing and reduce the effort required

by the tester when simple input/output tests are required.

Preparation:

Prepare a set of test cases for both tasks you will be completing during the lab session. Follow

formatting for test cases similar to the formatting used in lab 1. (ID, description / input values,

expected result, actual result). Remember when reporting your test results to highlight failed test

cases.

2

Lab Experiment

For all experiments in this lab, you should only include test cases specific to the testing methods

focused on in this assignment. You do not need to include any error guessing etc test cases for this

report.

Task 1 (35 marks):

A new GPS-enabled automated pilot system is being tested for an unmanned reconnaissance

aircraft. The benefit of such a system would allow the government to perform peaceful

reconnaissance missions without the risk of sending a highly trained pilot and using very expensive

aircraft. The system controls the unmanned aircraft from takeoff to landing. The unmanned aircraft

has enough fuel to reach a maximum range of some distance k before needing to turn back to home

base, i.e. k is the maximum distance the unmanned aircraft can fly before exceeding the “point of

no return.” A maximum of 3 waypoints can be specified in the autopilot system before the

unmanned aircraft starts its trek to home base.

The system is simplified by assuming that the unmanned aircraft follows the same path back to its

destination. The distances to each waypoint are given by x1, x2, and x3.

Figure shows three legs of combined distance less than k.

The application provided for this task takes three inputs: The value of k is hardcoded to 100 for

simplicity, and three values for the lengths of each leg of the trip are entered on one line separated

by spaces:

drone> x1 x2 x3

The application will output success, failure, or give an explanatory error message. Each value

should be specified as an integer value.

The application satisfies the following system of inequalities:

x1 + x2 + x3 <= k

x1 >=0

x2 >=0

x3 >=0

The application for this task is available on the class website along with running instructions.

Your task for this portion of the lab is to:

(1) Draw the subdomain for this problem. Include this drawing in your report.

3

(2) Apply the EPC strategy and develop a set of test cases

(3) Apply the weak n x 1 strategy and develop a set of test cases

(4) Execute your test cases for both types of testing and record your results

For your report include:

(1) Your observations and completed test cases, failed test cases should be highlighted, test cases

must be presented in a test case table.

(2) A comparison of the two testing strategies in terms of effectiveness and efficiency (# test cases,

discovery of errors, effort)

(3) Describe any errors you may have found in the application

(4) A discussion of the root causes of these errors, from what you can tell as a black box Tester

(5) Your subdomain diagram, with labeled axes, must be readable.

Task 2 (35 marks):

You are testing a software program that allows you to pilot a remote-controlled car. The program

accepts Cartesian inputs in the form of (x, y) that specify where the car should move. Your

computer radio signal originates at the origin (0,0). Unfortunately, if the car exceeds a maximum

distance of r from the origin, the signal strength is too weak to be recognized and the instructions

fail. This results in a circular domain of radius r centered at the origin where the car can be

successfully controlled.

Circular boundaries are too complex to test using the linear methods we have learned so far. Hence,

we need to approximate the circular subdomain with m linear segments. For this lab task, we will

use a simple case of m = 4, with the new subdomain defined as the square formed within the

circular boundary. For simplicity, the radius is hard coded to r = 1 for this lab experiment.

Approximate subdomain shown in red, center is at the origin.

During test case generation, you should use expected values under the assumption that the domain

approximation used is the real domain.

Your task for this task is to:

(1) Formulate the equations of the approximated linear boundaries

(2) Apply both the EPC and weak n x 1 strategy to this problem

(3) Develop test cases for each strategy

(4) Execute your test cases and record the results

4

(5) Comment on the use of domain approximation, is it effective? Would a different

configuration be better? How would the complexity of the problem be affected?

(6) Provide a discussion on the effectiveness of your test cases, and how meaningful your

tests are considering the approximation, are these strategies efficient?

(7) Did you identify any errors in the application? Are they approximation errors or real

errors?

For your report include:

(1) Completed observations and completed test cases

(2) A comparison of the two strategies for this task

(3) The equations for the linear segments used to define the problems subdomain

(4) Your comments on domain approximation

– Would using more linear segments improve the approximation?

– How many test cases would be required for EPC and weak n x 1 if we instead

used 8 linear segments? Or more?

Lab report:

Must be typed, no handwritten versions will be accepted. Follow the general format as

included in the lab guideline. Your report should include:

Your write-up, and all diagrams, equations

The results of your test cases in table form, failed test cases highlighted

Any conclusions you have drawn from these test cases regarding the applications under

test.

The required discussions on testing methods etc.

Clearly indicate all failed test cases, and explain the cause of these failures.

ECE 322 SOFTWARE TESTING AND MAINTENANCE

# Lab Assignment 2 Black Box Testing #2

Original price was: $35.00.$29.00Current price is: $29.00.

## Reviews

There are no reviews yet.