Question: (SOFTWARE ENGINEERING BASED QUESTION) Consider the following simple program P that contains an error at line 3.A mutant M, obtained by replacing this line as

(SOFTWARE ENGINEERING BASED QUESTION)

Consider the following simple program P that contains an error at line 3.A mutant M, obtained by replacing this line as shown,is the correct program.The mutant operator used here to replace a variable by a constant from within a program.In C, this operator is named CRCR.Thus the error in the program is modelled by a mutation operator.

1 input x,y

2 if x

3 z=x*(y+x) <---- Z=x*(y+1)

4 else

5 z=x*(y-1)

Construct a test case t1 the causes p to fail and establish the relation P(t1)!=M(t1).Can u construct a test case t2 on which P is successful,but P(t2)!=M(t2) does not hold?Construct a test set T that is adequate with respect to decision coverage that does not reveal the error.Does any test in T distinguish M from P

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!