August 21, 2011

Database Testing Example

I have explained database testing with examples in my video, Database Testing and SQL Tutorial for beginners.

Now, I received several emails from the my viewers asking for advice on how to practice database testing. This post contains one example to practice the same. I have explained SQL queries and SQL joins in my SQL Tutorial for Beginners | SQL Queries Tutorial using multiple examples.

Create a practice database with three tables, Products, Orders and OrderDetails or use the database that I showed in my SQL Queries tutorial above. It does not matter which database management software you use. It is simple to anticipate the relationships here. Products table is related to OrderDetails table, via the ProductId field. Orders table is related to OrderDetails table via the OrderId field.


Now, write and execute queries to check the following:
1. Is there any product which exists in the OrderDetails table but is missing in the Products table?
2. Does any OrderDetails row have an OrderId that is missing in the Orders table?
3. Is any ProductName, Serialnumber or ProductDescription duplicated in the Products table?
4. Does any product have a negative UnitsInStock?
5. Does any order have a ShipDate which is earlier than the OrderDate?
6. Does any order have a future OrderDate?
7. Does any OrderDetails row have a Quantity value less than 1? Or a Quantity value which is fractional?
8. Does any OrderDetails row have a zero or negative SalePrice or UnitPrice value?
9. Does any OrderDetails row have a UnitPrice for a product, different from that product's UnitPrice in the Products table?
10. Can you enter Price values (UnitPrice in Products table and SalePrice and UnitPrice in OrderDetails table) in decimal (up to 2 digits after the decimal point)?

August 20, 2011

How to impress your boss and team?


Would it not be great if you could impress your manager and team by putting in just a little more effort? Here are some ideas for building a great perception of you. Note that 3 out of the 8 ideas relate to communication, very important to impress others.

1. Maintain stable work timings
It is important for others to know when to reach you. You can make it easier for them if you are always in office, say before 9 a.m.. Maintaining fixed in-timings shows commitment to work. When you are on vacation, make sure that you set up an Out of Office message notification with information of another person to contact, if urgent.

2. Ask lots of questions during meetings
If you are attending a meeting, you might as well ask questions. Use the 5 W's (What, Why, Where, Who, When) and How to frame questions to get more information for you and others. Asking questions during meetings shows that you are engaged with the topic and eager to understand more.

3. Volunteer for high-visibility assignments
Volunteers are asked for in meetings or written communications. Be eager to take up a task that only one person can do, but which will benefit the whole team. Also, look for small tasks that nobody else is doing. And complete them.

4. Communicate regularly
Whatever you have completed and are doing at present, be sure to communicate it regularly. If you maintain data about your daily tasks, it will be possible for you to communicate daily. Then summarize weekly, monthly and even annually, and communicate those summaries also.

5. Communicate using the correct vocabulary
Different companies and teams have different preferred vocabulary. If you use the specific terms preferred by your manager and team, your communication will be easier to understand. Also, these words show that you are engaged with your team and company.

6. Keep building material for later communication
Have you seen well-structured emails from others with a number of original thoughts? And wondered how much time and effort they spent on creating that email? You, too, can do the same. For important emails, instead of writing whatever comes to your mind and shooting off the email, collect your thoughts in the draft first. Don't send it. Keep updating the draft when you get any good ideas. Soon enough, you will have a worthy email that will impress others.

7. Ask for inputs
When you create a project deliverable (test plans, test cases, automated test scripts etc.), always ask for review comments from your manager and team. You may not get review comments every time. But, whenever you do, it is a good input to refine your deliverable. Also, this shows your commitment to quality.

8. Say "Hi"
Finally, take a couple of seconds to wish your colleagues whenever you meet them. This helps others think of you as a courteous and approachable person.

Please let me know if you liked these ideas and the benefit you got from them.
Image Courtesy: renjith krishnan / FreeDigitalPhotos.net

August 12, 2011

Why bad software testing happens?

It is possible for software testing to go wrong in a project. Look out for these red flags in your project and make corrections immediately to avoid bad testing.

1. Customer inputs ignored
2. Poor knowledge of the application under test
3. Application technology ignored
4. Incorrect test strategy
5. Old test process followed mechanically
6. Unorganized testing
7. Poor observation and analyses
8. Insufficient communication
9. Lack of perseverance
10. No self-critique/ correction in the team