0% found this document useful (0 votes)
64 views

Week 8

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

Week 8

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

10/21/24, 2:57 PM Software Testing - - Unit 11 - Week 8

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

[email protected]

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Software Testing (course)

Course outline Week 8 : Assignment 8


The due date for submitting this assignment has passed.
About NPTEL () Due on 2024-09-18, 23:59 IST.

How does an
NPTEL online
Assignment submitted on 2024-09-18, 15:41 IST
course work? () 1) Which of the following is a correct regular expression for the language of all binary words (over the alphabet 1 point
{0, 1}) that begin with a 0 and end with a 1?
Week 0 ()

0 + (0 + 1)∗ + 1
Week 1 ()
0 ⋅ (0 ⋅ 1)∗ ⋅ 1
Week 2 ()
0 ⋅ (0 + 1)∗ ⋅ 1
Week 3 ()
(0 ⋅ (0 + 1)∗ ⋅ 1)∗
Week 4 () Yes, the answer is correct.
Score: 1
Week 5 () Accepted Answers:
0 ⋅ (0 + 1)∗ ⋅ 1
Week 6 ()
2) Suppose a programming language has identifier names from the lower case English alphabet that can be 1 point
Week 7 () exactly of length three. Which of the following is a regular expression that corresponds to these identifier names?

Week 8 () (a + b + c+. . . +z) ⋅ (a + b + c+. . . +z) ⋅ (a + b + c+. . . +z)

Syntax-Based (a ⋅ b ⋅ c⋅. . . ⋅z) + (a ⋅ b ⋅ c⋅. . . ⋅z) + (a ⋅ b ⋅ c⋅. . . ⋅z)


Testing (unit?
unit=66&lesson=67) (a + b + c+. . . +z)∗
Mutatioon Testing
(unit?
(a + b + c+. . . +z) ⋅ (a + b + c+. . . +z) ⋅ (a + b + c+. . . +z)∗
unit=66&lesson=68) Yes, the answer is correct.
Score: 1
Mutation Testing for Accepted Answers:
Programs (unit? (a + b + c+. . . +z) ⋅ (a + b + c+. . . +z) ⋅ (a + b + c+. . . +z)
unit=66&lesson=69)

Mutation Testing: 3) Which are the three levels in which the syntax of a programming language is typically given? 1 point
Mutation Operators
for Source Code Characters, tokens, words and phrases.
(unit? Words, phrases and context that specifies types, variable references etc.
unit=66&lesson=70)
Regular expressions and context-free languages.
Mutation Testing Vs. Regular expressions and context-free grammars.
Graphs and Logic
Based Testing (unit? No, the answer is incorrect.
unit=66&lesson=71)

https://onlinecourses.nptel.ac.in/noc24_cs91/unit?unit=66&assessment=220 1/3
10/21/24, 2:57 PM Software Testing - - Unit 11 - Week 8

Score: 0
Practice: Week 8 :
Assignment 8 (Non Accepted Answers:
Graded) Words, phrases and context that specifies types, variable references etc.
(assessment?
4) State true or false: If a mutant is strongly killed, it is also weakly killed. 1 point
name=212)

Week 8 Feedback True.


Form: Software False.
Testing (IIITB) (unit?
Yes, the answer is correct.
unit=66&lesson=170)
Score: 1
Quiz: Week 8 : Accepted Answers:
Assignment 8 True.
(assessment?
name=220) 5) If an expression of the form if (a <= b) is replaced with if (true), then it is an application of which of the 1 point
mutation operators below?
Week 9 ()
Boolean constant replacement.
Week 10 () Logical operator replacement.
Relational operator replacement.
Week 11 ()
True operator replacement.
Week 12 () No, the answer is incorrect.
Score: 0
DOWNLOAD Accepted Answers:
VIDEOS () Relational operator replacement.

Text Transcripts () For the next five questions, consider the code snippet below and the mutation given in line 4. Answer the following with
reference to mutation testing of the code snippet below.
Live sessions ()
1 public static int findVal(int array_num[], int Val)
Books () 2 {
3 int findVal = -1;
4 for (i=0; i < array_num.length; i++)
4 for (i=1; i < array_num.length; i++)
5 if (array_num[i] == Val)
6 findVal = i;
7. return (findVal);
8. }

6) Identify the mutation operator that is applied at statement 4 in the above code snippet. 1 point

Arithmetic operator replacement.


Loop initialization replacement.
Scalar variable replacement.
Constant value replacement.

No, the answer is incorrect.


Score: 0
Accepted Answers:
Scalar variable replacement.

7) Can the mutant be reached if the input array is empty? 1 point

Yes.
No.

No, the answer is incorrect.


Score: 0
Accepted Answers:
Yes.

8) State Yes or No: Is it possible that infection of the mutation occurs when the input array is the empty array? 1 point

Yes.
No.

Yes, the answer is correct.

https://onlinecourses.nptel.ac.in/noc24_cs91/unit?unit=66&assessment=220 2/3
10/21/24, 2:57 PM Software Testing - - Unit 11 - Week 8

Score: 1
Accepted Answers:
No.

9) Which of the following test cases ensures that the mutated statement is infected but propagation does not 1 point
occur?

A test case with the value not in the array will ensure that infection occurs and propagation does not occur.
A test case in which the last occurrence of the value is not in array num[0] will ensure infection and not propagation.
A test case in which the element occurs exactly once in the array will ensure that infection occurs and propagation
does not occur.
A test case in which the last occurrence of the value is anywhere except in the first position will ensure that infection
occurs and propagation does not occur.

No, the answer is incorrect.


Score: 0
Accepted Answers:
A test case in which the last occurrence of the value is not in array num[0] will ensure infection and not propagation.

10) Which of the following test cases will strongly kill the mutant? 1 point

A test case in which the value is not in the array will strongly kill the mutant.
A test case in which the value occurs exactly once at any position in the array will strongly kill the mutant.
A test case in which the value is in the first position of the array will strongly kill the mutant.
A test case in which the value is not in the first position of the array will strongly kill the mutant.

Yes, the answer is correct.


Score: 1
Accepted Answers:
A test case in which the value is in the first position of the array will strongly kill the mutant.

https://onlinecourses.nptel.ac.in/noc24_cs91/unit?unit=66&assessment=220 3/3

You might also like