intern
intern copied to clipboard
Add environment mapping capabilities
Cloud services each use different capabilities to specify environments (e.g. browser, platform, etc.). To provide some standardized behavior, Dig Dug can provide a list of all environments supported by a platform in a normalized format. This allows a user to determine whether a given tunnel supports a requested platform and browser, but it doesn't indicate what properties need to be specified to use that environment through the tunnel.
A better flow might be for a Dig Dug tunnel to accept an environment descriptor that uses standard WebDriver properties (platformName, browserName, browserVersion), plus a generic platformType property, and return a tunnel-specific capabilities object that will select that environment. If the user specifies a subset of environment properties (like just browserName), the returned object should only specify the equivalent subset of properties (not a full specific environment selector).
Maybe no platformType; platformName and platformVersion are probably the way to go there (although the W3C spec only mentions platformName, so...).
Most of the logic for environment selection, like version range handling, could still remain external to Dig Dug (Intern handles this sort of thing now), but there will need to be some mapping. For example, CBT uses os_api_name and browser_api_name instead of browserName + browserVersion and platformName + platformVersion.
This is related to (or at least touches a lot of the same code as) #1064.