This is a migrated thread and some comments may be shown as answers.

Working concurrently on project with multiple URLs

1 Answer 123 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ME
Top achievements
Rank 1
ME asked on 21 Dec 2010, 08:53 PM
The project I am automating with my collegues is based on an application where each client has their own URL (and database instance).
That application also has a requirement that only one session is "tolerated" for a given client.
So, when client1.CrazyApp.com logs in and there is already a session for client1.CrazyApp.com then the existing session is terminated by the server.

I want to work on the same project with my co-workers using more than one URL to automate testing of the same application without having to worry about being bumped off.

Telerik enables me to change the base URL on the TestList level but not on the Test level, so we keep bumping each other off.

If anyone had to deal with a similar situation and solved the issue - please help.

I would hate to keep the automation completely separate then merge the two parts of the same project as i expect lots of issues and problems.

Much appreciated,

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 27 Dec 2010, 06:47 PM
Hello Avraham,

One thing you can do is to set the BaseURL in a coded step. Once set all subsequent NavigateTo steps will use the setting, including subtests (i.e. tests called vial Test-as-step). Use an environment variable or some sort of a configuration file on your disk to set the BaseURL that is unique per user/tester.

The code to set the BaseURL is like this:

Manager.Settings.BaseUrl = "http://www.bing.com";

Also adjust your NavigateTo steps to look similar to the properties in the attached screenshot. The Host/Server Name must go in the BaseURL property. The path to the webpage on that host goes in the NavigateUrl property.

Once setup, and every test starts with this BaseURL coded step, then each tester will automatically navigate to their unique URL.

Kind regards,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
ME
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or