-
Notifications
You must be signed in to change notification settings - Fork 62
Be more flexible with selecting a way to execute tests #23
Comments
A simple solution that might work is the following Create several scenario's for each approach one, for instance:
| scenario | start local |
etc... Now in each test (or in your SuiteSetUp) you start with calling this scenario, but rather than using the name, use a variable: When running the test from your CI system, just start with setting the correct variable for the environment, the rest is done automatically. Regards, Cirilo On 3 nov 2011( w 44), at 11:34, Arjan Molenaar wrote:
|
Fair enough. But the selenium 2 remote (web driver) functionality exposes yet another interface. Of course we can add a new method to the code, but still, it's not ideal. Having a strict separation between selenium 1 (remote server) and Selenium 2 is a pre, though. |
... and how to deal with username and access key? You don't want those directly in your pages. |
Maven/ant can take care of the user credentials. Apart from that I think Cirilo's approach is the simplest. It makes it explicit in FitNesse what can be executed. |
I've been running some tests with Sauce Labs today. It strikes me as annoying that I have to change my start-browser command every time I want to test on another environment.
The dependency on browser can be dealt with by defining it as a variable. However I can test to:
| start browser | firefox | on url | http://example.saucelabs.com |
| start browser | firefox | on url | http://example.saucelabs.com | using remote server |
| Need to come up with something, key-value pairs have to be defined in a Capabilities object and passed to a RemoteWebDriver instance |
| start browser | { "username": "your name", "access-key": "some-uuid", "os": "Windows 2003", "browser": "firefox", "browser-version": "7", "name": "Testing Selenium 1 from Xebium" } | on url | http://example.saucelabs.com | using remote server on host | ondemand.saucelabs.com | on port | 80 |
For each version different statements are included. This makes it very complex to switch from one config to another (in a CI setting it's not possible even).
One solution would be to use the syntax as shown in option 4. and allow that to be used for option 1 as well (they're different code paths now!). The org.json.json package is already included through Selenium-server, so we already have that dependency. Defining a special words
remote-server
with a formatserver:port' will make the
| using remote server |part obsolete. Making
remote-serveran empty string would default to
localhost:4444`.TODO: How to distinguish between WebDriver and Http (Selenium 1) driver?
How can this be easily configured in a CI setting? Do we want a property file/system property to set this?
The text was updated successfully, but these errors were encountered: