All database query steps execute in the mabl cloud, regardless of whether they are initiated from the Trainer or during local or cloud execution. If you’re training a test that makes calls to an internal database that isn’t accessible from the public Internet, you can access your database by using mabl Link or by adding mabl static IP addresses to an allowlist.
This article outlines two different ways to set up mabl Link so that you can query private databases in your mabl tests:
Alternate method
If mabl Link is not an option for your team, you can also give mabl access to non-public databases by adding mabl static IP addresses to an allowlist
Use a Link-enabled environment
The first way is to use a Link-enabled environment for training and execution:
- Set up a Link Agent on a host in your network. Make sure the Link Agent host has access to the private database.
- Associate the Link Agent with the test environment that will make queries to the private database.
- Associate the test with the Link-enabled environment:
- If you are training a test with queries to the private database, configure the training session to use the Link-enabled environment.
- If you are running tests that access the private database, configure the test or plan to run on the Link-enabled environment.
As long as the Link Agent is active and your database queries use an environment associated with that Link Agent, you should be able to access the private database during training and execution.
Add a Link Agent override
Another option is to add a Link Agent override to the database connection:
- Set up a Link Agent on a host in your network. Make sure the Link Agent host has access to the private database.
- When configuring the database connection, select the Link Agent from the mabl Link Agent override dropdown.
When you train and run tests that contain queries to this database, the queries connect to the private database through the configured Link Agent override.
Database connections with environment overrides
If you are querying a private database that is configured with an optional environment override, you can use the same methods to ensure mabl can access the database in the override environment.
Either make sure the environment for the override configuration is running an active Link Agent with access to the database, or add a Link Agent override to the environment override settings for the database connection.