Appium and REST with Serenity

619 views
Skip to first unread message

Theo

unread,
Aug 7, 2015, 5:01:08 AM8/7/15
to Serenity BDD Users Group
Hi all,

Back from a long vacation. I see in the last release notes (1.1.1) that Appium and REST integration is mostly done:

  • Upgrades to Appium 3.1.0
  • Improved error and exception reporting for RestAssured tests.
Are there any examples/best practices out there, on any blog or article, on how to use them in Serenity?

Theo

80Vikram

unread,
Aug 7, 2015, 6:15:50 AM8/7/15
to Serenity BDD Users Group
3 cheers to John , he is the most awesome techie on this planet :)

Cheers,
Vikram

John Smart

unread,
Aug 7, 2015, 7:39:02 AM8/7/15
to 80Vikram, Serenity BDD Users Group
There's not much documentation on this yet, but there are plenty of unit tests: if anyone would like to have a go at writing this up, I would love to point them in the right direction.

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
___________________________________________________
John Smart | Wakaleo Consulting  |  +61 407 247 642
Optimizing your software development process
http://www.wakaleo.com  |  john....@wakaleo.com
___________________________________________________

We love breaking down silos and helping smart teams collaborate better! Ask about our tailored on-site workshops in Agile Requirements Discovery, Behaviour Driven Development, Agile Development Practices, and Test Automation!
___________________________________________________

Ilyas Patel

unread,
Aug 10, 2015, 5:19:55 PM8/10/15
to Serenity BDD Users Group
John, I'm planning on using appium with serenity in the next few weeks so I could try and write something up if no one else has volunteered.

Theo

unread,
Aug 11, 2015, 4:51:39 AM8/11/15
to Serenity BDD Users Group
And I already have about 10 test cases written with Rest-Assured, so I could try on that one - please send me an email with more info on where to look for answers. I would like to migrate those tests to use Serenity's REST integration.

John Smart

unread,
Aug 11, 2015, 5:04:56 AM8/11/15
to Theo, Serenity BDD Users Group
Hi Theo,

That would be awesome! The best place to start is the WhenRunningRestTestsThroughSerenity class, which describes how it all hangs together.

Cheers

John.

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

shashi kumar

unread,
Oct 26, 2015, 3:07:14 AM10/26/15
to Serenity BDD Users Group
Hi,

I am trying to use serenity and appium for our web browser testing. I have added the below configuration in my serenity.properties file and started running the scripts which stopped with the below exception.

Serenity.properties:

erenity.take.screenshots = FOR_FAILURES

story.timeout.in.secs= 1200

webdriver.timeouts.implicitlywait = 3000

webdriver.driver = appium

webdriver.wait.for.timeout = 1000

webdriver.base.url = http://healthcloud.cloudav.int.grc-apps.svc.ice.ge.com/

appium.hub = http://127.0.0.1:4723/wd/hub

appium.platformName = iOS

appium.platformVersion = 9.2

appium.deviceName = iPad Air

appium.browserName = Safari

appium.appSafari

appium.udid =XXXXXXXXXXXXXX


Exception:

Caused by: org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: ENOENT, stat '/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip') (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 150 milliseconds

Build info: version: '2.47.1', revision: 'unknown', time: '2015-07-30 11:02:44'

System info: host: 'C02Q9CKGG8WN', ip: '3.204.166.24', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_60'

Driver info: io.appium.java_client.ios.IOSDriver

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:422)

at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)

at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)

at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:180)

at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)

at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)

at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:155)

at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:109)

at io.appium.java_client.ios.IOSDriver.<init>(IOSDriver.java:23)

at net.thucydides.core.webdriver.WebdriverInstanceFactory.newAppiumDriver(WebdriverInstanceFactory.java:77)

at net.thucydides.core.webdriver.WebDriverFactory.appiumDriver(WebDriverFactory.java:519)

at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:175)

... 37 more


I tried one more option where it was able to launch the safari browser when i download safari browser code from github, build it from xcode and refer to the safariLauncher.app location.
But the problem is always it launches apple.com by default and not able to override that url at all. Any help to over ride that url from properties will be much appreciated.
I tried @DeafaultURL annotation as well which didn't override the url and safari always launches with apple.com by default.

serenity.properties file:

serenity.take.screenshots = FOR_FAILURES

story.timeout.in.secs= 1200

webdriver.timeouts.implicitlywait = 3000

webdriver.driver = appium

webdriver.wait.for.timeout = 1000

webdriver.base.url = http://www.google..com/

appium.hub = http://127.0.0.1:4723/wd/hub

appium.platformName = iOS

appium.platformVersion = 9.2

appium.deviceName = iPad Air

appium.browserName = Safari

appium.udid = XXXXXXXXXXX

appium.app = /Users/sit/SafariLauncherApp/SafariLauncher.app


Reply all
Reply to author
Forward
0 new messages