Forum Discussion

brook_grewcock's avatar
brook_grewcock
Contributor
12 years ago
Solved

Comparison Testing Between Servers

We have two servers http://dev1.company.com and http://dev2.company.com. And I would like to record a test in one and run it under both URLs, but once I have recorded a test on dev1, if I change my Run Browser URL to load dev2, then none of the on screen objects are recognised. If I inspect the elements I can see 



dev1 username field:

Aliases.browser.pageCompanyLogin.formCtl01.panelPage.panelBodyContainer.panelContentTextContainer.panelContentTextPadding.panelPanelBlue.panelPanelBlueContent.panelPanelBlueContentPad.tableFormTable.cell.textboxMaincontentUsername



dev2 username field:

Aliases.browser.pageCompanyLogin1.formCtl01.panelPage.panelBodyContainer.panelContentTextContainer.panelContentTextPadding.panelPanelBlue.panelPanelBlueContent.panelPanelBlueContentPad.tableFormTable.cell.textboxMaincontentUsername



So I can see that the dev2 username field is being recognised as a new object and I am not sure how to fix this.



I have found the 'Tested Host' and 'Record Tested Host As' setting, but recording a test under dev1 and asking this to replace dev1 with dev2 doesn't work.



Does anyone know how I can get cross server testing working?

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Icon for Champion Level 2 rankChampion Level 2
    Hi,



    As per your example, tests recorded on dev1 and dev2 servers differ by how pageCompanyLogin element was automatically mapped. You should examine the difference in mapping for those two objects in NameMapping editor in TestComplete, select stable properties that can be used for reliable identification of this object and correct name mapping.

    I would recommend to watch the "Creating Reliable Tests For Dynamic Objects with Name Mapping" from  http://support.smartbear.com/support/screencasts/testcomplete/reliable-tests-for-dynamic-objects/ (http://support.smartbear.com/screencasts/testcomplete/).

  • This helped with two issues.


     


    Firstly my name mapping now knows the web pages as http://dev*.company.com. So I am using a wildcard to tell the name mapping that it doesn't matter which dev site number I am using.


     


    And then I am using the extended find with a map on a combobox's ObjectIdentifyer with the extended find turned on to find it in a dynamic page structure.


     


    Thank you.