Appium sample project shared - to try out and review

441 views
Skip to first unread message

80Vikram

unread,
Nov 18, 2016, 4:53:08 AM11/18/16
to Serenity BDD Users Group
Hi All,

At last after lots of struggle, I could get Appium and Serenity integration up and running.

Please refer to shared project    https://github.com/vikramvi/AppiumSerenityPOC

It'll be helpful if you guys can please review and let me know if something is wrong or needs to be improved.


My understanding from this project is

1.  Except driver type changing to Appium all other things remain same just like web automation with serenity

2.  One needs to handle explicit appium server start and stop through @before , @after hooks. Serenity doesn't do it for you like it does for webdriver

Not sure if any other hidden appium integration feature is missed out.


Thanks in advance.

Regards,
Vikram

80Vikram

unread,
Nov 22, 2016, 6:30:58 AM11/22/16
to Serenity BDD Users Group
Dear Appium Experts & NewBees of appium,

I've updated repo with ability to start and stop appium server programmatically.

Kindly review the code and let me know if something I can improve upon or doing anything wrong as well.

Thanks again.

Regards,
Vikram

80Vikram

unread,
Nov 22, 2016, 10:16:02 AM11/22/16
to Serenity BDD Users Group
Updated project with serenity-cucumber library as well.

Anyone has CI setup with appium ? can you please share details , challenges etc

For Web automation; I've serenity CI setup with Jenkins and Docker. It's working well enough for regular regression testing.

Would like to know how you all managing wrt Appium ?

Thanks,
Vikram

Harry King

unread,
Nov 22, 2016, 2:31:49 PM11/22/16
to Serenity BDD Users Group
Nice work!

80Vikram

unread,
Nov 25, 2016, 11:15:58 AM11/25/16
to Serenity BDD Users Group
Hi All,

I've added one more cool feature to achieve "Living Documentation"

I've made use of cukedoctor https://github.com/rmpestano/cukedoctor


You can view the "Living Documentation" https://vikramvi.github.io/AppiumSerenityPOC/

The main benefits of this approach is whole company can access and has common, upto date understanding about software.  Software features won't be hiding in some test case management tool, which only QA team uses.


I have tried relishapp but it's not maintained , support is poor.

Next week, I'll be trying out http://www.picklesdoc.com/ before finalizing one of these 2 tools.


Any suggestions and feedback are welcome.

Regards,
Vikram

Saunak Tarafdar

unread,
Dec 2, 2016, 2:39:59 AM12/2/16
to Serenity BDD Users Group
The POC was helpful. Thank you! Were you able to make Appium with Serenity perform Android/IOS specific actions? I have an application that needs switching to WebView context and back to Native view for handling specific native controls but with Serenity and Appium I don't know how to do that. Please do let us know if that is something you are able to try and accomplish.

80Vikram

unread,
Jan 24, 2017, 6:38:58 AM1/24/17
to Serenity BDD Users Group
Hi All,

I've updated project with test case running on native iOS app with 10.2.

While improving POC project, am getting to learn a lot of new things about framework and appium itself.

It will be nice if you're power user of Serenity + Appium, do review the code and let me know any improvements.

Best Regards,
Vikram

80Vikram

unread,
Feb 10, 2017, 4:35:06 AM2/10/17
to Serenity BDD Users Group
Hi All,

Currently I'm working on a branch of this project which has achieved below

https://github.com/vikramvi/AppiumSerenityPOC/tree/serenity_grid_appium


1. Start and Stop appium server programatically

2. Find all connected android devices

3. create json for each of them run time

4. Start selenium server

5. Register nodes to it

6. individual android device appium log

7. stop selenium server

But I couldn't achieve parallel execution with this setup.

Current issue to be solved

https://github.com/serenity-bdd/serenity-core/issues/651  ( I tried for 2 days to solve parallel run issue and gave up )

Also

https://github.com/serenity-bdd/serenity-core/issues/672 ( serenity pointing to older appium java client )

If someone have time please help with these.

Thanks in advance.

Regards,
Vikram



80Vikram

unread,
Sep 6, 2017, 6:50:17 AM9/6/17
to Serenity BDD Users Group
@John,

Today I've updated serenity-core to latest version 1.5.9 from earlier version 1.2.1-rc.4, it broke the sample project

But with this change, it's observed that app doesn't get launched on emulator.

can you please clarify what may be going wrong ? Other than version change, there is nothing changed in the code

Thanks,
Vikram

