'pree2e' and 'ci' scripts added

This commit is contained in:
Matteo Perelli
2017-01-31 14:50:11 +01:00
parent 1ee18808df
commit 2cdd02dc4d
2 changed files with 9 additions and 1 deletions

View File

@@ -124,7 +124,8 @@ E2E tests use Protractor + Selenium server + browsers. You can find the configur
`./protractor.conf.js`
Protractor is installed as 'local' as a dev dependency.
If you are going to execute tests locally you need to run (once time only):
`npm run webdriver:update`.
`npm run webdriver:update`
(for your convenience this command is now auto runned each time 'e2e' command is called).
If you are going to use a remote test enviroment you need to edit the './protractor.conf.js'. Follow the instructions you will find inside it.
@@ -141,6 +142,11 @@ Place your tests at the following path:
and run:
`npm run e2e`
### Continuous Integration (CI) Test
To run all the tests (e.g.: to run tests with Continuous Integration software) you can execute:
`npm run ci`
Keep in mind that this command prerequisites are the sum of unit test and E2E tests.
## Other commands
There are many more commands in the `scripts` section of `package.json`. Most of these are executed by one of the commands mentioned above.

View File

@@ -53,7 +53,9 @@
"docs": "typedoc --options typedoc.json ./src",
"lint": "tslint \"src/**/*.ts\" || true",
"global": "npm install -g angular-cli nodemon npm-check-updates rimraf ts-node typedoc typescript webpack webpack-bundle-size-analyzer rollup marked node-gyp",
"ci": "npm run lint && npm run test && npm run e2e",
"protractor": "node node_modules/protractor/bin/protractor",
"pree2e": "npm run webdriver:update",
"e2e": "npm run protractor",
"test": "karma start --single-run",
"test:watch": "karma start --no-single-run --auto-watch",