SELENIUM-289: enable dynamic tenant hostname

Merged
#48 · Created  · Last updated

Merged pull request

Merged in issue/SELENIUM-289-enable-dynamic-tenant-hostname (pull request #48)

c8d735e·Author: ·Closed by: ·2017-07-21

Description

I suffered a little from analysis paralysis on this one, and tried a few things before settling on what I've presented here.

One alternative I tried was using CGLIB (since the product-specific test objects are not behind an interface) to return a proxy of the product, such that this worked without modification:

static final JiraTestedProduct JIRA = TestedProductFactory.create(JiraTestedProduct.class); ... MultiTenant.productForHost(JIRA, "hostname").gotoHomePage();

With all calls to the tested product being intercepted to set/unset the host before/after. That worked, but then I was worried it was a overly complex and might have some performance impact when used in anger. Furthermore, I realised it was somewhat pointless since TestedProduct has a one-to-one mapping to a browser process.

I thus just settled on setting the product on the host, with a convenience rule for resetting the host if necessary.

0 attachments

0 comments

Loading commits...