-
1. Re: New Arquillian Drone scopes proposal
jhuska Nov 1, 2013 6:33 AM (in response to kpiwko)It looks good IMHO.
Couple of questions to confirm my understanding:
1.
The purpose of deployment scoped Drone is:
- Give user ability to get URL of the deployment automatically
How will it work in real ? How will be the WebDriver instance coupled with deployment, and how the user can get the URL of it explicitly ? Does it for example mean that calling driver.get("relative/url.html") will prefix a correct context root ? Or is it Droidum specific ...
2. Can you think of some other advantage of SUITE scope driver instance than its availability in @BeforeClass ? Is there some API for cleaning the browser session except WebDriver.close ?
Thanks
-
2. Re: New Arquillian Drone scopes proposal
smikloso Nov 1, 2013 7:17 AM (in response to jhuska)Regarding of 1) I think that when you enter to the first test method (or even before that since it just does not matter when it is open, theoretically somewhere in BeforeClass), web page will be automatically opened for you so you do not need to inject @ArquillianResource URL context into your test and do that manually (almost in all sensible use cases you are doing this in the very first test method all over again). Drone could call it when it is being instantiated. When you have some deployment, you are able to inject @ArquillianResource URL into the test, but you could do that one level deeper with Drone so it would open in for you. When you are not satisfied with the page you got open, you can always do that manually to override what Drone did automatically.
In case of Droidium, when you have @Deployment which is instrumented (by @Instrumentable, it says that you want to drive that APK deployment with WebDriver), you put port number as the argument into it (@Instrumentable(viaPort = "10000") and that in turn means that when you set Drone extension in arquillian.xml and specify its remoteUrl, there is port specified as well. These ports match. By doing this, it is only the implementation thing to connect Drones to deployments and it can be even more simple (in theory, i do not have a poc code in mind) when you specify @OperateOnDeployment on WebDriver.
-
3. Re: New Arquillian Drone scopes proposal
kpiwko Nov 1, 2013 7:38 AM (in response to jhuska)The purpose of deployment scoped Drone is:
- Give user ability to get URL of the deployment automatically
How will it work in real ? How will be the WebDriver instance coupled with deployment, and how the user can get the URL of it explicitly ? Does it for example mean that calling driver.get("relative/url.html") will prefix a correct context root ? Or is it Droidum specific ...
This is twofold at this moment:
- Relative URL support in get methods
- Set browser metadata to point to correct URL - this is mainly valid for Selenium 1
I do not plan to implement automatic opening, because I believe this is work for @InitialPage
2. Can you think of some other advantage of SUITE scope driver instance than its availability in @BeforeClass ? Is there some API for cleaning the browser session except WebDriver.close?
One time setup and a bit faster execution - simulating remoteReusable per suite.
-
4. Re: New Arquillian Drone scopes proposal
aslak Nov 7, 2013 3:30 AM (in response to kpiwko)Any chance that a Suite scoped browser can be configured(attempted) differently between two Test's in the same suite?
Illustration:
TestX
@Drone(Suite, someValue=2)
TestY
@Drone(Suite, someValue=4)
Now which value does the Suite scoped Drone have?
I guess the metadata to locate a instance is Scope+Qualifier and all config is external.
-
5. Re: New Arquillian Drone scopes proposal
kpiwko Nov 10, 2013 8:29 AM (in response to kpiwko)First hit of @Drone(Suite) will create a browser. Any subsequent @Drone(Suite) will just retrieve existing instance. Instance is disposed after suite is finished.
If user wants to have two suite scoped Drones, he would need to use qualifiers.