Automation testing for ionic

Automation UI Testing for Ionic

E2E testing your Ionic application on native Android and iOS devices.

Need to have basic understanding of

Javascript,

Typescript,

Jasmine,

Protrocter

Appium server:

Appium is tool for automation testing in mobile application

* Install the Appium npm as a local dependency

            npm i -D appium

Step 1- To download a chrome driver, go to the

https://chromedriver.chromium.org/downloads

Step 2- Add in package.json

"appium": "appium --chromedriver-executable e2e/chromedriver"

Step 3- Start the appium Server

            npm run appium

* APPIUM Desktop Tool

Install & Start the appium desktop software instead of appium npm package

Step 1 - Download Appium desktop tool : https://appium.io/downloads.html

Step 2 – Start Appium server



CONFIGURE THE E2E TESTING TOOLS IN YOUR IONIC PROJECT

*PROTRACTOR

* INSTALL PROTRACTOR AS A LOCAL NPM DEPENDENCY

            npm install -D protractor

* CONFIGURE TYPESCRIPT

            npm install -D ts-node @types/jasmine @types/node

CREATE AN NPM TASK IN YOUR PACKAGE.JSON

"e2e": "tsc --p e2e/pro.tsconfig.json && protractor e2e/protractor.config.js --verbose"

RUNNING AND WRITING UI TESTS

For Protractor to know which tests to run, you need to configure the specs property, in our case all the files that end with .e2e-spec.ts

            npm run e2e


Github Source code

 

Happy Coding 😊

 

Comments

  1. Thank you very much for your sharing

    When I run your source code, all the test cases are time out,

    I am wondering what the reason is,

    thank you very much

    ReplyDelete

Post a Comment

Popular posts from this blog

Google Assistant Implementation in Android application with app actions