Update contributing guidelines due to recent npm script changes (#11794)

* [docs] update contributing guidelines to account for recent changes to makelogs and mocha script execution

* Update for changes to test:ui:runner

* Remove unnecessary command prefix
This commit is contained in:
Chris Roberson 2017-05-15 14:06:23 -04:00 committed by GitHub
parent b09d131b80
commit b03128da83

View file

@ -120,10 +120,10 @@ npm run elasticsearch
If you're just getting started with `elasticsearch`, you could use the following command to populate your instance with a few fake logs to hit the ground running.
```bash
npm run makelogs
node scripts/makelogs
```
> Make sure to execute `npm run makelogs` *after* elasticsearch is up and running!
> Make sure to execute `node scripts/makelogs` *after* elasticsearch is up and running!
Start the development server.
```bash
@ -208,13 +208,13 @@ npm run test:server
When you'd like to execute individual server-side test files, you can use the command below. Note that this command takes care of configuring Mocha with Babel compilation for you, and you'll be better off avoiding a globally installed `mocha` package. This command is great for development and for quickly identifying bugs.
```bash
npm run mocha <file>
node scripts/mocha <file>
```
You could also add the `:debug` target so that `node` is run using the `--debug-brk` flag. You'll need to connect a remote debugger such as [`node-inspector`](https://github.com/node-inspector/node-inspector) to proceed in this mode.
You could also add the `--debug` option so that `node` is run using the `--debug-brk` flag. You'll need to connect a remote debugger such as [`node-inspector`](https://github.com/node-inspector/node-inspector) to proceed in this mode.
```bash
npm run mocha:debug <file>
node scripts/mocha --debug <file>
```
With `npm run test:browser`, you can run only the browser tests. Coverage reports are available for browser tests by running `npm run test:coverage`. You can find the results under the `coverage/` directory that will be created upon completion.
@ -265,7 +265,7 @@ npm run test:ui
```
In order to start the server required for the `test:ui:runner` tasks, use the following command. Once the server is started `test:ui:runner` can be run multiple times without waiting for the server to start.
In order to start the server required for the `node scripts/functional_test_runner` tasks, use the following command. Once the server is started `node scripts/functional_test_runner` can be run multiple times without waiting for the server to start.
```bash
npm run test:ui:server
@ -274,7 +274,7 @@ npm run test:ui:server
To execute the front-end browser tests, enter the following. This requires the server started by the `test:ui:server` task.
```bash
npm run test:ui:runner
node scripts/functional_test_runner
```
To filter these tests, use `--grep=foo` for only running tests that match a regular expression.
@ -294,7 +294,7 @@ export TEST_ES_HOSTNAME=aaa5d22032d76805fcce724ed9d9f5a2.us-east-1.aws.found.io
export TEST_ES_PORT=9200
export TEST_ES_USER=elastic
export TEST_ES_PASS=<your password here>
npm run test:ui:runner
node scripts/functional_test_runner
```
##### Browser Automation Notes