06. Command Line Arguments - medullan/mean GitHub Wiki
Command Line Arguments
Some grunt test commands are equipped with further customizations that will allow a developer to pass command line arguments. This will allow them to change certain values when the application is under test to avoid collisions when testing within a build pipeline.
These commands are:
- grunt test
- grunt test:robot
- grunt test:robot:local
The following is a list of command line arguments that can be used to customize the application when running particular test commands.
Argument | Description | Usage |
---|---|---|
--host | Adding the host argument overrides the host within the grunt task and robot tests. If not set, it will default to http://localhost:3000. | Remote |
--dbname | this will set a database name for the test to use when running locally | Local |
--port | this will set the port that the application will start on when running locally. Defaults to 3000 or 80 (when host is set) | Local |
--browser | this will set the browser for the robot tests to use. Defaults to phantomjs | Any |
--env | this will set which grunt-env to update and add environment variables to. Defaults to dev | Local |
Example:
$ grunt test:robot:local --dbname=mean-unique-db --port=2000