BDD iOS Test Automation with Java & Cucumber

Ozgur Kaya
Software Testing Bootcamp
2 min readSep 24, 2021

Youtube Webinar Video:

Requirements for MacOS:

  • Java JDK 8 Installation

https://www.oracle.com/tr/java/technologies/javase-downloads.html

  • Jetbrains IntelliJ IDEA Installation

https://www.jetbrains.com/idea/

  • Gherkin IntelliJ Plugin

https://plugins.jetbrains.com/plugin/9164-gherkin

  • Cucumber for Java IntelliJ Plugin

https://plugins.jetbrains.com/plugin/7212-cucumber-for-java

  • Appium Server & Client Installation

https://appium.io/

  • XCode w/ Command Line Tools

Demo App for your iPhone:

https://apps.apple.com/us/app/tripadvisor-plan-book-trips/id284876795

Documents:

https://github.com/cucumber

https://chrome.google.com/webstore/detail/tidy-gherkin/nobemmencanophcnicjhfhnjiimegjeo/related

https://appium.io/docs/en/writing-running-appium/caps/

http://appium.io/docs/en/drivers/ios-xcuitest/index.html

https://appium.io/docs/en/drivers/ios-xcuitest-real-devices/

https://github.com/facebookarchive/WebDriverAgent

How to use it with IntelliJ on Macbook?

  1. Enable Auto import mode for pom.xml or open pom.xml file on IntelliJ and reimport by right-clicking on the file.
  2. Set your Appium capabilities on tripadvisor.tests/SearchTest.java file.
  3. Connect your device with USB cable or use iOS simulator
  4. Open Appium Client application on your Macbook and click “Start Server” button.
  5. Open resources/Search.feature file and right-click on it.
  6. Click Run Test and check your Appium console log.

GitHub Project:
https://github.com/software-testing-bootcamp/java-appium-cucumber-ios

--

--