Manage resources in your workspace programmatically with the mabl API. By integrating mabl API endpoints into your workflow, you can implement custom actions and make your overall testing strategy more efficient and consistent.
This article outlines some use cases that leverage the mabl API.
- Automate testing in your CI/CD workflow
- Integrate mabl results into your team’s preferred reporting tool
- Automate test data management
- Manage ephemeral environments
- Copy over environment variables
This article does not represent an exhaustive list of use cases for the mabl API. To explore all available endpoints and try out requests, visit the official mabl API reference at api.help.mabl.com.
Automate testing in your CI/CD workflow
Run mabl tests as soon as code is deployed to a new environment by triggering deployment events. Whether you implement a custom API-based CI/CD workflow or integrate application and environment endpoints into your CI/CD build in an existing tool, mabl’s API endpoints can help you test more strategically.
Integrate mabl results into your team’s preferred reporting tool
Pipe data from the reporting API, including test results, test artifacts, and workspace activity, to an internal reporting tool or database for further analysis. Use cases for exporting results from the reporting API include:
- Identifying flaky tests
- Analyzing trends in test frequency or pass rate over time
- Exporting test run artifacts for auditing requirements
- Tracking the current status of mabl test results for different teams, releases, and branches
- Tracking workspace activity
Learn more about creating a custom reporting integration from the following tutorials:
- Reporting API - Google Sheets custom integration
- Reporting API - Export results to CSV in Node
- Reporting API - Export results to CSV in Bash
Automate test data management
The mabl API also can also help simplify other critical tasks, such as managing test data. Use DataTable API endpoints to programmatically manage DataTables for data-driven testing scenarios:
- Make bulk updates to large DataTables
- Write a script to automate changes to DataTables that require frequent updates
- Update DataTables without having to navigate to the DataTables page in the app.
- Automate ingestion of test data from an external source
- Write test data to an independent DataTable for reporting, export, or cross-reference
Updating DataTables during plan runs
When a plan is triggered, mabl pulls the most recent DataTable version for any test that is associated with DataTables. Updates made to any associated DataTables after the plan run starts do not get pulled into the test.
To access the latest values for a DataTable that was updated during the same plan run, make additional calls to the DataTable API or use shared variables.
Manage ephemeral environments
Any exposed mabl endpoint can be used programmatically to update mabl entities. Consider using the mabl API endpoints to update environments, applications, mailboxes, and more, particularly when managing resources for ephemeral environments.
- Create and manage a large number of unique mailboxes for single use scenarios, such as user registration.
- Manage your mabl environments and applications.
Copy over environment variables
To save time and reduce potential errors, copy over a large list of environment variables from one environment to another in a few API calls instead of doing it manually in the mabl app.
Click here to get started with the mabl API.