Execute Tests from External CI/CD
Use the Execute via CI/CD option to run BlinqIO scenarios directly from your CI/CD pipeline or terminal. The platform generates a pre-filled command that you can customize with environment variables, tags, and run options.
Get the CI/CD Run Command
Open the Executions page and select How to run in CI/CD.
A modal opens with a pre-filled command that includes your environment, token, and scenario details.
Copy the command and paste it into your CI/CD pipeline configuration or run it in your terminal.
Run specific scenarios
By default, the generated command runs all tests.
To run only specific scenarios:
- Add tags to scenarios in the Features page.
- Generate a tag-specific CI/CD command by selecting the required tags.
Customize Run Commands
You can adjust the run command to better suit your environment and testing needs.
Set a Custom Run Report Name
Use --run-name
to assign a custom label. This makes test runs easier to identify in reports.
bash
--run-name="My Regression Run"
Change Browser
By default, tests run in Chromium. Change the browser with the BROWSER
environment variable.
bash
BROWSER=firefox # or use webkit
Run in Headless Mode
In CI/CD pipelines or servers without a GUI, set HEADLESS=true
to run tests without displaying the browser.
bash
HEADLESS=true
Run a Specific Scenario by Name
Use the --name
flag to run a single scenario by its title.
bash
npx cross-env BLINQ_ENV=staging TOKEN=your_token --name="User checkout process" cucumber-js
This command runs only the scenario titled User checkout process.
Combine Multiple Options
You can combine multiple options in the same run command. For example, run tests in Firefox and headless mode:
bash
npx cross-env BROWSER=firefox HEADLESS=true BLINQ_ENV=staging TOKEN=your_token cucumber-js
Best Practices
- Always use
--run-name
for easy identification and tracking of test runs. - Enable headless mode in CI environments to improve performance and save resources.
- Store authentication tokens in environment variables or a secrets manager instead of hardcoding them in commands.
- Test your run command locally before integrating it into your CI/CD pipeline.