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

Same Element different Environments

3 Answers 97 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Licensing
Top achievements
Rank 1
Licensing asked on 09 Nov 2015, 04:59 PM

Okay, I have multiple environments (Dev, UAT, Stage and Production). Currently I am creating automated tests in our Dev environment. The idea is to use the same test to run in other environments. When I try it, I notice that nothing happens because the primary target for the element is different depending on the environment it is in. I've attached screenshots for examples, and each environment are accessed through different URLs (http://devapp/ and http://uatapp/). Is there a way to make this work? Or will I have to create a new test for each environment. Thanks in advance.

 

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 10 Nov 2015, 03:35 AM
Hi,

What makes you believe that "the primary target for the element is different depending" is actually the problem? Do you get an error message? What does it say?

To explain in more detail, the Primary Target you're looking at is nothing more than a path to an element contained in our repository and that element has a Find Expression. It's this Find Expression that Test Studio actually uses at runtime to locate the right target element on whatever page happens to be currently loaded in the browser at that time. Test Studio actually doesn't test, doesn't care what page is currently loaded. As long as the find expression for both elements (UATCAPisHub versus DEVCAPisHub) is identical the test should work just fine.

Lastly we have this KB article describing how to design tests to run in multiple environments. We also have this KB article showing you how to merge duplicate page nodes together.

If you still need assistance please let the test fail then go to Step Failure Details, find and click Export then attach the generated .zip file. It contains valuable information we need to diagnose this type of failure.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Licensing
Top achievements
Rank 1
answered on 10 Nov 2015, 04:36 PM

Cody,

I tried to run a quick Test List and I'm getting the following error:

c:\Users\egibens\Documents\Test Studio Projects\ReportsProject\Pages.g.cs(1458,32) : error CS0311: The type 'ArtOfTest.WebAii.Controls.Xaml.Silverlight.SilverlightTestElement' cannot be used as type parameter 'TControl' in the generic type or method 'ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get<TControl>(params string[])'. There is no implicit reference conversion from 'ArtOfTest.WebAii.Controls.Xaml.Silverlight.SilverlightTestElement' to 'ArtOfTest.WebAii.Controls.Control'.

 

0
Cody
Telerik team
answered on 10 Nov 2015, 10:44 PM
Hello,

That is a very strange and odd compile error, something that should not be possible to get. I'd like to diagnose what's causing this compile error. To do that I need a copy of your entire test project. Can you send it to me? I don't need access to your website, I'll just work on fixing this compile error.

Please put the entire test project folder into a .zip file (you can leave out the Backup folder and the Results folder) then attach that .zip file to this support ticket for analysis. If that .zip file is larger then 20MB (the size limit on our system) let me know and I'll provide and alternate location to upload it to.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Licensing
Top achievements
Rank 1
Answers by
Cody
Telerik team
Licensing
Top achievements
Rank 1
Share this question
or