Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Imagine that you are head of testing department of a software house. In your department, there are several testing staff who design test - cases

Imagine that you are head of testing department of a software house. In your department, there
are several testing staff who design test-cases for different software modules. A module holds
some number of lines of code and each test case may cover some of the code lines of the module.
For example, let our very simple module contains 10 lines of code (i.e.=10) and we have =
6 number of different test cases prepared for the testing the module. Table 1 shows an example
line numbers covered by each of 6 different example test cases.
Table 1. Example test-case IDs and their code line coverage information.
Test-Case Covered Line Numbers
1{3,4,6,8}
2{1,2,4,9,10}
3
{5,6,8,10}
4{2,5,8,9}
5
{1,4,6,7,9,10}
6
{1,2,3,5,8}
As the head of the testing department, you wish to minimize the number of applied test cases per
module in order to save testing time. On the other hand, the selected minimum number of test
cases among alternatives are required to cover all the lines of module under test together in
order to not to risk some of the module lines not being tested. In other words, the selected
minimum number of test cases should cover all the code lines of the module collectively. For
example for the above problem instance, you have to select the test cases 5 and 6 that covers
2
all the 10 module lines together. In your solution, assume that each line of the module under test
is covered by at least one test case.
In order to solve the problem, you decide to develop a software tool that uses Transform &
Conquer algorithm design technique. According to the approach, first you need to convert given
problem instance into an Integer Linear Programming (ILP) problem then solve the constructed ILP
problem by using a back-end solver (namely IBM-Cplex Solver) on the fly. Finally, display the
obtained result in a meaningful way. See Figure 1 below.
Figure 1. A simple architectural view for your test case selection software.
SAMPLE INPUT:
10// Number of lines of code of the module
6// Number of test cases
3468// Covered lines by test case number #1
124910// Covered lines by test case number #2
56810// Covered lines by test case number #3
2589// Covered lines by test case number #4
1467910// Covered lines by test case number #5
12358// Covered lines by test case number #6
SAMPLE OUTPUT:
IDs of the minimum number of selected test cases that covers all the module lines: 56Test Case Selection Problem (100 pts):
Imagine that you are head of testing deportment of a software house. In your department, there
are several tenting staff who desige test-caws for different software modules. A module holds
same a number of lines of code and each test case may cover some of the code lines of the module.
For example, let our wery simple module contains 10 lines of code (i.e.n=10) and we hawe k=
6 number of differemt test cases prepared for the testing the module. Table 1 shows an example
line numbers cowred by each of 6 different enample test caser.
Table 1. Erample test-case IDs and their code lise coverage informantion.
As the head of the testing department, you wish to minimise the number of applied test cases per
modale in order to sawe testing time. On the other hand, the selected minimum number of test
cawes among k altematives are required to cover all the lines of module under test together in
order to not to risk same of the module lines not being tested. in other words, the selected
minimum number of test cases should cover all the code lines of the module colloctively. For
enample for the above problem ingtance, you have to select the test cases Ts and Tk that cowers
all the 10 modale lines together. V your solation, assame that each line of the module under test
is covered by at least one test case.
In oeder to solve the problem, you decide to develop a software tool that uses Tranaform S.
Conquer algorithm design technigue. According to the approach, first you need to corrvert gives
problem instance into an leteger Linear Programming (LP) peoblem then solve the constructed 11 P
problem by using a back-end solver (namely ISM-Celer Solver) on the fly. Finally, display the
obtained result in a meaningful way. See Figure 1 below.
Figure 1 A simple architectural view for your test case selection softeare.
SAMPLE NPUT:
SAMPLE GUTEIT.
IDs of the minimum number of selected test cases that cowers all the module lines: 56
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

Describe some common hazards in the contemporary workplace

Answered: 1 week ago