All database query steps execute in the mabl cloud, regardless of whether they are sent 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 three different ways to connect to a private database:
- Add a Link Agent override to the database connection
- Use a Link-enabled environment
- Add mabl static IP addresses to an allowlist
Add a Link Agent override
When configuring a database connection, you can add an explicit Link Agent override:
- 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.
Use a Link-enabled environment
Alternatively, you can connect to the database through a Link-enabled environment:
- 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 mabl IP addresses to an allowlist
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.