Software Testing - What, Why and How: Posted February 6th, 2008 by Admin
Software Testing - What, Why and How: Posted February 6th, 2008 by Admin
Software testing - that's the buzz word in the IT industry today. I come
across so many youngsters who are excited about career prospects in this field. They are
excited about the number of job opportunities for skilled testers and more importantly, the
Software testing training institutes are flourishing in cities like Bangalore and Pune in India.
They promise to teach Winrunner, Quicktest Pro (QTP) and Loadrunner in a month. These
tools appeal to the youngsters as they are in demand and people with these skills are well
paid.
What they fail to realise is that there is more to testing than the tools.
So, here's an attempt to break the hype and discuss real time situations and problems in
software testing.
It means exactly that - testing the software before making it available for use. Compare that
with what you would do before you buy a car. Do you test drive it? Do you go ahead and buy
No. You expect it to work to your satisfaction before you decide to buy. Same goes with
software.
Software should be thoroughly tested because in some cases if the software malfunctions, it
can be life threatening. Plane crashes to financial losses in millions of dollars - they have
Check out the Software Hall of Shame to realise the importance of software testing.
How can software be tested
Just like when you go looking to buy a new car, you know exactly what you want which means
you have made a list of requirements that the car you decide to buy should satisfy.
Similarly, the most important thing in software testing is the requirements that the software is
Broadly, once the requirements are clear you can start testing. Depending on the size and
complexity of the project or company, various methodologies, processes and strategies will be
1. Functionality testing
2. Non-functionality testing
Functionality testing
This means testing the behaviour of the application to see if it is doing what it is expected to
do. If one person were to use a Windows calculator application, he should expect to see that
Example: If he enters 2, presses + button, enters 2, presses = button, the result displayed
should be 4.
Which means the programming logic of the application should follow the actual requirement.
Non-functionality testing is not really about programming logic. It's about how the same
Example: If the above Windows calendar application works perfectly well for a single user on
a machine with 512KB RAM and 20GB hard disk, assuming that 500 users are going to login to
that machine and use that application at the same time, what would happen to it?
It is possible that the application might crash. If that happens, either the resources of the
machine needs to be improved, like increase RAM or increase CPU, etc or the application code
So, unless we run such a test, we will be at risk of the application crashing in production on a
It is thus important, during requirements gathering, that not only functional requirements are
An example of non-functional requirement can be '500 users must be able to use the Windows
calculator at the same time'. It cannot be something like 'Many users should be able to use
the Windows calculator at the same time'. There should not be any place for ambiguity.
Hi, This is ajaykumarcg, i have started my career in testing field before 1.5yrs, but till i didn,t
come across any test plan. Anybody please tell me abt test plan
o reply
A proper test plan is typically used only in big service companies. Most small product
companies use a minimal version of it which is just good enough to strategise and plan their
testing activity.
You can take a look here and download a copy to understand more about test plans.
http://www.softwaretestingconcepts.com/download-free-test-plan-template
o Actual outcome
o The behaviour actually produced when the object is tested under specified
conditions.
o Bug
o Coverage item
o Error
o Expected results
o Failure
o Fault
cause a Failure.
o Steps
to an exit point.
o Test Project
o Test Project is top structure in TestLink Data. All data (except users) are
o A collection of one or more test cases for the software under test.TestLink
uses this term for organization of Test Cases within Test Specification and Test Plan.
o Test Coverage
o Test execution
o The processing of a test case suite by the software under test, producing an
actual outcome. Test Case Suite is defined from Test Cases within Test Specification via
o Test Plan
indedendence, the test environment, the test case design techniques and test
o Test Specification
o For each test case, the coverage item, the initial state of the software under
o Testing
o Test case
information.
Unit testing
In computer programming, unit testing is a procedure used to validate that individual
modules or units of source code are working properly.
More technically one should consider that a unit is the smallest testable part of an
application. In a Procedural Design a unit may be an individual program, function,
procedure, web page, menu etc. But in Object Oriented Design, the smallest unit is
always a Class; which may be a base/super class, abstract class or derived/child class.
A unit test is a test for a specific unit. Ideally, each test case is independent from the
others; mock objects can be used to assist testing a module in isolation. Unit testing is
typically done by the developers and not by end-users.[3]
What some people fail to grasp is the distinction between unit testing, functional testing,
integration testing, and system testing. Far too frequently what people call ``unit'' tests are
really ``integration'' tests. The distinction is important because frequently if you set out to
write a unit test but find that you can't without first booting up half of the other
components in your app it's a safe bet that you've broken encapsulation and are too tightly
coupled to other pieces of the system. In general you should be able to write any unit test
with basic language objects or the help of a few mock objects
http://en.wikipedia.org/wiki/Mock_Object.
Most of the time you'll find that the line between Functional tests and System tests (see
below) tends to blur, and that's ok... most of the time, but you should always try and
decouple the components of your application as much as possible. If you successfully
decouple everything you can use mock objects to represent all the interactions with
remote machines or applications and just test the local functionality. For example.
Imagine your app sends e-mails. Wouldn't it be better if you could test your system
without having to have a working SMTP server, appropriate accounts and permissions,
and net access? Just use a mock SMTP server and you can test all your e-mail sending
routines without having to worry about potential network failures, processing time for
your e-mails as they pass through overloaded spam filters, etc.
5. Triage
If heuristic testing is based on ``a commonsense rule (or set of rules) intended to increase
the probability of solving some problem''. We need to first ask ourselves what the
``problem'' we're trying to solve is. ``Things going 'boom''' is one answer, but lets be
honest with ourselves. We're actually ok with some things going ``boom''. If we weren't
we'd be working for NASA. Every other development house I know of regularly releases
software with bugs in it. As long as nothing too important breaks and nothing breaks in a
way that leaves you looking like an idiot there's a good chance you're willing to live with
it, for a while at lest. So, now that we've admitted the truth to ourselves, we can start
triaging our app.
Text changes are the biggest edge case when it comes to deciding if something is a bug or
a refactoring. You see, if it's so important that it must be fixed then it's a bug and you
need to prevent it from happening again in the future. Otherwise you're just updating
(refactoring) an existing feature. And yes, your textual content is most definitely a feature.