The purpose of this repository is to demonstrate Protractor's ability to run test suites as phases. The original tests were arbitrarily designated as smoke tests, acceptance tests, or regression tests to allow for file separation and execution by a dedicated task.
Executing npm run will list the new e2e test tasks:
$ npm run
Lifecycle scripts included in angular.io-example:
start
ng serve
test
ng test
available via `npm run-script`:
ng
ng
build
ng build
lint
ng lint
e2e
ng e2e
e2e:acceptance
ng e2e "--suite=acceptance"
e2e:smoke
ng e2e "--suite=smoke"
e2e:regression
ng e2e "--suite=regression"
The original Angular app comes from John Papa's Tour Of Heroes
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Protractor
Run ng test
to execute the unit tests via Karma.
Run ng e2e:acceptance
to execute the end-to-end Acceptance tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
Run ng e2e:regression
to execute the end-to-end Regression tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
This project was generated with Angular CLI version 1.2.0.