Skip to content

Modus-Logo-Long-BlackCreated with Sketch.

  • Services
  • Work
  • Blog
  • Resources

    OUR RESOURCES

    Innovation Podcast

    Explore transformative innovation with industry leaders.

    Guides & Playbooks

    Implement leading digital innovation with our strategic guides.

    Practical guide to building an effective AI strategy
  • Who we are

    Our story

    Learn about our values, vision, and commitment to client success.

    Open Source

    Discover how we contribute to and benefit from the global open source ecosystem.

    Careers

    Join our dynamic team and shape the future of digital transformation.

    How we built our unique culture
  • Let's talk
  • EN
  • FR

Hybrid Application Testing with Protractor and Appium

Published on March 24, 2017
Last Updated on January 17, 2023
Application Development, Quality Assurance

Testing hybrid projects can be challenging. The number of mobile devices the product has to target adds layers of complexity. Nowadays browsers come with powerful device emulators, which brings up a great question: Why bother configuring and testing on real devices? Well, because emulation can’t match real device testing so checking on it is a must.
With ProtractorJS and Appium you’ll be able to test Angular Hybrid applications easily and quickly.

Hybrid applications testing with Protractor and Appium

“Protractor is an end-to-end test framework for AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user would.” 1

“Appium is an open source test automation framework for use with native, hybrid and mobile web apps. It drives iOS, Android, and Windows apps using the WebDriver protocol.” 2

Combining the two is not as hard as it may seem at first look. The steps needed to accomplish this are described below:

Pre-requisites:

  • IDE
  • NodeJS 6.x.x
  • ProtractorJS
  • Appium
  • USB cable
  • iOS / Android device

Configure Protractor for device testing:

   capabilities: {
        browserName: '',
        app: '[ABSOLUTE_PATH_TO_APK/ABSOLUTE_PATH_TO_APP]',
        bundleId: '[com..],
        deviceName: '[ACTUAL_DEVICE_NAME]',
        platformName: '[Android/iOS]',
        platformVersion: '[ANDROID_VERSION/iOS_VERSION]',
        udid: '[ONLY_FOR_iOS=THE_UDID_OF_DEVICE]'
        autoWebview : true,
        autoWebviewTimeout: 10000,
        autoAcceptAlerts: 'true'
    },

Configure the device for testing:

For iOS, you have to do the following:

  • Enable Web Inspector. Here is a how-to article for this.
  • Sign the application with a valid Certificate and Provisioning Profile
  • Install the application using Xcode or let Appium install it using Fruitstrap
  • Install libimobiledevice and ios-webkit-debug-proxy

For Android, you have to do the following:

  • Enable USB Debugging. Here is a how to article.

Run tests on device:

  • Connect the device to the PC
  • Start appium server
    • appium
  • Start ios-webkit-debug-proxy (for iOS only)
    • ios_webkit_debug_proxy -c[device_UDID]:27753
  • Run protractor tests

Hooray! Tests are now running directly on the device.

Conclusion

Validating a hybrid application on a device may be a good idea and helps you get real data regarding hardware usage and application behaviour within its real environment.
It may not be easy but definitely is not hard to configure a test project to run on devices. Using the above configuration, you can easily set your test project to run your tests on devices and have feedback on how both the application and device behave.

Here is a repo with the configuration described above. Please note that there may be more solutions to this so feel free to choose the one that fits best for you or exercise a new one.

References:


  1. Source: http://www.protractortest.org/#/ ↩
  2. Source: http://appium.io/ ↩

Ensure your software is secure, reliable, and ready to scale—explore our expert testing and QA services today!

Posted in Application Development, Quality Assurance
Share this

Sergiu Popescu

Sergiu Popescu is a QA Engineer at Modus Create. He specializes in automating test processes for web and hybrid apps using Java, JS, and a wide range of tools and libraries like TestNG, jUnit, Webdriver, WebdriverJS, Protractor and Siesta. When he is not hunting bugs in apps, he enjoys spending time with his lovely wife and son.

Related Posts

  • Test your Angular apps with Protractor
    Testing AngularJS Apps with Protractor

    Do the words “automated” and “tests” make you cringe a little? Creating automated tests for…

  • Protractor and Elementor
    Protractor and Elementor

    Intro Locators and elements are the foundation of any automated test (youdontsay). You spend a…

Want more insights to fuel your innovation efforts?

Sign up to receive our monthly newsletter and exclusive content about digital transformation and product development.

What we do

Our services
AI and data
Product development
Design and UX
IT modernization
Platform and MLOps
Developer experience
Security

Our partners
Atlassian
AWS
GitHub
Other partners

Who we are

Our story
Careers
Open source

Our work

Our case studies

Our resources

Blog
Innovation podcast
Guides & playbooks

Connect with us

Get monthly insights on AI adoption

© 2025 Modus Create, LLC

Privacy PolicySitemap
Scroll To Top
  • Services
  • Work
  • Blog
  • Resources
    • Innovation Podcast
    • Guides & Playbooks
  • Who we are
    • Our story
    • Careers
  • Let’s talk
  • EN
  • FR