Feature Requests & Ideas

For bug reports and questions, please use the in-app chat or support@mabl.com.

Inject variables via the CLI and Runner


Add the ability to inject a variable into a test's environment directly via the CLI and Runner.


Set the user name and password that I looked up from a DB.

mabl tests run --id someTestId --vars username='foo' --vars password='bar'


const runConfig: TestRunConfig = {
vars: {
username: 'foo',
password: 'bar'

Current functionality

Right now the only way to inject variables is to set the environmentId and hardcode the vars creating a new env for each permutation of variables I need to control. This clutters the UI for something that is an implementation detail.


We run a micro frontend architecture where we compose apps from a number of single page apps that can be overridden during development and testing. In order to test a pull request we must spin that microspa up and then tell the test instance to replace the default version with the location of the new code. Right now we have accomplished this by adding an environment for each microspa under test which sets the import override variable to that spa. A JS Snippet then sets the overrides based on that variable.

Ideally we could set the variables in our CI/CD runner. This way we would both not clutter the Mabl UI and we could do more advanced things like spin up dependent micro spa and override them dynamically during test runs.

  • John (J5) Palmieri
  • Apr 13 2022
  • For Consideration
  • Attach files
  • John (J5) Palmieri commented
    13 Apr 03:01pm

    It seems we can create preview environments on the fly so that should make this request moot.

Copyright © 2021 mabl Inc. All rights reserved.