ECE 322 Lab2-Black-box testing techniques Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)

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.

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 x​i 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 4n + 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 recieve exterior processing, choose the additional point within the boundary.
  • Else if the boundary is ​closed ​the all points on the boundary recieve interior processing, choose the additional point outside the boundary.
  • This strategy produces ​b(n+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.

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           

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 x​1, x​2, and x​3.

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:

x​1 + x​2 + x​3 <= k​                   

x1 >=0 x​2 >=0​  x​3 >=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:

  • Draw the subdomain for this problem. ​Include this drawing in your report.
  • Apply the EPC strategy and develop a set of test cases
  • Apply the weak nx1 strategy and develop a set of test cases
  • Execute your test cases for both types of testing and record your results

For ​your report​ include:

  • Your observations and completed test cases, failed test cases should be highlighted, test cases must be presented in a test case table.
  • A comparison of the two testing strategies in terms of effectiveness and efficiency (# test cases, discovery of errors, effort)
  • Describe any errors you may have found in the application
  • A discussion of the root causes of these errors, from what you can tell as a black box tester
  • Your subdomain diagram, with labeled axes, must be readable.
  • Task 2

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:

  • Formulate the equations of the approximated linear boundaries
  • Apply both the EPC and weak nx1 strategy to this problem
  • Develop test cases for each strategy
  • Execute your test cases and record the results
  • 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?
  • Provide a discussion on the effectiveness of your test cases, and how meaningful your tests are considering the approximation, are these strategies efficient?
  • Did you identify any errors in the application? Are they approximation errors or real errors?

For ​your report​ include:

  • Completed observations and completed test cases
  • A comparison of the two strategies for this task
  • The equations for the linear segments used to define the problems subdomain
  • Your comments on domain approximation
    • Would using more linear segments improve the approximation?
    • How many test cases would be required for EPC and weak nx1 if we instead used 8 linear segments? Or more?
  • lab2-qsnctd.zip