Run Tests From Command-Line
Follow these steps to get the commands needed to run BlinqIO tests from the command line or integrate them into your CI/CD pipeline.
Retrieve Command-Line Instructions:
Select the Environment for which you want to run tests.
Go to the Reports page and click How to run scenarios.
(Optional) Use the dropdown to filter scenarios by tags.
TIP
Tag your scenarios to filter and run specific sets of scenarios.
Copy and use the commands in your CI/CD pipelines or paste them into a terminal to run the tests.
NOTE
Make sure you have Node.js version 16 or higher installed on the server. Verify the installation with:
bashnode -v npm -v
Example Run
Configuration Options
You can add configuration options to the run command to change how the tests are executed.
Change Run Report Name
By default, the Runs Report name is set to TEST or the tags used (e.g., @main
). You can customize the name by adding the --run-name=<My Custom Run Name>
parameter.
Example:
bash
npx cross-env BLINQ_ENV=<env> TOKEN=<your_token> ... --run-name="Daily Regression Run"
Change Browsers (Chromium, Firefox, Safari/Webkit)
By default, tests run on Chromium. Use the BROWSER
option to change this:
BROWSER=firefox
BROWSER=webkit
Example:
bash
npx cross-env BROWSER=firefox BLINQ_ENV=... TOKEN=... BVT_FORMATTER="ANALYSIS" cucumber-js --format bvt
Run in Headless mode
If you're running tests on a server without a GUI, add HEADLESS=true
to run the tests without opening a browser window.
Example:
bash
npx cross-env HEADLESS=true BLINQ_ENV=... TOKEN=... BVT_FORMATTER="ANALYSIS" cucumber-js --format bvt
NOTE
You can combine multiple configuration options. For example, running a test on Firefox in headless mode:
bash
npx cross-env HEADLESS=true BROWSER=firefox BLINQ_ENV=... TOKEN=... BVT_FORMATTER="ANALYSIS" cucumber-js --format bvt