3. You are given a code-under-test, Converter; two sets of test cases generated using two different techniques which are Technique A and Technique B; and two mutants. Analyse the given information using mutation testing analysis and determine which technique is the most effective one. For the technique that less effective, generate additional test case to enhance the effectiveness. 1 public void Converter (int num) { if (num <100 && num>=1) { 2 3 System.out.println("A two digit number"); } else if (num <1000 && num>=100) { System.out.println("A three digit number"); } else if (num <10000 & & num>=1000) { Suctom out println(" four digit numbor"): 4 567 00 0
3. You are given a code-under-test, Converter; two sets of test cases generated using two different techniques which are Technique A and Technique B; and two mutants. Analyse the given information using mutation testing analysis and determine which technique is the most effective one. For the technique that less effective, generate additional test case to enhance the effectiveness. 1 public void Converter (int num) { if (num <100 && num>=1) { 2 3 System.out.println("A two digit number"); } else if (num <1000 && num>=100) { System.out.println("A three digit number"); } else if (num <10000 & & num>=1000) { Suctom out println(" four digit numbor"): 4 567 00 0
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question

Transcribed Image Text:3. You are given a code-under-test, Converter; two sets of test cases generated using two
different techniques which are Technique A and Technique B; and two mutants. Analyse
the given information using mutation testing analysis and determine which technique is the
most effective one. For the technique that less effective, generate additional test case to
enhance the effectiveness.
1
public void Converter (int num) {
if (num <100 && num>=1) {
2
3
System.out.println("A two digit number");
4
}
else if (num <1000 && num>=100) {
System.out.println("A three digit number");
}
else if (num <10000 && num>=1000) {
System.out.println("A four digit number");
}
else if (num <100000 && num>=10000) {
System.out.println("A five digit number");
}
else {
System.out.println("Number is not between 1 & 99999");
}
Mutant#
Line #
Original Code
Mutated Code
Mutant 1
8
if (num <10000 && num>=1000)
System.out.println("A four
digit number");
if (num <10000 && num>1000)
System.out.println("A five.
digit number");
Mutant 2
9
Test cases were generated from two different techniques:
Technique A
Technique B
1. TC1: num = 90
1.
TC1: num = 80
2. TC2: num = 800
2.
TC2: num = 700
3. TC3: num= 1000
3. TC3: num = 1300
4. TC4: num = 50000
4.
TC4: num= 90000
5. TC5: num = 300000
5. TC5: num = 5555555
56
7
LD 00
9
10
11
12
13
14
15
16
17
Mutant
}
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Similar questions
Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY