toshi


{ City } jaipur
< Country > india
* Profession * student
User No # 117912
Total Questions Posted # 13
Total Answers Posted # 12

Total Answers Posted for My Questions # 12
Total Views for My Questions # 89532

Users Marked my Answers as Correct # 159
Users Marked my Answers as Wrong # 19
Questions / { toshi }
Questions Answers Category Views Company eMail

write test cases for flipkart.

Test Cases 10382

How many test cases are necessary to cover all the possible sequences of statements (paths) for the following program fragment? Assume that the two conditions are independent of each other: if (Condition 1) then statement 1 else statement 2 end if if (Condition 2) then statement 3 end if A. 2 Test Cases B. 3 Test Cases C. 4 Test Cases D. Not achievable

ISTQB,

1 Test Cases 2038

Given the following: Switch PC on Start "outlook" IF outlook appears THEN Send an email Close outlook A. 1 test for statement coverage, 1 for branch coverage B. 1 test for statement coverage, 2 for branch coverage C. 1 test for statement coverage. 3 for branch coverage D. 2 tests for statement coverage, 2 for branch coverage E. 2 tests for statement coverage, 3 for branch coverage

ISTQB,

1 Test Cases 16680

IF A > B THEN C = A – B ELSE C = A + B ENDIF Read D IF C = D Then Print "Error" ENDIF A. 1 test for statement coverage, 3 for branch coverage B. 2 tests for statement coverage, 2 for branch coverage C. 2 tests for statement coverage. 3 for branch coverage D. 3 tests for statement coverage, 3 for branch coverage E. 3 tests for statement coverage, 2 for branch coverage

ISTQB,

1 Test Cases 5332

Consider the following: Pick up and read the newspaper Look at what is on television If there is a program that you are interested in watching then switch the the television on and watch the program Otherwise Continue reading the newspaper If there is a crossword in the newspaper then try and complete the crossword A. SC = 1 and DC = 1 B. SC = 1 and DC = 2 C. SC = 1 and DC = 3 D. SC = 2 and DC = 2 E. SC = 2 and DC = 3

ISTQB,

1 Test Cases 7784

Given the following code, which is true about the minimum number of test cases required for full statement and branch coverage: Read P Read Q IF P+Q > 100 THEN Print "Large" ENDIF If P > 50 THEN Print "P Large" ENDIF A. 1 test for statement coverage, 3 for branch coverage B. 1 test for statement coverage, 2 for branch coverage C. 1 test for statement coverage, 1 for branch coverage D. 2 tests for statement coverage, 3 for branch coverage E. 2 tests for statement coverage, 2 for branch coverage

ISTQB,

1 Test Cases 2678

Disc = 0 Order-qty = 0 Read Order-qty If Order-qty >=20 then Disc = 0.05 If Order-qty >=100 then Disc =0.1 End if End if A. Statement coverage is 4 B. Statement coverage is 1 C. Statement coverage is 3 D. Statement Coverage is 2

ISTQB,

1 Test Cases 7513

What is the smallest number of test cases required to Provide 100% branch coverage? If(x>y) x=x+1; else y=y+1; while(x>y) { y=x*y; x=x+1; } A. 1 B. 2 C. 3 D. 4

ISTQB,

1 Test Cases 7536

If the pseudo code below were a programming language ,how many tests are required to achieve 100% statement coverage? 1. If x=3 then 2. Display_messageX; 3. If y=2 then 4. Display_messageY; 5. Else 6. Display_messageZ; 7. Else 8. Display_messageZ; A. 1 B. 2 C. 3 D. 4

ISTQB,

1 Test Cases 5066

Using the same code example as question 17,how many tests are required to achieve 100% branch/decision coverage? A. 1 B. 2 C. 3 D. 4

ISTQB,

1 Test Cases 2217

This part of a program is given: WHILE (condition A) Do B END WHILE How many decisions should be tested in this code in order to achieve 100% decision coverage? A. 2 B. Indefinite C. 1 D. 4

ISTQB,

1 Test Cases 12041

Analyze the following highly simplified procedure: Ask: "What type of ticket do you require, single or return?" IF the customer wants ‘return’ Ask: "What rate, Standard or Cheap-day?" IF the customer replies ‘Cheap-day’ Say: "That will be £11:20" ELSE Say: "That will be £19:50" ENDIF ELSE Say: "That will be £9:75" ENDIF Now decide the minimum number of tests that are needed to ensure that all the questions have been asked, all combinations have occurred and all replies given. A. 3 B. 4 C. 5 D. 6

ISTQB,

1 Test Cases 6690

For the following piece of code, how many test cases are needed to get 100% statement coverage? Procedure X Read (Color) // Input color from user IF (Color == “Red”) THEN Call Roses(Color) ELSEIF (Color == “Blue”) THEN Call Violets(Color) ELSE PRINT “User is no Shakespeare” SaveToDatabase(Color) End Procedure X A. 5 B. 3 C. 1 D. 2

ISTQB,

1 Test Cases 3575




Answers / { toshi }

Question { ISTQB, 2038 }

How many test cases are necessary to cover all the possible sequences of statements (paths) for the following program fragment? Assume that the two conditions are independent of each other:

if (Condition 1)

then statement 1

else

statement 2

end if

if (Condition 2)

then statement 3

