Applications and environments set the foundation for your automated testing strategy in mabl. To learn more about how they work, check out the overview article on applications and environments.
If you’re ready to configure your mabl applications and environments, read on:
- Create your first application and environment
- Create a new application
- Add URLs and build files
- Create an environment
- Edit an environment
The applications page
You can also manage environment variables programmatically from the mabl CLI and mabl API.
Create your first application and environment
If there are no applications and environments configured for your workspace, go to Configuration > Applications and click on the + Create application button to create your first application and environment.
On the new application page, define the following values:
- Application name
- Application description - optional
- Environment
- Application target - the web app URL, API URL, or or mobile build file for your application
Click Save to create your first application and environment.
Default mabl plans
If a new application has a web app URL, mabl creates two default plans:
- Visit home page - a basic smoke test that visits the application URL every 4 hours and on deployment.
- Link crawler - a plan that crawls your app for broken links and errors once a week.
Create an application
Go to Configuration > Applications. Click on the + Create application button to load the new application page.
On the new application page, define the following values:
- Application name
- Application description - optional
- Environment - associate with an existing environment or add a new environment
- Application target - the web app URL, API URL, or or mobile build file for your application
Click Save to create the application.
Add URLs and build files
In mabl, the base URLs and mobile build files associated with an app/environment pairing are known as application targets.
To edit the base URLs or mobile builds associated with an application, go to Configuration > Applications and click on the application you want to update. From the application details page, you can add new targets or edit existing ones.
The application details page
To add a new target:
- Click on + Add target.
- Select the environment that you want to associate the target with.
- Provide the base URL or select the uploaded build file.
Adding a new application target
URL validation
When you add new web application URLs, mabl checks that the URL can be accessed through the public Internet.
URL validation
If the URL is not accessible through the public Internet, this validation check will fail. Save the URL as-is and set up one of the following approaches for testing private networks:
- Add mabl static IP addresses to an allowlist.
- Set up mabl Link.
URL validation not supported for mabl Link
Even after you set up mabl Link, this validation check will still fail. However, as long as the Link Agent is properly configured, your tests will connect to your app successfully.
Multiple application URLs
If you deploy an application to an environment that runs several builds of the same app that are more or less similar, you can add multiple URLs as application targets to the application in that environment.
Adding multiple URLs can be useful in the following situations:
- You spin up a new app for every PR in the preview environment, but you have a limited number of URLs where you host the app.
- You deploy your app with different URLs for different regions, but the app is essentially the same, such as https://dev.sandbox.ja.com and https://dev.sandbox.en.com
Creating an environment
To create a new environment, you can either add it while creating a new application or go to Configuration > Environments and click on the + Create environment button.
At a minimum, give the environment a name. You may also define the following optional settings:
- Environment description (optional)
- Environment variables
- Link Agent settings
- Page interaction speed
Click Save to create the environment.
Editing an environment
To edit an environment’s name or settings, go to Configuration > Environments, open the environment details page, and click on the edit pencil.
Update environment settings as needed and save:
- Environment name
- Environment description
- Environment variables
- Link Agent settings
- Page interaction speed