İstanbul evden eve nakliyat Beylikd¨¹z¨¹ evden eve nakliyat Tuzla evden eve nakliyat
Tutorial-3 To Generate BVA Test Cases-For the Next Date Function
Delicious Bookmark this on Delicious
software testing genius

Tutorial-3 To Generate BVA Test Cases-For the Next Date Function

Welcome to “Software Testing Genius”. Subscribe to my RSS feed for latest content on Software Testing.

Tutorial-3: To Generate BVA Test Cases-For the Next Date Function

Before we generate the test cases for the Next Date Function problem, firstly we need to define the problem domain as described below.

Problem Domain: "Next Date" is a function consisting of three variables like: month, date and year. It returns the date of next day as output. It reads current date as input date.

The conditions are

C1: 1 ≤ month ≤ 12
C2: 1 ≤ day ≤ 31
C3: 1900 ≤ year ≤ 2025.

If any one condition out of C1, C2 or C3 fails, then this function produces an output "value of month not in the range 1...12".

Since many combinations of dates can exist, hence we can simply displays one message for this function : "Invalid Input Date".

Complexities in Next Date

Function

A very common and popular problem occurs if the year is a leap year. We have taken into consideration that there are 31 days in a month. But what happens if a month has 30 days or even 29 or 28 days ?

A year is called as a leap year if it is divisible by 4, unless it is a century year. Century years are leap years only if they are multiples of 400. So, 1992, 1996 and 2000 are leap years while 1900 is not a leap year.

Furthermore, in this Next Date problem we find examples of Zipf's law also, which states that "80% of the activity occurs in 20% of the space". Thus in this case also, much of the source-code of Next Date function is devoted to the leap year considerations.

Objective of this Tutorial: How to Generate BVA Test Cases for this problem?

The Next Date program takes date as input and checks it for validity. If it is valid, it returns the next date as its output.

Here we have three inputs for the program, hence n = 3.

Since BVA yields (4n + 1) test cases according to single fault assumption theory, hence we can say that the total number of test cases will be (4*3+1)=12+1=13.

The boundary value test cases are

Test Case ID

Month (mm)

Day (dd)

Year (yyyy)

Expected Output

1

6

15

1900

16 June, 1900

2

6

15

1901

16 June, 1901

3

6

15

1962

16 June, 1962

4

6

15

2024

16 June, 2024

5

6

15

2025

16 June, 2025

6

6

1

1962

2 June, 1962

7

6

2

1962

1 June, 1962

8

6

30

1962

1 July 1962

9

6

31

1962

Invalid Date as June has 30 Days

10

1

15

1962

16 January, 1962

11

2

15

1962

16 February, 1962

12

11

15

1962

16 November, 1962

13

12

15

1962

16 December, 1962

This is how we can apply BVA technique to create test cases for our Next Date Problem.


Many More Articles & Tutorials on Black Box Testing 

Largest Database of Sample Papers - 1000+ Unique Questions for ISTQB Foundation Exam

ISTQB Foundation Exam - Full Crash Course for Download

ISTQB Advanced CTAL Test Analysts Exam - Full Crash Course for Download


ISTQB Advanced CTAL Test Manager Exam - Full Crash Course for Download


What Successful Testers say about the Quality of this website

If you want to keep track of further articles on Software Testing,
I suggest you to subscribe my
RSS feed
.

You can also Subscribe by E-mail
and get All New articles delivered directly to your Inbox.

Get your Absolutely Free Copy of Several MS PowerPoint Presentations & E-Books related to ISTQB, HP Load Runner, IBM RFT, HP QTP & QC Certification Exams, prepared by Popular Writers & Trainers, by writing to: Software.testing.genius@gmail.com

Full Study Material for Popular Certification Exams:

Study Material - HP QTP & QC Certification Exam

Study Material - IBM RFT Certification Exam

Study Material - HP LoadRunner Certification Exams for All Modules

Study Material - ISTQB Certification Exam

Most Popular Topics in Demand:

Practical Roadmap to QTP Certification

Practical Roadmap to CSTE Certification

Consolidated Study Material - Testing & QA

Rehearsal of QTP in 1 Hr. -  Interview Questions

 

Comments :

comments ↓


Leave Your Comments: (*) Marked Fields are Mandatory

You can apply basic formatting to the text

Name *
 
Email Address *
 
Website
 
Speak your mind
characters
sex hikayeleri