With the mabl tests export
command, you can export mabl tests in the following formats:
- Playwright (Typescript)
- Selenium (Selenium IDE format)
- JSON
- CSV
This command is helpful when you need to collaborate with other teams that use a different testing framework, in particular Selenium and Playwright.
Exporting API tests
To export a mabl API test to Postman, please refer to our article on Postman exports.
mabl tests export
When you run the mabl tests export
command, the mabl CLI exports the mabl test in a specified file format and outputs the name of the exported file.
Options
Option | Details |
---|---|
--format , -f
|
Specify a format for the test export. The default is "yaml". Other choices include "json", "csv", "playwright", and "side" (Selenium IDE). "playwright" and "side" are only supported for browser tests. |
--mabl-branch |
Indicate which branch of the test to export. |
--environment-id , -e
|
For tests exported as a Playwright test, generate selectors based on the find information learned in this environment. |
--file |
Export to a specific file. By default, this command exports to the present working directory. When this option is not used, the exported file name uses the test_id. |
Examples
Export a test as a .side file
mabl tests export {test-id} –-format side
Export a test from the "dev" environment to Playwright
mabl tests export {test-id} –-format playwright –-environment-id {environment-id}
Limitations
The mabl tests export
command only exports user-generated tests. Tests that are generated by mabl, including the visit home page, link crawler, and visual smoke tests, are not supported.
The following step types are not currently supported in tests exported to Selenium or Playwright:
- Select steps
- Drag and drop steps
- JavaScript snippets
- API steps
- Interactions with Cookies
- File uploads
- Download assertions
- Accessibility checks
- MFA authenticator steps
- Email testing
- PDF testing
mabl tests that are exported to Selenium do not support conditional steps.
If any of the unsupported step types are important to your team, please let us know in the mabl Product portal.