Same Element different Environments

4 posts, 0 answers
  1. Licensing
    Licensing avatar
    11 posts
    Member since:
    Dec 2011

    Posted 09 Nov 2015 Link to this post

    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.

     

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 09 Nov 2015 Link to this post

    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!
  3. Licensing
    Licensing avatar
    11 posts
    Member since:
    Dec 2011

    Posted 10 Nov 2015 Link to this post

    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'.

     

  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 10 Nov 2015 Link to this post

    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!
Back to Top