brook_grewcock
12 years agoContributor
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?
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?
- 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/).