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

Page identification doesn't use the Base Url

10 Answers 182 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 12 May 2011, 07:26 PM
We record tests using multiple environments.  Two URLs could be http://server1/app1/ and http://server2/app2/.  We set the BaseUrl in the project settings and this works really great for the navigation steps.  But, I am seeing lots of duplication in the Element Tree.  I set the page Compare Mode to RelativeOnly hoping this would ignore the BaseUrl, but it doesn't.  If I am recording against server1, the page logic uses a BaseUrl of http://server1 and a Path of /app1/etc.  I expect that it would use a BaseUrl of http://server1/app1 (matches the project settings) and a Path of /etc.  

This is causing a ton of duplication in the Element Tree. After the page is duplicated, each element on that page ends up getting duplicated.  Is there any way to avoid this?

10 Answers, 1 is accepted

Sort by
0
Shelly
Top achievements
Rank 1
answered on 13 May 2011, 05:59 AM
Jeff,

We had to change our project settings from FullPathAndQuery to just FullPath for the compare mode.  I read a KB article that helped me figure it out:
http://www.telerik.com/automated-testing-tools/support/kb/how-to-deal-with-variable-query-strings-in-url-s.aspx
Maybe this will work for you too.  When I fixed ours, we didn't have very many tests built yet, so I threw the old project out and started fresh ensuring all of the elements had been recorded using the FullPath compare.  It was easier to start over than take time to update everything.

Take care,
Shelly
0
Jeff
Top achievements
Rank 1
answered on 13 May 2011, 02:16 PM
Thanks for the info, Shelly.  Unfortunately, this won't work in my case.  I have to assume that all of your recordings are against a common server and/or virtual directory.  In my case, the server and/or virtual directory can be anything, so I really need to keep those two pieces of information out of the identification logic.
0
Stoich
Telerik team
answered on 13 May 2011, 02:18 PM
Hi Jess,
   first off please take a look at the Compare Mode KB as Shelly suggested in her post. Also, I think you might find this KB on BaseURL helpful:
http://www.telerik.com/automated-testing-tools/support/kb/running-a-test-against-multiple-urls-using-baseurl.aspx

I believe that setting the Compare Mode to Title might do the trick in your case. That is assuming that the applications are identical with the exception of their URLs.

All the best,
Stoich
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Jeff
Top achievements
Rank 1
answered on 13 May 2011, 02:30 PM
Stoich,

I've read that KB article before and it doesn't solve my problem.  In that article, the "MyApplication" virtual directory is consistent across the servers.  I don't have that set up.  Do you understand my dilemma?  Using the title alone will not work because I can't guarantee that titles are unique or even set.  Our application has almost 1000 pages.

Why doesn't the page identification logic honor the Base Url?  That would solve my problem completely.
0
Shelly
Top achievements
Rank 1
answered on 13 May 2011, 02:47 PM
Jeff, our site is on 3 different servers and virtual directories.  It is set up similarly to your example -- the sites I test against have URL's like:
  • Dev:   https://web.domain1.com/AppDEV
  • Test:   https://web.domain1.com/AppTEST
  • Prod:  https://tools.domain2.com/AppPROD
I record everything against the DEV environment.  The BaseURL in my project setting is: https://web.domain1.com/AppDEV and Compare Mode = FullPath  It works exactly the way I need it to -- navigate steps are recorded as "Navigate to /" and the FullPath does prevent dupilcate elements.  When I create test lists, I update the BaseURL property for whichever server I want to test on, and that works well too.

 I had a really hard time with the BaseURL and Compare Modes at first too -- I wish they would update or add a KB article that addresses our example.

Here's the forum thread where I asked these questions a while back:
http://www.telerik.com/automated-testing-tools/community/forums/webui-test-studio-qa-edition/general-discussions/correct-use-of-baseurl.aspx

Hope that helps!

Shelly
0
Jeff
Top achievements
Rank 1
answered on 13 May 2011, 02:54 PM
You are in fact using different URLs, but the key difference between your set up and mine is that you always record against a consistent URL.  If you had some testers recording against https://web.domain1.com/AppDEV and other testers recording against https://web.domain1.com/AppDEV2, you would have the same page/element duplication as I am experiencing.
0
Stoich
Telerik team
answered on 17 May 2011, 12:10 PM
Thank you for the feeback Shelly. Adding KBs on this has been added to our Action items and we'll get to it in the near future.

Meanwhile do you require any additional assistance Jeff? I realize that I haven't been able to provide you with a solution for your automation challenge but I don't really see any good way to workaround this. If you have any suggestions I'll log a FeatureRequest for you.

Best wishes,
Stoich
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Jeff
Top achievements
Rank 1
answered on 17 May 2011, 02:07 PM
I am working this issue through a support ticket at this time.  Once the issue is resolved, I will update this thread with the resolution.
0
Sebastian
Top achievements
Rank 1
answered on 17 May 2011, 05:22 PM
I have been using Web UI to test on five different URLs.
The key to getting it to work for me was to go in to the Elements window(box) when you are in any test in you project, find, by hand, every Frame.  Then look at the Properties windows(box) and replace the front end of the base URL with a  ~
The ~ lets Web UI insert the base URL that you deine in you settings or your test list Base URL.
I record off the same URL most of the time and have my test lists define the Base URLs for testing.
Every time you are ready to run your test list, remember to go through all the Frames again.
Web UI keeps recording the Frames on the Base URL in the settings tab on the main Project tab.
So I keep replacing the front end of the URLs with a ~ every time I need to do a run.
It is a little bit of work, but less than recording against all five servers.
0
Jeff
Top achievements
Rank 1
answered on 09 Jun 2011, 04:22 PM
After a lot of back and forth, Telerik put this in as a feature request on PITS - ID 6426
Tags
General Discussions
Asked by
Jeff
Top achievements
Rank 1
Answers by
Shelly
Top achievements
Rank 1
Jeff
Top achievements
Rank 1
Stoich
Telerik team
Jeff
Top achievements
Rank 1
Sebastian
Top achievements
Rank 1
Share this question
or