Forum Discussion

HirendraSingh's avatar
HirendraSingh
Contributor
1 day ago

Application url change management

Hello, I just wanted to know how you guys are managing the application URL for web projects, as in our organization we need to check application on different urls and currently I am manging it with project variable with common url and then using (*) like http://www.google.com/page/*  but the problem I am facing sometimes is some similar object getting mapped under single page eventhough the pages are different and tests sometimes fails.

6 Replies

  • Hassan_Ballan's avatar
    Hassan_Ballan
    Icon for Champion Level 3 rankChampion Level 3

    You can google "what are the URL parts" to do some reading. A URL can contain a protocol, subdomain, root domain, path, query, and fragment.

    TestComplete NameMapping is organized by Pages that reference unique URL's. You can use wildcards in Pages URL's; however, when URL's are not unique enough, TestComplete can get confused.

    Starting a browser session and navigating to the URL specified in a variable is perfect for environment switching for example DEV, QA, and UAT. For example:
    *-apps.tuvsud.com/GCN/Pages/Default
    *-apps.tuvsud.com/GCN/Pages/List
    *-apps.tuvsud.com/GCN/Pages/Probation

    Making a single TestComplete page to store all your mapping is problematic as you are facing, some pages have similar objects and can fail. For example:
    *-apps.tuvsud.com/GCN/Pages/*

    You need to maintain a balance of unique Pages but also include flexibility to reduce number of Pages mappings. For example:
    *-apps.tuvsud.com/GCN/Pages/Default/*
    *-apps.tuvsud.com/GCN/Pages/List/*
    *-apps.tuvsud.com/GCN/Pages/Probation/*

    If this resolves your scenario, marking it as the solution helps future readers find it quickly.

    • HirendraSingh's avatar
      HirendraSingh
      Contributor

      Below is the different url of different pages and I am using https://int-apps.tuvsud.com/GCN/Pages/*  in Project variable so that all the objects will map under single page.
      https://int-apps.tuvsud.com/GCN/Pages/Default  

      https://int-apps.tuvsud.com/GCN/Pages/List   

      https://int-apps.tuvsud.com/GCN/Pages/Probation 

      • rraghvani's avatar
        rraghvani
        Icon for Champion Level 3 rankChampion Level 3

        This example is based on the website https://www.w3schools.com. I've built the name mapping hierarchy structure shown below.

        URL https://www.w3schools.com/css/default.asp

        URL https://www.w3schools.com/html/default.asp

        Though both pages contain a Title and two buttons "< Home" and "Next >". They belong to different pages of the hierarchy - you have to create individual components so that they have unique relationships between parent and child.

        You can modify the hierarchy structure of Aliases, so that you can access the components like so

        Aliases.pageCssTutorial.linkHome
        Aliases.pageCssTutorial.linkNext
        Aliases.pageJavascriptTutorial.textnodeTitle

        If the domain name changes https://www.uat-w3schools.com or https://www.reg-w3schools.com then I can use wildcard to replace uat or reg with "*" so it becomes https://www.*-w3schools.com.

        It's vital the get the name mapping structure correct, for TestComplete to identify the correct objects. Each child object, must have a parent object.

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    Using Wildcards - The asterisk wildcard corresponds to a string of any length (including an empty string). The question mark corresponds to any single character.

    If this website https://www.w3schools.com/ were to have different domains names for UAT, Regression, Production Support in the form of https://www.uat-w3schools.com/, https://www.reg-w3schools.com/, https://www.ps-w3schools.com/. Then use  wildcard like so https://www.*-w3schools.com/. All pages (child objects) belong to the domain name (parent)

    You need to identify the relationship between child and parent objects, and structure your name mapping accordingly