diff --git a/.gitignore b/.gitignore index 5a07883..a7f21da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ **/target/ **/log **/browserstack-cli +**/browserstack-cli.exe **/.DS_Store **/node_modules/ **/yarn.lock diff --git a/README.md b/README.md index 5bd6ecf..27cc4f6 100644 --- a/README.md +++ b/README.md @@ -45,16 +45,16 @@ - **Linux ARM** [browserstack-cli-linux-arm](https://load-api.browserstack.com/api/v1/binary?os=linux&arch=arm64) - > The download is a zip. Extract it and place the `browserstack-cli` binary in the root of your project. + > The download is a zip. Extract it and place the `browserstack-cli` binary (`browserstack-cli.exe` on Windows) in the root of your project. On macOS or Linux, also run `chmod +x browserstack-cli`, since some unzip tools drop the executable bit. 5. **Verify the BrowserStack CLI** Before running the binary, check that it is signed by BrowserStack: - - **macOS**: the output must include `TeamIdentifier=YQ5FZQ855D` (Browserstack Inc). + - **macOS**: the command must succeed. It only passes if an Apple-issued certificate for BrowserStack's team (`YQ5FZQ855D`) signed the binary. ```sh - codesign --verify --strict ./browserstack-cli && codesign -dv ./browserstack-cli 2>&1 | grep TeamIdentifier + codesign --verify --strict -R '=anchor apple generic and certificate leaf[subject.OU] = "YQ5FZQ855D"' ./browserstack-cli ``` - **Windows** (PowerShell): `Status` must be `Valid` and the signer must be BrowserStack. @@ -65,13 +65,40 @@ If the check fails, do not run the binary. -6. **Run tests using BrowserStack CLI** +6. **Set your credentials** + + The BrowserStack CLI reads your credentials from environment variables. Copy your username and access key from [Account Settings](https://www.browserstack.com/accounts/settings) and export them in the shell you run the test from: + + On macOS or Linux (bash or zsh), run the lines below. The second one prompts for the key without echoing it, so the key stays out of your shell history: + + ```sh + export BROWSERSTACK_USERNAME="" + printf 'BrowserStack access key: '; read -rs BROWSERSTACK_ACCESS_KEY; echo; export BROWSERSTACK_ACCESS_KEY + ``` + + On Windows, run these in PowerShell. The second line prompts for the key in the same way: + + ```powershell + $env:BROWSERSTACK_USERNAME = "" + $env:BROWSERSTACK_ACCESS_KEY = [System.Net.NetworkCredential]::new('', (Read-Host -AsSecureString 'BrowserStack access key')).Password + ``` + + These variables last only for the current terminal session. If the CLI reports an authentication error, check that both are set in the terminal you run it from. + + **Never commit your credentials.** Leave the `userName` and `accessKey` placeholders in `browserstack-load.yml` as they are (the environment variables override them), and keep your access key out of every file you push. If a key is ever exposed, regenerate it from Account Settings. + +7. **Run tests using BrowserStack CLI** ```sh ./browserstack-cli load run ``` -7. **View Test Results** + ```powershell + # Windows (PowerShell) + .\browserstack-cli.exe load run + ``` + +8. **View Test Results** Visit the [BrowserStack Load-Testing Dashboard](https://load.browserstack.com/projects) to monitor and analyze your test runs. diff --git a/java/README.md b/java/README.md index e43d16a..db50730 100644 --- a/java/README.md +++ b/java/README.md @@ -39,16 +39,16 @@ - **Linux ARM** [browserstack-cli-linux-arm](https://load-api.browserstack.com/api/v1/binary?os=linux&arch=arm64) - > The download is a zip. Extract it and place the `browserstack-cli` binary in the root of your project. + > The download is a zip. Extract it and place the `browserstack-cli` binary (`browserstack-cli.exe` on Windows) in the root of your project. On macOS or Linux, also run `chmod +x browserstack-cli`, since some unzip tools drop the executable bit. 4. **Verify the BrowserStack CLI** Before running the binary, check that it is signed by BrowserStack: - - **macOS**: the output must include `TeamIdentifier=YQ5FZQ855D` (Browserstack Inc). + - **macOS**: the command must succeed. It only passes if an Apple-issued certificate for BrowserStack's team (`YQ5FZQ855D`) signed the binary. ```sh - codesign --verify --strict ./browserstack-cli && codesign -dv ./browserstack-cli 2>&1 | grep TeamIdentifier + codesign --verify --strict -R '=anchor apple generic and certificate leaf[subject.OU] = "YQ5FZQ855D"' ./browserstack-cli ``` - **Windows** (PowerShell): `Status` must be `Valid` and the signer must be BrowserStack. @@ -59,13 +59,40 @@ If the check fails, do not run the binary. -5. **Run tests using BrowserStack CLI** +5. **Set your credentials** + + The BrowserStack CLI reads your credentials from environment variables. Copy your username and access key from [Account Settings](https://www.browserstack.com/accounts/settings) and export them in the shell you run the test from: + + On macOS or Linux (bash or zsh), run the lines below. The second one prompts for the key without echoing it, so the key stays out of your shell history: + + ```sh + export BROWSERSTACK_USERNAME="" + printf 'BrowserStack access key: '; read -rs BROWSERSTACK_ACCESS_KEY; echo; export BROWSERSTACK_ACCESS_KEY + ``` + + On Windows, run these in PowerShell. The second line prompts for the key in the same way: + + ```powershell + $env:BROWSERSTACK_USERNAME = "" + $env:BROWSERSTACK_ACCESS_KEY = [System.Net.NetworkCredential]::new('', (Read-Host -AsSecureString 'BrowserStack access key')).Password + ``` + + These variables last only for the current terminal session. If the CLI reports an authentication error, check that both are set in the terminal you run it from. + + **Never commit your credentials.** Leave the `userName` and `accessKey` placeholders in `browserstack-load.yml` as they are (the environment variables override them), and keep your access key out of every file you push. If a key is ever exposed, regenerate it from Account Settings. + +6. **Run tests using BrowserStack CLI** ```sh ./browserstack-cli load run ``` -6. **View Test Results** + ```powershell + # Windows (PowerShell) + .\browserstack-cli.exe load run + ``` + +7. **View Test Results** Visit the [BrowserStack Load-Testing Dashboard](https://load.browserstack.com/projects) to monitor and analyze your test runs. diff --git a/jest/README.md b/jest/README.md index 884e3ec..9a1b719 100644 --- a/jest/README.md +++ b/jest/README.md @@ -39,16 +39,16 @@ - **Linux ARM** [browserstack-cli-linux-arm](https://load-api.browserstack.com/api/v1/binary?os=linux&arch=arm64) - > The download is a zip. Extract it and place the `browserstack-cli` binary in the root of your project. + > The download is a zip. Extract it and place the `browserstack-cli` binary (`browserstack-cli.exe` on Windows) in the root of your project. On macOS or Linux, also run `chmod +x browserstack-cli`, since some unzip tools drop the executable bit. 4. **Verify the BrowserStack CLI** Before running the binary, check that it is signed by BrowserStack: - - **macOS**: the output must include `TeamIdentifier=YQ5FZQ855D` (Browserstack Inc). + - **macOS**: the command must succeed. It only passes if an Apple-issued certificate for BrowserStack's team (`YQ5FZQ855D`) signed the binary. ```sh - codesign --verify --strict ./browserstack-cli && codesign -dv ./browserstack-cli 2>&1 | grep TeamIdentifier + codesign --verify --strict -R '=anchor apple generic and certificate leaf[subject.OU] = "YQ5FZQ855D"' ./browserstack-cli ``` - **Windows** (PowerShell): `Status` must be `Valid` and the signer must be BrowserStack. @@ -59,13 +59,40 @@ If the check fails, do not run the binary. -5. **Run tests using BrowserStack CLI** +5. **Set your credentials** + + The BrowserStack CLI reads your credentials from environment variables. Copy your username and access key from [Account Settings](https://www.browserstack.com/accounts/settings) and export them in the shell you run the test from: + + On macOS or Linux (bash or zsh), run the lines below. The second one prompts for the key without echoing it, so the key stays out of your shell history: + + ```sh + export BROWSERSTACK_USERNAME="" + printf 'BrowserStack access key: '; read -rs BROWSERSTACK_ACCESS_KEY; echo; export BROWSERSTACK_ACCESS_KEY + ``` + + On Windows, run these in PowerShell. The second line prompts for the key in the same way: + + ```powershell + $env:BROWSERSTACK_USERNAME = "" + $env:BROWSERSTACK_ACCESS_KEY = [System.Net.NetworkCredential]::new('', (Read-Host -AsSecureString 'BrowserStack access key')).Password + ``` + + These variables last only for the current terminal session. If the CLI reports an authentication error, check that both are set in the terminal you run it from. + + **Never commit your credentials.** Leave the `userName` and `accessKey` placeholders in `browserstack-load.yml` as they are (the environment variables override them), and keep your access key out of every file you push. If a key is ever exposed, regenerate it from Account Settings. + +6. **Run tests using BrowserStack CLI** ```sh ./browserstack-cli load run ``` -6. **View Test Results** + ```powershell + # Windows (PowerShell) + .\browserstack-cli.exe load run + ``` + +7. **View Test Results** Visit the [BrowserStack Load-Testing Dashboard](https://load.browserstack.com/projects) to monitor and analyze your test runs. diff --git a/junit-4/README.md b/junit-4/README.md index 6197b0e..1b34964 100644 --- a/junit-4/README.md +++ b/junit-4/README.md @@ -39,16 +39,16 @@ - **Linux ARM** [browserstack-cli-linux-arm](https://load-api.browserstack.com/api/v1/binary?os=linux&arch=arm64) - > The download is a zip. Extract it and place the `browserstack-cli` binary in the root of your project. + > The download is a zip. Extract it and place the `browserstack-cli` binary (`browserstack-cli.exe` on Windows) in the root of your project. On macOS or Linux, also run `chmod +x browserstack-cli`, since some unzip tools drop the executable bit. 4. **Verify the BrowserStack CLI** Before running the binary, check that it is signed by BrowserStack: - - **macOS**: the output must include `TeamIdentifier=YQ5FZQ855D` (Browserstack Inc). + - **macOS**: the command must succeed. It only passes if an Apple-issued certificate for BrowserStack's team (`YQ5FZQ855D`) signed the binary. ```sh - codesign --verify --strict ./browserstack-cli && codesign -dv ./browserstack-cli 2>&1 | grep TeamIdentifier + codesign --verify --strict -R '=anchor apple generic and certificate leaf[subject.OU] = "YQ5FZQ855D"' ./browserstack-cli ``` - **Windows** (PowerShell): `Status` must be `Valid` and the signer must be BrowserStack. @@ -59,13 +59,40 @@ If the check fails, do not run the binary. -5. **Run tests using BrowserStack CLI** +5. **Set your credentials** + + The BrowserStack CLI reads your credentials from environment variables. Copy your username and access key from [Account Settings](https://www.browserstack.com/accounts/settings) and export them in the shell you run the test from: + + On macOS or Linux (bash or zsh), run the lines below. The second one prompts for the key without echoing it, so the key stays out of your shell history: + + ```sh + export BROWSERSTACK_USERNAME="" + printf 'BrowserStack access key: '; read -rs BROWSERSTACK_ACCESS_KEY; echo; export BROWSERSTACK_ACCESS_KEY + ``` + + On Windows, run these in PowerShell. The second line prompts for the key in the same way: + + ```powershell + $env:BROWSERSTACK_USERNAME = "" + $env:BROWSERSTACK_ACCESS_KEY = [System.Net.NetworkCredential]::new('', (Read-Host -AsSecureString 'BrowserStack access key')).Password + ``` + + These variables last only for the current terminal session. If the CLI reports an authentication error, check that both are set in the terminal you run it from. + + **Never commit your credentials.** Leave the `userName` and `accessKey` placeholders in `browserstack-load.yml` as they are (the environment variables override them), and keep your access key out of every file you push. If a key is ever exposed, regenerate it from Account Settings. + +6. **Run tests using BrowserStack CLI** ```sh ./browserstack-cli load run ``` -6. **View Test Results** + ```powershell + # Windows (PowerShell) + .\browserstack-cli.exe load run + ``` + +7. **View Test Results** Visit the [BrowserStack Load-Testing Dashboard](https://load.browserstack.com/projects) to monitor and analyze your test runs. diff --git a/junit-5/README.md b/junit-5/README.md index aa2d171..8b3ac2d 100644 --- a/junit-5/README.md +++ b/junit-5/README.md @@ -39,16 +39,16 @@ - **Linux ARM** [browserstack-cli-linux-arm](https://load-api.browserstack.com/api/v1/binary?os=linux&arch=arm64) - > The download is a zip. Extract it and place the `browserstack-cli` binary in the root of your project. + > The download is a zip. Extract it and place the `browserstack-cli` binary (`browserstack-cli.exe` on Windows) in the root of your project. On macOS or Linux, also run `chmod +x browserstack-cli`, since some unzip tools drop the executable bit. 4. **Verify the BrowserStack CLI** Before running the binary, check that it is signed by BrowserStack: - - **macOS**: the output must include `TeamIdentifier=YQ5FZQ855D` (Browserstack Inc). + - **macOS**: the command must succeed. It only passes if an Apple-issued certificate for BrowserStack's team (`YQ5FZQ855D`) signed the binary. ```sh - codesign --verify --strict ./browserstack-cli && codesign -dv ./browserstack-cli 2>&1 | grep TeamIdentifier + codesign --verify --strict -R '=anchor apple generic and certificate leaf[subject.OU] = "YQ5FZQ855D"' ./browserstack-cli ``` - **Windows** (PowerShell): `Status` must be `Valid` and the signer must be BrowserStack. @@ -59,13 +59,40 @@ If the check fails, do not run the binary. -5. **Run tests using BrowserStack CLI** +5. **Set your credentials** + + The BrowserStack CLI reads your credentials from environment variables. Copy your username and access key from [Account Settings](https://www.browserstack.com/accounts/settings) and export them in the shell you run the test from: + + On macOS or Linux (bash or zsh), run the lines below. The second one prompts for the key without echoing it, so the key stays out of your shell history: + + ```sh + export BROWSERSTACK_USERNAME="" + printf 'BrowserStack access key: '; read -rs BROWSERSTACK_ACCESS_KEY; echo; export BROWSERSTACK_ACCESS_KEY + ``` + + On Windows, run these in PowerShell. The second line prompts for the key in the same way: + + ```powershell + $env:BROWSERSTACK_USERNAME = "" + $env:BROWSERSTACK_ACCESS_KEY = [System.Net.NetworkCredential]::new('', (Read-Host -AsSecureString 'BrowserStack access key')).Password + ``` + + These variables last only for the current terminal session. If the CLI reports an authentication error, check that both are set in the terminal you run it from. + + **Never commit your credentials.** Leave the `userName` and `accessKey` placeholders in `browserstack-load.yml` as they are (the environment variables override them), and keep your access key out of every file you push. If a key is ever exposed, regenerate it from Account Settings. + +6. **Run tests using BrowserStack CLI** ```sh ./browserstack-cli load run ``` -6. **View Test Results** + ```powershell + # Windows (PowerShell) + .\browserstack-cli.exe load run + ``` + +7. **View Test Results** Visit the [BrowserStack Load-Testing Dashboard](https://load.browserstack.com/projects) to monitor and analyze your test runs. diff --git a/serenity-cucumber/README.md b/serenity-cucumber/README.md index 2f99d77..cd1eddf 100644 --- a/serenity-cucumber/README.md +++ b/serenity-cucumber/README.md @@ -39,16 +39,16 @@ - **Linux ARM** [browserstack-cli-linux-arm](https://load-api.browserstack.com/api/v1/binary?os=linux&arch=arm64) - > The download is a zip. Extract it and place the `browserstack-cli` binary in the root of your project. + > The download is a zip. Extract it and place the `browserstack-cli` binary (`browserstack-cli.exe` on Windows) in the root of your project. On macOS or Linux, also run `chmod +x browserstack-cli`, since some unzip tools drop the executable bit. 4. **Verify the BrowserStack CLI** Before running the binary, check that it is signed by BrowserStack: - - **macOS**: the output must include `TeamIdentifier=YQ5FZQ855D` (Browserstack Inc). + - **macOS**: the command must succeed. It only passes if an Apple-issued certificate for BrowserStack's team (`YQ5FZQ855D`) signed the binary. ```sh - codesign --verify --strict ./browserstack-cli && codesign -dv ./browserstack-cli 2>&1 | grep TeamIdentifier + codesign --verify --strict -R '=anchor apple generic and certificate leaf[subject.OU] = "YQ5FZQ855D"' ./browserstack-cli ``` - **Windows** (PowerShell): `Status` must be `Valid` and the signer must be BrowserStack. @@ -59,13 +59,40 @@ If the check fails, do not run the binary. -5. **Run tests using BrowserStack CLI** +5. **Set your credentials** + + The BrowserStack CLI reads your credentials from environment variables. Copy your username and access key from [Account Settings](https://www.browserstack.com/accounts/settings) and export them in the shell you run the test from: + + On macOS or Linux (bash or zsh), run the lines below. The second one prompts for the key without echoing it, so the key stays out of your shell history: + + ```sh + export BROWSERSTACK_USERNAME="" + printf 'BrowserStack access key: '; read -rs BROWSERSTACK_ACCESS_KEY; echo; export BROWSERSTACK_ACCESS_KEY + ``` + + On Windows, run these in PowerShell. The second line prompts for the key in the same way: + + ```powershell + $env:BROWSERSTACK_USERNAME = "" + $env:BROWSERSTACK_ACCESS_KEY = [System.Net.NetworkCredential]::new('', (Read-Host -AsSecureString 'BrowserStack access key')).Password + ``` + + These variables last only for the current terminal session. If the CLI reports an authentication error, check that both are set in the terminal you run it from. + + **Never commit your credentials.** Leave the `userName` and `accessKey` placeholders in `browserstack-load.yml` as they are (the environment variables override them), and keep your access key out of every file you push. If a key is ever exposed, regenerate it from Account Settings. + +6. **Run tests using BrowserStack CLI** ```sh ./browserstack-cli load run ``` -6. **View Test Results** + ```powershell + # Windows (PowerShell) + .\browserstack-cli.exe load run + ``` + +7. **View Test Results** Visit the [BrowserStack Load-Testing Dashboard](https://load.browserstack.com/projects) to monitor and analyze your test runs. diff --git a/testng/README.md b/testng/README.md index e640f62..a629131 100644 --- a/testng/README.md +++ b/testng/README.md @@ -39,16 +39,16 @@ - **Linux ARM** [browserstack-cli-linux-arm](https://load-api.browserstack.com/api/v1/binary?os=linux&arch=arm64) - > The download is a zip. Extract it and place the `browserstack-cli` binary in the root of your project. + > The download is a zip. Extract it and place the `browserstack-cli` binary (`browserstack-cli.exe` on Windows) in the root of your project. On macOS or Linux, also run `chmod +x browserstack-cli`, since some unzip tools drop the executable bit. 4. **Verify the BrowserStack CLI** Before running the binary, check that it is signed by BrowserStack: - - **macOS**: the output must include `TeamIdentifier=YQ5FZQ855D` (Browserstack Inc). + - **macOS**: the command must succeed. It only passes if an Apple-issued certificate for BrowserStack's team (`YQ5FZQ855D`) signed the binary. ```sh - codesign --verify --strict ./browserstack-cli && codesign -dv ./browserstack-cli 2>&1 | grep TeamIdentifier + codesign --verify --strict -R '=anchor apple generic and certificate leaf[subject.OU] = "YQ5FZQ855D"' ./browserstack-cli ``` - **Windows** (PowerShell): `Status` must be `Valid` and the signer must be BrowserStack. @@ -59,13 +59,40 @@ If the check fails, do not run the binary. -5. **Run tests using BrowserStack CLI** +5. **Set your credentials** + + The BrowserStack CLI reads your credentials from environment variables. Copy your username and access key from [Account Settings](https://www.browserstack.com/accounts/settings) and export them in the shell you run the test from: + + On macOS or Linux (bash or zsh), run the lines below. The second one prompts for the key without echoing it, so the key stays out of your shell history: + + ```sh + export BROWSERSTACK_USERNAME="" + printf 'BrowserStack access key: '; read -rs BROWSERSTACK_ACCESS_KEY; echo; export BROWSERSTACK_ACCESS_KEY + ``` + + On Windows, run these in PowerShell. The second line prompts for the key in the same way: + + ```powershell + $env:BROWSERSTACK_USERNAME = "" + $env:BROWSERSTACK_ACCESS_KEY = [System.Net.NetworkCredential]::new('', (Read-Host -AsSecureString 'BrowserStack access key')).Password + ``` + + These variables last only for the current terminal session. If the CLI reports an authentication error, check that both are set in the terminal you run it from. + + **Never commit your credentials.** Leave the `userName` and `accessKey` placeholders in `browserstack-load.yml` as they are (the environment variables override them), and keep your access key out of every file you push. If a key is ever exposed, regenerate it from Account Settings. + +6. **Run tests using BrowserStack CLI** ```sh ./browserstack-cli load run ``` -6. **View Test Results** + ```powershell + # Windows (PowerShell) + .\browserstack-cli.exe load run + ``` + +7. **View Test Results** Visit the [BrowserStack Load-Testing Dashboard](https://load.browserstack.com/projects) to monitor and analyze your test runs.