Friday 25 April 2008

SQL - a tester's best friend?

If you work with applications which has a database, good skills in SQL are required in order to be an efficiant tester (unless you sitting next to a friendly DBA).

With SQL (and other database operations) you can:

1. Find, change, create or delete test data
2. Do backup and restore of databases
3. Plus a lot of other useful things, for example you learn much about the application through the database/data model

If you cannot perform 1 and 2 by yourself you will encounter serious bottlenecks in your testing progress.

So, what you need are:

1. Learn basic SQL (select)
2. Get proper account settings in your test environment(s) database(s) - read only
3. Learn advanced SQL (join, update, insert, store procedures, backup/restore, temp tables etc)
4. Get proper account settings in your test environment(s) database(s) - SA or at least anything close

Beware, you must prove yourself worthy for the DBA to achieve no. 4

I went from stage 1 to 4 in a few months just by self-study articles and other people's SQL. I am not considering myself being a skilled DBA but for my testing purposes I am doing quite OK. Also in automation knowing SQL is priceless in order to get your automation test case dynamic and testdata independant. Further more you can build a lot of AUT specfic test tools which will improve your testing dramaticly.

Over and out...

ps.

Here is a list of my favourite database engines which I have worked with in my testing over the years (ranked from a user friendly perspective):

1. Microsoft SQL Server 2005
2. Oracle (don't remember version no)
3. DB2 (don't remember version no)

5 comments:

Anonymous said...

Hi

If you need test data for SQL Server databases - check out SQL Data Generator from Red Gate Software - one click realistic test data.

More at http://www.red-gate.com/products/sql_data_generator/index.htm

Stefan Thelenius said...

Thanks for the tip...however my AUT´s data model is rather complex so we use customized programs (Java or VBScript) to populate test data and/or de-indentified production data. But I definetly will check out this software.

Masha said...

Stefan, I left you a comment on SQL forums, but basically I have an interview where one of the job req. is "Must be able to write SQL queries beyond just select statements." What questions should i expect?
mashka.voronina@gmail.com

Stefan Thelenius said...

Hi,

Q: "What questions should i expect?"

A: I would ask what kind of experience you have using SQL and databases and in what context(s) you have used it.

Good luck!

Masha said...

Thank you Stefan!
I am a QA Engineer, so I mainly used SQL to ensure Data validity