Init beta ​
The init
command helps you initialize a new testbeats configuration file in your project. It creates a .testbeats.json
file with default settings that you can customize, avoiding configuration errors for starters or during initial setup.
Usage ​
bash
npx testbeats@latest init
Options ​
Option | Description |
---|---|
-v, --version | Display version of testbeats |
-h, --help | Display help information |
-l, --logLevel | Sets log level |
Examples ​
Basic initialization:
bash
npx testbeats@latest init
Generated Config Structure ​
The command will generate a .testbeats.json
file (can be customised) based on the options selected. Refer configuration for more details on configuration file fields to customise the configuration file.
Instructions ​
- After running
npx testbeats@latest init
successfully, you'll find a.testbeats.json
or customised named file in your project directory where theinit
command was run. - [Optional] Customize required sections based to add any additional configuration.
- Add your secret vars (webhooks, tokens, etc.) as needed to the environment/CI as required.
- Run
npx testbeats@latest publish
to publish.
NOTES
- For security reasons,
DO NOT
harcode any sensitive information (webhook URLs, tokens, api-keys etc) in the configuration file, which you might accidentally commit to remote repository. Always use ENV vars or Secrets Vars in the environment.
See Also ​
- Publish - Learn how to publish test results using your generated configuration.