GithubHelp home page GithubHelp logo

lynix28 / ios-mobileui-appium-wdio-example Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 6.44 MB

iOS Mobile UI Automation Test Project Example with Appium + WebdriverIO

JavaScript 100.00%
appium appium-ios automated-testing ios-testing mobile-testing mocha-framework wdio webdriverio

ios-mobileui-appium-wdio-example's Introduction

[MERGED TO OTHER PROJECT]

iOS MobileUI Automation Test Project Example with Appium & WebdriverIO

CircleCI SauceLabs


This project example is merged to: https://github.com/lynix28/mobileui-appium-wdio-example

For further update check on the new repo


Requirements

  • NodeJS
  • Appium Server
  • Appium Inspector (to find selector)
  • XCode (for iOS Simulator)
  • Demo App (for testing sample) by Sauce Labs

Node Modules

  • WebdriverIO
  • Mocha (for Test Framework)
  • Allure (for Test Reporting)
  • Chai (for Assessment)
  • Sauce Labs (for Test on Cloud)
  • Dotenv

Setup with `package.json`

  • npm install

Setup manually

  • npm init -y
  • npm install @wdio/cli
  • ./node_modules/.bin/wdio config -> for quick setup or continue to install the following module below.
  • npm install @wdio/local-runner
  • npm install @wdio/appium-service
  • npm install @wdio/sauce-service
  • npm install @wdio/mocha-framework
  • npm install @wdio/allure-reporter
  • npm install dotenv
  • npm install chai

Setup WDA to Simulator | webdriveragent

  • npm install --save-dev appium@next
  • ./node_modules/.bin/appium driver install xcuitest -> install Appium driver for iOS testing
  • Run Appium Server
  • Run Appium Inspector and try to connect to the Simulator (It will take quite long)
  • If success accessing the Simulator by Appium Inspector, then the WDA is completely installed

To compile the test result

  • npm install --save-dev allure-commandline
  • ./node_modules/.bin/allure generate [allure_output_dir] && ./node_modules/.bin/allure open (edit the 'allure_output_dir' with your directory)

or follow this instruction to make it automatically -> https://webdriver.io/docs/allure-reporter#autogenerate-report

To run the test

Command Description
npm run test Run all tests
npm run test -- --suite SuiteName Run a specific Test Suite Bundle (need to define it inside 'wdio.conf.js')
npm run test -- --spec ./path/to/file/FileName Run a specific Test Case / Suite (need to define it inside 'wdio.conf.js')

Common issue that probably occured after the setup

If u get this error Error: "ts-node/esm/transpile-only 'resolve'" did not call the next hook in its chain and did not explicitly signal a short circuit. If this is intentional, include 'shortCircuit: true' in the hook's return.

try to fix it with npm install --save-dev ts-node

To check the report

  • npm run report

How the report look like?

Allure Report image

SauceLabs Build & Test Status image

ios-mobileui-appium-wdio-example's People

Contributors

lynix28 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.