end if

A. 2 Test Cases

B. 3 Test Cases

C. 4 Test Cases

D. Not achievable


Answer

A

Is This Answer Correct ?    0 Yes 0 No

Question { ISTQB, 16680 }

Given the following:

Switch PC on

Start "outlook"

IF outlook appears THEN

Send an email

Close outlook

A. 1 test for statement coverage, 1 for branch coverage

B. 1 test for statement coverage, 2 for branch coverage

C. 1 test for statement coverage. 3 for branch coverage

D. 2 tests for statement coverage, 2 for branch coverage

E. 2 tests for statement coverage, 3 for branch coverage


Answer

B

Is This Answer Correct ?    25 Yes 6 No


Question { ISTQB, 5332 }

IF A > B THEN

C = A – B

ELSE

C = A + B

ENDIF

Read D

IF C = D Then

Print "Error"

ENDIF

A. 1 test for statement coverage, 3 for branch coverage

B. 2 tests for statement coverage, 2 for branch coverage

C. 2 tests for statement coverage. 3 for branch coverage

D. 3 tests for statement coverage, 3 for branch coverage

E. 3 tests for statement coverage, 2 for branch coverage


Answer

B

Is This Answer Correct ?    5 Yes 0 No

Question { ISTQB, 7784 }

Consider the following:

Pick up and read the newspaper

Look at what is on television

If there is a program that you are interested in watching then switch the the television on and watch the program

Otherwise

Continue reading the newspaper

If there is a crossword in the newspaper then try and complete the crossword

A. SC = 1 and DC = 1

B. SC = 1 and DC = 2

C. SC = 1 and DC = 3

D. SC = 2 and DC = 2

E. SC = 2 and DC = 3


Answer

E

Is This Answer Correct ?    8 Yes 0 No

Question { ISTQB, 2678 }

Given the following code, which is true about the minimum number of test cases required for full statement and branch coverage:

Read P

Read Q

IF P+Q > 100 THEN

Print "Large"

ENDIF

If P > 50 THEN

Print "P Large"

ENDIF

A. 1 test for statement coverage, 3 for branch coverage

B. 1 test for statement coverage, 2 for branch coverage

C. 1 test for statement coverage, 1 for branch coverage

D. 2 tests for statement coverage, 3 for branch coverage

E. 2 tests for statement coverage, 2 for branch coverage


Answer

B

Is This Answer Correct ?    2 Yes 0 No

Question { ISTQB, 7513 }

Disc = 0

Order-qty = 0

Read Order-qty

If Order-qty >=20 then

Disc = 0.05

If Order-qty >=100 then

Disc =0.1

End if

End if

A. Statement coverage is 4

B. Statement coverage is 1

C. Statement coverage is 3

D. Statement Coverage is 2


Answer

B

Is This Answer Correct ?    10 Yes 2 No

Question { ISTQB, 7536 }

What is the smallest number of test cases required to Provide 100% branch coverage?

If(x>y) x=x+1;

else y=y+1;

while(x>y)

{

y=x*y; x=x+1;

}

A. 1

B. 2

C. 3

D. 4


Answer

B

Is This Answer Correct ?    6 Yes 1 No

Question { ISTQB, 5066 }

If the pseudo code below were a programming language ,how many tests are required to achieve 100% statement coverage?

1. If x=3 then

2. Display_messageX;

3. If y=2 then

4. Display_messageY;

5. Else

6. Display_messageZ;

7. Else

8. Display_messageZ;

A. 1

B. 2

C. 3

D. 4


Answer

C

Is This Answer Correct ?    3 Yes 1 No

Question { ISTQB, 2217 }

Using the same code example as question 17,how many tests are required to achieve 100% branch/decision coverage?

A. 1

B. 2

C. 3

D. 4


Answer

C

Is This Answer Correct ?    0 Yes 0 No

Question { ISTQB, 12041 }

This part of a program is given:

WHILE (condition A) Do B

END WHILE

How many decisions should be tested in this code in order to achieve 100% decision coverage?

A. 2

B. Indefinite

C. 1

D. 4


Answer

A

Is This Answer Correct ?    81 Yes 7 No

Question { ISTQB, 6690 }

Analyze the following highly simplified procedure:

Ask: "What type of ticket do you require, single or return?"

IF the customer wants ‘return’

Ask: "What rate, Standard or Cheap-day?"

IF the customer replies ‘Cheap-day’

Say: "That will be £11:20"

ELSE

Say: "That will be £19:50"

ENDIF

ELSE

Say: "That will be £9:75"

ENDIF

Now decide the minimum number of tests that are needed to ensure that all the questions have been asked, all combinations have occurred and all replies given.

A. 3

B. 4

C. 5

D. 6


Answer

A

Is This Answer Correct ?    13 Yes 1 No

Question { ISTQB, 3575 }

For the following piece of code, how many test cases are needed to get 100% statement coverage?

Procedure X

Read (Color) // Input color from user

IF (Color == “Red”) THEN

Call Roses(Color)

ELSEIF (Color == “Blue”) THEN

Call Violets(Color)

ELSE

PRINT “User is no Shakespeare”

SaveToDatabase(Color)

End Procedure X

A. 5

B. 3

C. 1

D. 2


Answer

B

Is This Answer Correct ?    6 Yes 1 No