Skip to content

Commit

Permalink
Fix verbs and include the config option details. Will figure a better…
Browse files Browse the repository at this point in the history
… way later.
  • Loading branch information
Sreyanth committed May 11, 2020
1 parent 2f6f73e commit 576c948
Showing 1 changed file with 53 additions and 10 deletions.
63 changes: 53 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ allows you to run your Cypress tests on BrowserStack.
- [Configure Test Runs](#configure-test-runs)
- [Configure Connection Settings](#configure-connection-settings)
- [Disable Usage Reporting](#disable-usage-reporting)
- [CLI Arguments & Flags](#cli-arguments-flags)
- [Running the Tests](#running-the-tests)
- [Getting the Build Information](#getting-the-build-information)
- [Stopping a Running Build](#stopping-a-running-build)
- [CLI Arguments & Flags](#cli-arguments--flags)
- [Run the Tests](#run-the-tests)
- [Get the Build Information](#get-the-build-information)
- [Stop a Running Build](#stop-a-running-build)
- [Limitations](#limitations)
- [License](#license)

Expand Down Expand Up @@ -60,6 +60,10 @@ The `init` command will create a sample `browserstack.json` file. This file can
be used to configure your test runs on BrowserStack. Below is the sample file
that is generated for your reference.

You can also specify `--path <path-to-folder-where-you-need-init-to-run>` flag
along with the `init` command to generate `browserstack.json` file in the
specified folder.

```json
{
"auth": {
Expand Down Expand Up @@ -217,14 +221,26 @@ Example:

## CLI Arguments & Flags

### Running the Tests
### Run the Tests

You can start running your test build using the following command.

```bash
$ browserstack-cypress run
```

By default, the CLI uses the `browserstack.json` in the directory where the
`run` command is issued. If you need to use a different config file, or are
running from a different directory, you can use the `--cf` or the `--config-file`
option while using `run`. For example,

```bash
$ browserstack-cypress --cf <path-to-browserstack.json> run

# Or
$ browserstack-cypress --config-file <path-to-browserstack.json> run
```

Sample output :

```bash
Expand All @@ -242,14 +258,27 @@ Sample output :
[2/20/2020, 2:58:36 PM] File deleted successfully.
```

### Getting the Build Information
### Get the Build Information

In case you want to get information on the build you can use the following command
In case you want to get information on the build you can use the following
command

```bash
browserstack-cypress build-info <buildId>
```

By default, the CLI uses the `browserstack.json` in the directory where the
`build-info` command is issued. If you need to use a different config file, or
are running the command from a different directory, you can use the `--cf` or
the `--config-file` option while using `build-info`. For example,

```bash
$ browserstack-cypress --cf <path-to-browserstack.json> build-info <buildId>

# Or
$ browserstack-cypress --config-file <path-to-browserstack.json> build-info <buildId>
```

Example

```bash
Expand Down Expand Up @@ -318,16 +347,29 @@ Sample output:
}
```

**Note:** Each browser version represents a session. It is advised to validate your account's parallel limit before running multiple versions.
**Note:** Each browser version represents a session. It is advised to validate
your account's parallel limit before running multiple versions.

### Stopping a Running Build
### Stop a Running Build

In case you want to stop a running build, you can use the following command

```bash
browserstack-cypress build-stop <buildId>
```

By default, the CLI uses the `browserstack.json` in the directory where the
`build-stop` command is issued. If you need to use a different config file, or
are running the command from a different directory, you can use the `--cf` or
the `--config-file` option while using `build-stop`. For example,

```bash
$ browserstack-cypress --cf <path-to-browserstack.json> build-stop <buildId>

# Or
$ browserstack-cypress --config-file <path-to-browserstack.json> build-stop <buildId>
```

Example

```bash
Expand Down Expand Up @@ -355,4 +397,5 @@ Sample output:

## License

This project is released under MIT License. Please refer the [LICENSE.md](LICENSE.md) for more details.
This project is released under MIT License. Please refer the
[LICENSE.md](LICENSE.md) for more details.

0 comments on commit 576c948

Please sign in to comment.