Software Testing-Testing Basic
Software Testing-Testing Basic
Basics
LIU Weihong
School of computer science and technology
Anhui university of technology
[email protected]
Outlines
• Basic concepts
• General testing principles
• A software tester’s jobs
• Test automation
• Test approaches
• Bug reporting
Basic Concepts
• Software
• Software testing
• Bug
• Test Case
Basic concepts-software
Software=program ?
Software=program+document
What to test?
Any working product which forms part of the software application
has to be tested. Both documents and programs must be tested.
When to test?
as early as possible
Who tests?
Programmer, Tester and Customer
Testing Vs Debugging
Testing is focused on identifying the
problems in the product
Done by Tester
Need not know the source code sometimes
Each test case should contain at least test data, test steps and expected
results.
General Testing Principles
1. All tests should be traced back to user
requirements.
2. Testing shows the presence of Defects
( it is not a ghost. It is a fact )
• We test to find Faults (as known as Defects)
• As we find more defects, the probability of
undiscovered defects remaining in a system
reduces ( decreasing nature).
• However Testing cannot prove that there are
no defects present
General Testing Principles
3.Exhaustive Testing is Impossible!
Software
output
Also known as Structure-based testing, or
program-based testing
Grey Box Testing
input
software +
output
c=fun1(a,b);
}
Exercise : Write the driver for the
function divide()
int divide(int a,int b)
{
int c;
if(b==0)
{
printf(“divisor can not be
0”);
return 0;
}
c=a/b;
return c;
}
Integration Testing
• scope = set of interacting components
– Focus: correctness of component interactions
– Mostly black-box, some white-box techniques
System Testing
• scope = entire system
– Focus: overall system correctness
– Only black-box techniques
Acceptance testing
Identify all possible issues/bugs before
releasing the product to users or public.
• Alpha testing
Alpha testing is carried out in a lab environment and usually the testers are
internal employees of the organization. To put it as simple as possible, this
kind of testing is called alpha only because it is done early on, near the end
of the development of the software, and before beta testing.
• Beta testing
Beta Testing of a product is performed by "real users" of the software
application in a "real environment" and can be considered as a form of
external User Acceptance Testing.
Bug reporting
• Testers report bugs to programmers
• If the report is not clear and understandable, the
bug will not get fixed
• To write a fully effective report you must:
– Explain how to reproduce the problem
– Analyze the error so that it can be described with a
minimum number of steps
– Write a report that is complete and easy to understand
Bug Reports
• A bug report is a tool that you use to sell the
programmer on the idea of spending his/her time and
energy to fix a bug.
• Bug reports are your primary work product as a
tester. This is what people outside of the testing
group will most notice and most remember of your
work.
• The best tester isn’t the one who finds the most bugs
or who embarrasses the most programmers. The
best tester is the one who gets the most bugs fixed.
• One defect per report: No more, no less. A single
bug in a report can help to avoid duplication and
confusion. If you describe too many defects some of
them may be overlooked.
What is a good bug report?
• Reproducible – if reproduce the bug isn't possible, then
it won't be fixed.
• Specific and Informative - do not spread problem in the
whole essay. Strive to summarize the problem in
minimum words yet in an effective way. And in any case,
don't combine multiple problems even if they seem to be
similar. Write different reports for each problem.
Platform: Will be a big plus to determine what you are using to run
the software, particularly operating system name and version, in the
case of Web Application, should tell web browser name and version.
There are a lot of different versions of systems and browsers, which
important to developers to know.
How not to do: “Windows”
How to do: “Windows 7, Internet Explorer 9”
Content of bug report?
Summary: Try to briefly describe what you were trying to do before you
find the bug and how to react to your application. Try to use simple
natural language and write all simple sentences.
How not to do: “Application don't work”
How to do: “Clicked on ‘File / Save As…’ and the ‘Save’ dialog came
up →Clicked on the ‘OK’ button but the file did not save.”
Actual Result: Here’s the result of the bug. As usual, testers are a
little bit indefinite in this part of the bug report. So, try to be concise.
How not to do: “Button does not work as expected”
How to do: “Button closes app”
Types of Severity:
Blocker: No further testing work can be done.
Critical: Application crash, Loss of data.
Major: Major loss of function.
Minor: Minor loss of function.
Trivial: Some UI enhancements.
Enhancement: Request for a new feature or some enhancement in
existing one.
Content of bug report?
Status: It's showing the status of a bug report in any bug tracking
system. At the beginning status of bug report will be "New". After that
status can changing like Fixed, Verified, Reopen, Won’t Fix and etc.