Liviu Carausu

unread,
Sep 6, 2017, 10:44:53 AM9/6/17
to Serenity BDD Users Group
Hi Vikram,
  Can you please post some stack traces or better describe in which way the sample project is broken ?

80Vikram

unread,
Sep 6, 2017, 12:10:06 PM9/6/17
to Serenity BDD Users Group
Hi Liviu,

There is no error message shown in IDEA, I don't see app getting launched in emulator with provided caps.

Are you using Serenity latest version for mobile automation and does it work for you ?

Thanks,
Vikram

80Vikram

unread,
Sep 7, 2017, 9:31:22 AM9/7/17
to Serenity BDD Users Group
@Liviu,

Did you get chance to look into sample project or try out latest version of serenity with appium ?

@all,
anyone else got appium working with latest version serenity, need help with this blocking issue please

Thanks,
Vikram

John Smart

unread,
Sep 7, 2017, 9:39:46 AM9/7/17
to 80Vikram, Serenity BDD Users Group
Have you got it working with the latest version of the appium client without Serenity? Serenity has very little direct  involvement in launching the app.

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to thucydides-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better
http://johnfergusonsmart.com  |  john....@wakaleo.com
___________________________________________________

We love breaking down silos and helping smart teams collaborate better! Ask about our tailored on-site workshops in Agile Product Planning, BDD Requirements Discovery,  BDD, TDD and Clean Coding, and Advanced BDD Test Automation.

Need some help with Serenity BDD? Check out our Serenity BDD training and support packages here.
___________________________________________________

80Vikram

unread,
Sep 7, 2017, 11:01:04 AM9/7/17
to Serenity BDD Users Group
Hi John,

Without Serenity it's working fine. 

Is there a way to get detailed log with some flag, as currently console doesn't show any log and I'm not sure where to look for error / warning / problem.

Please clarify

Thanks,
Vikram
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.

80Vikram

unread,
Sep 25, 2017, 10:14:12 AM9/25/17
to Serenity BDD Users Group
Hi All,

I've fixed the project with help of John and https://github.com/ricardorlg/serenityappiumbug

Now one can try it out on both iOS and Android native apps ( WordPress )

But I've open question, if somebody knows answer please clarify

1. I need to add below method to get it working

public MobilePageObject(final WebDriver driver) {
super(driver, new Predicate<PageObject>() {
@Override
public boolean apply(PageObject page) {

PageFactory
.initElements(new AppiumFieldDecorator(((WebDriverFacade) page.getDriver()).getProxiedDriver(),
page.getImplicitWaitTimeout().in(TimeUnit.SECONDS), TimeUnit.SECONDS), page);
return true;
}

});

}

But I've no idea as of today about why this is needed ?

- In case of browser automation with Serenity; one doesn't need to do this.  
- My understanding is that PageFactory constructor gets called automatically & user don't need to explicitly call it when browser gets initialised.
- Why is it needed for native app automation then ?


Thanks & Regards,

ricardo larrahondo genoy

unread,
Sep 25, 2017, 2:12:03 PM9/25/17
to Serenity BDD Users Group
One more thing, right now serenity with appium using Cucumber or Jbehave has a problem,  if you have more than one scenario it will fail the execution unless you mark your steps class as unique instances. 

80Vikram

unread,
Sep 26, 2017, 10:13:47 AM9/26/17
to Serenity BDD Users Group
Hi Ricardo,

Please create issue in github repo so that it can be tracked.

Do you have any thoughts/ explanation for earlier query please ?

Thanks,
Vikram

Prashant Maniktala

unread,
Oct 2, 2017, 10:52:05 AM10/2/17
to Serenity BDD Users Group
Hey Vikram, 

Have you tried executing your project on Safari Browser instead of an a Native App?

I am getting element not found on Safari, but your poc works fine on the app. 

I have the latest Appium 1.7.1, Safari 11 and running on iOS. 

Trying to figure out if its something with the setup or something with Safari 11.

Any suggestion will be appreciated. 

Thanks
PM 
Message has been deleted

Ajith Vishvam

unread,
Oct 4, 2017, 2:12:05 AM10/4/17
to Serenity BDD Users Group
R u getting screenshots in serenity report while running scripts in mobile native app .. Am getting only for web browsers and mobile browsers


On Friday, November 18, 2016 at 3:23:08 PM UTC+5:30, 80Vikram wrote:
Reply all
Reply to author
Forward
0 new messages