Forum Discussion

tbom's avatar
tbom
Contributor
9 years ago
Solved

Making tests "transport agnostic" (https vs http)

I've seen a problem here, where we have two test environemnts running basically the same code drop (internal test, and staging environment)

 

the internal test environment are using plain HTTP, while the staging environment is using HTTPS.

 

If i'm using nameMapping to make my code more manageable, then it stores the http / https in the URL propperty of the mapped objects.

 

It seems that it's not safe to just replace it with a * (wildcard) as it has a harder time mapping the objects. So is there any other way to fix this? (Other than switch all test environments to use the same protocol)

 

  • Replace already mapped "https" to "http*". (I edit NameMapping.tcNM with notepad.exe). After that create Name Mapping template for Links (and Images) and choose identification properties with no protocol inside it's values (pathname? innerText? whatever). And do not use condotional mapping in this case.

2 Replies

    • EVarnavsky's avatar
      EVarnavsky
      SmartBear Alumni (Retired)

      Replace already mapped "https" to "http*". (I edit NameMapping.tcNM with notepad.exe). After that create Name Mapping template for Links (and Images) and choose identification properties with no protocol inside it's values (pathname? innerText? whatever). And do not use condotional mapping in this case.