Custom Search

Test Case writing questions and answers

1 Test Case writing questions:

10 test cases for entering 3 values representing

sides of a triangle and the program giving output as scalene, isosceles or

equilateral (10 Marks)

Test cases:

Assume 3 sides of the triangle has A, B, and C

S.No.

Test case Name

Description

Expected Result

1

Check Scalene triangle

Enter input  as A=8, B=5 and C=7

Output should be scalene triangle

2

Check Scalene triangle

Enter input  as A=200, B=400 and C=900

Output should be scalene triangle

3

Check  isosceles triangle

Enter input  as A=8, B=10 and C=10

Output should be isosceles triangle

4

Check  isosceles triangle

Enter input  as A=800, B=700 and C=700

Output should be isosceles triangle

5

Check  equilateral triangle

Enter input  as A=15, B=15 and C=15

Output should be equilateral triangle

6

Check  equilateral triangle

Enter input  as A=190, B=190 and C=190

Output should be equilateral triangle

7

Check Negative values

Enter input  as A= -6, B=-15 and C=-14

Error message should be displayed

8

Check Negative values

Enter input  as A= 6, B=15 and C=-15

Error message should be displayed

9

Check Negative values

Enter input  as A= 6, B=-16 and C=-15

Error message should be displayed

10

Check Zero values

Enter input  as A= 6, B=16 and C=0

Error message should be displayed

We can write so many test cases like above.  We can have many combinations for all the above test cases.

 

1 Output of a calculator and finding the error in the output, write the defect log

for the bug (5 Marks)

Defect Log/Report:

Summary: Wrong result displayed as output of calculator program when adding two numbers

Description: Wrong result displayed when adding two numbers

 

Step to reproduce:

Step 1: Enter first number

Step 2: Click on plus (+) symbol

Step 2: Enter second number

Step 3: Click on equal (=) symbol

Step 4: Verify the result

Severity: High

Priority: High

Project/Program: Calculator

Defect detected by: Name of the tester

Assigned to: Developer Name

Detected on date: Current date

Attachments: Attachments (Screenshots, any supporting files)

 

1 Ques on weather Dev should do the testing or not. Give 3 reason on favour and 2

against it. (5 Marks)

Pros:

1.     Developers should test the code they write.  So that they can make sure their code is working as expected. This is called as Unit testing. They are technically sound

2.     Developer has good knowledge on coding/programming and they know where programs generally give errors. They can find it very easily.

3.     They have complete knowledge on the unit/piece of code they have developed. It's very easy for them to catch the errors in short period of time

         

Cons:

4.     They may not have complete knowledge on the application/product they are developing. i.e. lack of domain knowledge

5.    They don't have the testing knowledge to perform effective testing. Only testers know different methodologies in testing a application or product.

6.    Personal confidence on the code they developed and they may not test all functionalities completely

 

1 Question diff between priority of a bug and severity of a bug. Give example of

one case where priority is high but severity is low and one case where severity is

high bur priority is low

Defect Severity determines the defect's effect on the application where as Defect Priority determines the defect urgency of repair. Severity is given by Testers and Priority by Developers 

Example:

Low Severity & High Priority : If there is a spelling mistake or content issue on the homepage of a website which has daily hits of lakhs. In this case, though this fault is not affecting the website or other functionalities but considering the status and popularity of the website in the competitive market it is a high priority fault

High Severity & Low Priority : For example an application which generates some banking related reports weekly, monthly, quarterly & yearly by doing some calculations. If there is a fault while calculating yearly report. This is a high severity fault but low priority because this fault can be fixed in the next release as a change request.

 

1 Question on a program that calculates P=R/I where R, I are integer inputs and P

a floating point output. Write 10 test cases for this - 5 Marks.

 

S.No.

Test case Name

Description

Expected Result

1

Check output as float

Enter input  as R=3 and I=2

Output should be a floating point number. P must be equal to 1.5

2

Check output as Integer

Enter input  as R=4 and I=4

Output should not be a floating point number. P must be equal to 1

3

Check output as minus number

Enter input  as R=-8 and I=2

Output should not be a floating point number. P must be equal to -4

4

Check output as minus number

Enter input  as R=8 and I=-2

Output should not be a floating point number. P must be equal to 6

5

Check output as float

Enter input  as R=1 and I=25

Output should be a floating point number. P must be equal to 0.04

6

Check output as float

Enter input  as R=100 and I=300

Output should be a floating point number. P must be equal to 0.33333333333333

7

Check output as a zero

Enter input  as R=100 and I=100

Output should not be a floating point number. P must be equal to 0

8

Check output as a zero

Enter input  as R=-200 and I=-200

Output should not be a floating point number. P must be equal to 0

9

Check output as Integer

Enter input  as R=900 and I=900

Output should not be a floating point number. P must be equal to 1

10

Check output as Integer

Enter input  as R=878686775 and I=6778887

Output should not be a floating point number.

 

 

 

 

 

Like above we can have so many combinations of test cases. Testing is a never ending task. 100% testing is not at all possible on any application or product.

2 comments:

Anonymous said...

Good set of questions

Anonymous said...

===========================================================
===========================================================
===========================================================
===========================================================



Free Downl0ad N0 Survey Click Here Download N0W

Free Downl0ad N0 Survey Click Here Download N0W
Free Downl0ad N0 Survey Click Here Download N0W
Free Downl0ad N0 Survey Click Here Download N0W
Free Downl0ad N0 Survey Click Here Download N0W
Free Downl0ad N0 Survey Click Here Download N0W
Free Downl0ad N0 Survey Click Here Download N0W

===========================================================
===========================================================
===========================================================
===========================================================
===========================================================

.

.

.

.

.

.

.

.

.

.

.

.

.

.
.

.

.

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

.

.

.