0

I am trying to run a serenity test locally via browserstack. I have downloaded the following test repo: https://github.com/browserstack/serenity-browserstack

replaced my browserstack credentials and run the following command mvn clean verify -P local.

I am using the browserstack chrome extension on my mac but whenever i use the command nothing happens, there is no activity on the remote browser screen.

And when looking in browserstack Automate tab i see that a test has been run but the local is false...

what am i doing wrong?

R.Stevens
  • 115
  • 2
  • 12

1 Answers1

1

To enable local testing BS Automate needs this capability as well as their BrowserStackLocal binary should be up and running before the test executes.

I see that their code starts the BrowserStackLocal binary programmatically (replacement of chrome extension) before test begins.

Do verify that the 'browserstack.local' capability is correctly set to 'True'. This should enable the local testing and use the binary connection which is being spawned by above code.

P.S : Chrome's BS local extension wont be used by BS Automate, it is used only by BS Live.

  • Using the binary has given me the following error: com.browserstack.local.LocalException: Either another browserstack local client is running on your machine or some server is listening on port 45691 – R.Stevens Jul 19 '17 at 07:30
  • after some experimentation i have succeeded to call browserstack via BrowserStackSerenityTestL39 but when i look in browserstack "Local Testing" is still false... so i have added the following args. bsLocal = new Local(); Map bsLocalArgs = new HashMap(); bsLocalArgs.put("key", accessKey); bsLocalArgs.put("v", "true"); bsLocalArgs.put("force", "true"); bsLocalArgs.put("forcelocal", "true"); System.out.println(bsLocalArgs.values()); bsLocal.start(bsLocalArgs); But sadly no change – R.Stevens Jul 19 '17 at 11:33
  • I see that you were able to run the binary. Now ensure that your script sets 'browserstack.local' capability to true. https://github.com/browserstack/serenity-browserstack/blob/master/serenity.properties#L25 is how the cap is configured in the example. – Sanket Parlikar Jul 19 '17 at 20:21
  • removing the ".replace("browserstack.", "")" from the following line: https://github.com/browserstack/serenity-browserstack/blob/master/src/test/java/com/browserstack/BrowserStackSerenityDriver.java#L43 made it work... seems that this might be a bug as the other browserstack properties are now not readable. Thanks for the help :) – R.Stevens Jul 20 '17 at 13:54