4

I am testing a web application. This is the scenario: An agent signs up by providing some details like email etc The agent then receives an email with a Registration link that expires after 15 days. My question is how can I test that the link expires after 15 days?

1
  • 1
    Treat time as a dependency - you should be able to "time travel" to when the link would be expired. More details than that would depend on the details of the specific system you're working with. – jonrsharpe Apr 1 '20 at 19:10
3

There could be more options, some that come to mind right now:

  • The number of days should be an easily configurable number, definitely not a hard-coded value. It should be possible to change it with no need to release a new version of the application. Therefore you can test that the system is picking up different values. You can choose lower numbers for the tests.
  • There might (likely) be a date information of when the link was generated. E.g. you generate the link and store it in a database along with the date(time) is was generated. You might be able to change it 15 (any other number of) days into the past and test it.
  • There are containers that allow you to time-travel, if you google something like "time travel testing", you will find more information.

It all depends on what options you have on your projects/in your company. Some companies/projects will have only some of these options (or some other I don't know about). Points #1 and #2 should be possible almost everywhere (unless the company won't let you access the database etc. (only read permissions etc.)).

1

It is one of the typical time-bounded scenario that requires validation during signup testing. In this case, the 15 days wait period impacts the QA completion estimates.

The most feasible approach followed by the manual testing services to verify these time-bounded scenarios is to coordinate with the dev team and reduce the duration to 1-2 days on testing environments.

The significant check is to ensure, that the link gets expire after a particular interval of time. So, the results obtained with 1-2 days duration will be similar to the 15 days on production env.

0

1). Go to the configuration page or ask from the developer to set the 15 days value to 15 minutes or to a lesser amount.

2). Keep the link as it is and change the system date time or the back end date time to 15 days ahead.

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.