| || |
help regarding test case
I am new to the forum so hello to everyone . Two weeks ago while giving analytical test i was asked to write a test case on newspaper publishing site. The requirement was
Every article should be displayed only for 2 days.
After that conditions were given as follows:
Data comparison is tricky. 2 days means since the midnight of today for the given time zone. For example consider cities like chennai,calcuta and delhi.Their time zones are -7,-5 and -4 hours off from IST. So how will you test this fearure . specify preconditions and test steps.
Help is expected from you guys
I don't think help is expected, but certainly appreciated.
Originally Posted by sumitrohankar
1) I think the first step is always clarify requirements until it's painfully obvious.
Is it 2 days from the publish date in your viewing timezone? 2 days from the date the article is published from where it was posted? What is the expected behavior for a expired article? (redirect, forbidden, etc..?)
2) From a technical perspective.
* On the unit/integration level, has your devs put in hooks to allow dependency injection of time? (For example, instead of using the Date.Now() to retrive the date directly from the system, do they create a wrapper DateProvider so you can substitute the date.
* On a manual level, does the day the expiration is performed, is there ways to simulate the expiration sequence faster? For example, if it's a task that expires the date, can you do a DB query followed by a force expiration task trigger?
* On an automation level, are there the proper hooks to force a specific date through the system and trigger the appropriate tasks?
(Most common problem I see here is most Jr developers don't know how to use dependency injection when it comes to system services like date and random numbers. Generally it's the SDET's job to re-architect the SUT in this case to provide that ability. )