Software Testing Social Network

Free Software Testing Tutorial and Quality Assurance Portal

Home Featured Articles Software Testing Software Test Types Useful Tips of Database testing using Visual Basic Tools

Useful Tips of Database testing using Visual Basic Tools

Useful Tips of Database testing using Visual Basic Tools

It is important to be able to understand and work with of all types of data to be effective at end-to-end testing of any application. This data can be stored in many ways—for example, spreadsheets, text files, and databases. Relational database management systems (DBMS) such as Oracle, SQL Server, Informix, Sybase, etc. are used to store data for large, client-server type systems.
To be effective at database application testing, you will also need some database background—in other words, a thorough knowledge of database design and Structured Query Language (SQL) as well as practical training and experience with a database management system (DBMS).

Database Application Testing Using the Visual Database Tools

Visual Basic 6 can be used to support database testing both with and without doing a lot coding. The tools that don't involve a lot of coding include the Data Form Wizard and the Visual Database tools.

Data View Window:
Creating a data link in the Data View window is an easy way to quickly set up a connection to a database. Once the database is open, you will be able to retrieve database objects like tables and views. This will give you a look at the structure of the database so that you can verify the presence of those same database objects. You will also be able to inspect the data and perform queries.

Query Builder Window to Execute Database Queries:
Creating a data link and investigating the database structure and contents as we have just done is a valuable first step in database access. You can follow pretty much all of the same steps as in the last section to access any ODBC database. This gives you a common way to access these databases so it isn't always necessary to learn each one of their individual DBMS software.

It is even more valuable to be able to execute queries against the database. The Run Table window that displays when double-clicking on a table in the Data Link window is really the Query Builder window cleverly disguised! Adding more panes to this same window will allow you to create and execute queries within it. There are quite a few valuable SQL queries for testing that will return information about the database.

The Data Environment Designer:
You can do a lot of data interrogation using just the Query Builder window—it's quick and easy. The Visual Database tools also provide an alternate way to access databases visually through the use of the Data Environment designer. It is set up in much the same way but with some extra steps. The value of these extra steps is that unlike the data link, you get a Connection object that you can refer to in your Visual Basic code. You can programmatically manipulate the Connection object to perform database tasks. You can also create Command objects to attach to a connection and drag and drop those Command objects to create forms based on the data. These activities might be valuable in testing.

Tester's Checklist:

When testing a relational database:

  • Use the Visual Database tools to quickly and easily connect to an ODBC-compliant database and visually verify data. Use ADO or SQL-DMO to connect to a database programmatically if you need to save and run automated scripts to test the database.

  • Save queries you have found that find data problems. These queries can be used programmatically by using ADO or SQL-DMO or they can be used within the Visual Database tools.

  • Use the ODBC Logon form template to quickly perform database connection tasks. Remember, you can copy and paste the code from this form for your own use. The Data Form Wizard also generates code for quick database access.

  • Become proficient at database design and SQL.


Comments (0)Add Comment

Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.

busy
  Attention! For US visitors deep discounted electronics products available! CLICK HERE to check it out.