Software Testing Tips
page 6 of 10
by Brendan Enrick
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 41344/ 93

Adjust Your Style to Your Test Framework

I obviously recommend that everyone use a testing framework. There are plenty of them out there, and they supply a great deal of the tools you’ll need for testing. They come in all languages, flavors, and colors. You might look into these NUnit, MSTest, JUnit, CppUnit. What is important is that you make sure you know how your tools work so you can test best with them.

I will elaborate on a couple of examples and perhaps down the road I’ll give some more specific examples.

Some tools show you a list of test names, and only minor details about why the test failed. For this you usually need to go the description view or something similar. In these cases it is important to name your tests effectively.

As an example if I have a method called Add and it takes two parameters a and b. I might write a test for that method. If I name my test TestAdd, and that test fails you know something is wrong in that method, but you do not know what failed. If I had instead made a few more specific methods you could glean more information from the test having failed. Some examples of tests I might create are AddTwoZerosShouldBeZero, AddNumberToZeroShouldBeTheNumber, AddPositiveNumbersTest, AddNegativeNumbersTest, etc.

Some parts I would lump together like positive numbers and negative numbers. It is important to handle a couple of different scenarios as well as the edge cases. I could have done negative and natural numbers and that would cover all numbers, but I wanted to make sure the edge case, zero, was handled correctly, so I test it separately.

People can argue back and forth all day long about whether you should have a lot of small tests or group them together, but this is what has worked well for me in the past and I hope it works well for you also.


View Entire Article

User Comments

Title: QA Manager   
Name: Sami Ullah
Date: 2010-10-22 3:08:04 AM
Comment:
Hi ! These tips are really useful.
Title: SOA Testing   
Name: SOA Testing
Date: 2010-09-06 1:17:21 AM
Comment:
Hi.
These tips are very useful one It contain very important detail Its really a fantastic things for me
Title: Software Testing   
Name: SOA Testing
Date: 2010-08-23 4:15:48 AM
Comment:
Wow..These are really a great tips it will useful for me I like it very much.
Title: SQA Services   
Name: SOA TESTING
Date: 2010-08-10 2:08:58 AM
Comment:
Hello..
Wow great post you have give us wonderful tips It will useful for us.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2022 ASPAlliance.com  |  Page Processed at 2022-09-27 12:41:32 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search