An application URL represents the base URL used for a web application or API in a specific environment. When you add an application URL for an application deployed to a specific environment, mabl saves that URL as a variable.
There are two types of application URLs in mabl:
- Web application URL: in browser tests, the web application URL is named
app.url
and represents the initial page that the browser test opens to. - API URL: in API tests, the API URL is named
api.url
and represents the base URL of the API.
This guide explains how to add and edit application URLs in your workspace.
Adding an application URL
To add an application URL for a new application in mabl, see instructions on creating an application.
To add an application URL for an application that already exists in a different environment in mabl, go to the applications page - Configuration > Applications and follow these steps:
- Identify the environment to which you want to add the application URL.
- Hover your mouse over the area in the table where the application and environment meet. An icon will appear in this space:
- If it is the first application URL for the application in this environment, the icon is a plus sign.
Adding a new application URL
- If the application already contains URLs in this environment, the icon is a pencil.
Adding an additional application URL
- Click on the icon to open the Edit URLs modal.
- In the Edit URLs modal, click the Add URL button if you are adding an additional application URL.
The Edit URLs modal
- Provide the following information for the new application URL:
- Type: Web application or API.
- Protocol:
https://
orhttp://
- Base URL: when you enter the base URL for a web application, mabl runs URL validation to make sure the URL can be accessed from the cloud.
- Click on the Save button.
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, you may try one of the following approaches:
- Add mabl static IP addresses to an allowlist. URL validation supports static IP addresses.
- Set up mabl Link. URL validation does not support URLs accessed through mabl Link. Click Save and refer to mabl Link documentation for more details.
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 application URLs to the application in that environment.
Multiple application URLs
This type of configuration 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
andhttps://dev.sandbox.en.com
Editing an application URL
To change an application URL, go to the applications page - Configuration > Applications and follow these steps:
- Hover your mouse over the application URL in the applications table.
- Click on the pencil icon that appears when you hover over the application URL.
Editing an application URL
- Update the URL in the Edit URLs modal. When you update the base URL, mabl runs URL validation to make sure the URL can be accessed from the cloud.
- Click on the Save button.