Skip to content

FJLopezGarcia/Ionic2-Blank-Karma-Protractor

Repository files navigation

Ionic 2: Blank Template with Karma and Protractor

This repository includes the blank starter template that is installed through the Ionic-CLI with:

$ ionic start blank --v2 --ts.

It also includes preconfigured karma and protractor configuration files and test templates.

Installation

$ git clone https://github.com/bhoward-mlock/Ionic2-Blank-Karma-Protractor.git
$ cd Ionic2-Blank-Karma-Protractor
$ npm install
$ npm install -g ionic@beta cordova karma-cli protractor webdriver-manager
$ webdriver-manager update

Unit Tests

  1. All unit tests should be added as app/**/.spec.ts
  • This is the Angular2 convention.
  • See testing/template.spec.ts for a template.
  1. In the terminal, run karma start testing/karma.conf.js
  2. Test results are reported in the terminal window.
  3. They are also saved to the disk at /testing/unit-tests/results/*.html

End to End Tests

  1. All end to end tests should be added as app/**/.e2e.js
  • See testing/template.e2e.js for a template.
  1. In a new terminal window, run webdriver-manager start.
  • This starts the selenium server. Keep this window open.
  1. In a new terminal window, run ionic serve.
  2. In a new terminal window, run protractor testing/protractor.conf.js.
  3. Test results are reported in the terminal window.
  4. They are also saved to the disk at /testing/end-to-end-tests/.html

References

About

Ionic 2 Blank Template with Karma and Protractor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published