16 years ago
Login conditionally
The WebService API that I am testing needs the user to be logged in. I have a test suite called "Global Login" which has a login test step. The result of this step stores the sessionId and the timestamp at the login as project properties.
Each test case in other test suites invokes the login. I want to skip execution of the login test step if the sessionId is not null and timestamp is not more that 30 minutes before the current time. This ensures that we login only when necessary.
Are there ways to do this ?
I started writing a groovy script in the "Global Login" test suite that checks the condition. But i don't know how to skip the login test step if the session id exists.
Each test case in other test suites invokes the login. I want to skip execution of the login test step if the sessionId is not null and timestamp is not more that 30 minutes before the current time. This ensures that we login only when necessary.
Are there ways to do this ?
I started writing a groovy script in the "Global Login" test suite that checks the condition. But i don't know how to skip the login test step if the session id exists.