1

I am new to Manual testing.

Can someone help me out in finding the Boundary Value Analysis for date fields like "Day" or "Month"?

  • 1
    A BVA is not possible for a single field like Day when you want to check for valid dates, because you have to take Month and Year into the check. So only the whole date can be checked (see answer of log_file). The only thing you can single check are the limits that are not acceptable in any case, like day 0 or month -1 . – bish Aug 7 '15 at 9:58
1

If you've read about Boundary Value Analysis, you must know that we test the extreme limits of inputs in this type of testing.

Since you have asked for "Day" or "Month", let me try and give you combination of both.

- Non Leap Year ( eg is year 2007,2009)

We can use these combination of inputs

  • Test Data exactly at the boundary of the input (01/01/2007 or 01/31/2007 for months with 31 days and 04/01/2007 or 04/30/2007 for months ending with 30 days)

  • Test Data below the boundary of the input ( that would be a combination of invalid months like 00/00/2007 or 00/01/2007)

  • Test Data beyond the boundary of the input ( again a combination of 32/08/2007 or 32/13/2007).

  • Test for one extra day in Feb ( try entering 29/02/2007- which shouldn't be accepted)

-For leap year

  • Test the three scenarios from above.

  • Now we know that in leap year, we have one extra day in February, so the last scenario (29/02) would be acceptable. Add one more day and then test it (something like 30/02/2008)

| improve this answer | |
1

From the wiki page that you have linked:

Boundary value analysis is a software testing technique in which tests are designed to include representatives of boundary values in a range.

The first step is to understand the above sentence. Do you understand it? If not, which part of the sentence do you not understand?

From the sentence, it naturally follows that the first step to performing BVA is to determine the actual boundaries.

  • Day: for some months, the boundaries are 1 to 31, for others, the boundaries are 1 to 30, and for February, the boundaries are either 1 to 28 or 1 to 29 depending on the year. So for BVA you would be testing around values such as 0, 1, 2 for the lower boundary, and 27, 28, 29. 30, 31, 32 for the upper boundary. Since the actual boundaries are related to month and year, it would not be possible to perform correct or meaningful BVA just on the day field alone.
  • Month: 1 to 12 (or 13 if you are on Chinese calendar I guess). Thus you want to test around 0, 1, 2 for the lower boundary and 11, 12, 13 for the upper boundary.
| improve this answer | |
0

Given the example of testing date field with the Boundary Value Analysis technique might be too broad to explain. Apart from the correct and incorrect date boundary. I would like to ask you to add your Test requirement or Test objective to consider.

Given an example situation; I'm testing the show booking web application which one of the requirement is

If user makes a booking for show date between 5th - 10th of every month, they will get 10% discount.

When apply Boundary Value Analysis for this testing, we interest in the boundary value for each partition of input to make sure the functionality is correct. Therefore the date 4th, 5th, 10th and 11th should be considered to be tested. and the result should be:

  • Show that book on the 4th => no discount
  • Show that book on the 5th => 10% discount
  • Show that book on the 10th => 10% discount
  • Show that book on the 11th => no discount

You can find that we have no need to test all possible of input to make sure the functionality is correct. We use this technique to reduce number of test case but still remain the same level of confident when test the software.

We usually use the Boundary Value Analysis technique with another technique called Equivalence Partitioning to choose effective input in range to be tested. Please check it out.

Hope it helps. :)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.