Pragmatic Works Software, Inc. is a wholly owned subsidiary of SentryOne

Creating a Database Connection in LegiTest

Data-driven testing often requires testing across multiple databases on different technologies. The ability to add various databases to test scenarios is crucial for data verification and reconciliation. Within LegiTest, it’s easy to add a database connection to your test suite for use in your data-driven testing.

Database connections are an asset in the LegiTest toolbox, therefore they can be defined in several ways:

  • Local Test Level – Database is only visible to that test
  • Test Group Level – Database is visible to all tests in that test group
  • Test Suite Level – Database is visible to all tests and test groups listed in the test suite

LegiTest supports ADO.NET providers as well as ODBC and OLE DB allowing you to connect to virtually any database in an easy-to-use platform.

How to Create a Database Connection in LegiTest:

1. Open up a LegiTest project and take a look at your toolbox which will show the available assets you can create. If you do not see the toolbox, click the link on the right side of your page. The link may be in a different location on your system.

2. Double-click the first option (ADO.NET Connection) in the toolbox to create an ADO.NET connection.

3. Click the ADO.NET asset and choose a database provider appropriate for the database you’re connecting to. The provider can be selected using the ‘Provider’ drop-down on the left-hand side. For this example, we will use the SqlClient Data Provider.

4. Click the ‘Configure’ button.

5. Choose a server to connect to, how to log on to the server, and a database to connect to. For this example, we will use our local server using Windows Authentication and connect to the HigherEd database. Click ‘OK.’

6. Click ‘Test Connection’ to validate it is successful.

7. You can rename your asset by selecting it and hitting F2 on your keyboard.

To help you get the most of your experience with LegiTest, we’re building a comprehensive library of LegiTest video walkthroughs and step-by-step tutorials.

Explore the LegiTest Library

Share This