Unit 2
Unit 2
Unit 2
TESTING
Static testing
• Static testing involves manual or automated reviews of the documents.
• This review is done during an initial phase of testing to catch Defect early in STLC.
• It examines work documents and provides review comments.
• It is also called Non-execution testing or verification testing.
Examples of Work documents-
• Requirement specifications
• Design document
• Source Code
• Test Plans
• Test Cases
• Test Scripts
• Help or User document
• Web Page content
KEY DIFFERENCE
• Static testing is done without executing the program whereas Dynamic testing is done by
executing the program.
• Static testing checks the code, requirement documents, and design documents to find
errors whereas Dynamic testing checks the functional behavior of software system,
memory/CPU usage and overall performance of the system.
• Static testing is about the prevention of defects whereas Dynamic testing is about finding
and fixing the defects.
• Static testing does the verification process while Dynamic testing does the validation
process.
• Static testing is performed before compilation whereas Dynamic testing is performed
after compilation.
• Static testing techniques are structural and statement coverage while Dynamic testing
techniques are Boundary Value Analysis & Equivalence Partitioning.
Specification Based / Black Box Testing?
• Smoke Testing
• Sanity Testing
• Integration Testing
• System Testing
• Regression Testing
• User Acceptance Testing
#2) Non-Functional Testing
• Apart from the functionalities of the requirements, there are several non-
functional aspects as well that are required to be tested to improve the quality and
performance of the application.
Few major types of Non-Functional Testing
include:
• Usability Testing
• Load Testing
• Performance Testing
• Compatibility Testing
• Stress Testing
• Scalability Testing
Black Box Testing Techniques
• In order to systematically test a set of functions, it is necessary to design test cases. Testers
can create test cases from the requirement specification document using the following
Black Box Testing techniques.
1. Equivalence Partitioning
2. Boundary Value Analysis
3. Decision Table Testing
4. State Transition Testing
5. Error Guessing
6. Graph-Based Testing Methods
7. Comparison Testing
#1) Equivalence Partitioning
Instead of using all the values from 1 to 100, we just use 0, 1, 2, 99, 100, and 101.
#3) Decision Table Testing
• As the name itself suggests that, wherever there are logical relationships like:
• If
{
(Condition = True)
then action1 ;
}
else action2; /*(condition = False)*/
• Then a tester will identify two outputs (action1 and action2) for two conditions (True and
False).
• So based on the probable scenarios a Decision table is carved to prepare a set of test cases.
Decision Table Testing
#4) State Transition Testing
• State Transition Testing is a technique that is used to test the different states of the
system under test.
• The state of the system changes depending upon the conditions or events.
• The events trigger states which become scenarios and a tester needs to test them.
• A systematic state transition diagram gives a clear view of the state changes but it
is effective for simpler applications.
A finite state system is often shown as a
state diagram
• Divide by zero.
• Handling null values in text fields.
• Accepting the Submit button without any value.
• File upload without attachment.
• File upload with less than or more than the limit size.
#6) Graph-Based Testing Methods
• The example given below throws light on how the techniques of this testing can be
used to test the specific software with given inputs
• While considering a shopping scenario,
• Shop for 500 and receive a discount of 5%
• Shop for 1000 and receive a discount of 7%
• Shop for 1500 or more and receive a discount of 10%
Using Equivalence partitioning technique
• With the help of Equivalence partitioning technique of this testing, it is possible to
divide inputs as four partitions:
• amount less than 0, 0 – 500, 501 – 1000, 1001 – 1500 and so on.
• The details such as the maximum limit for shopping and the product details will not
be considered by this testing technique.
Advantages and Disadvantages
• Advantages
• The tester need not have a technical background. It is important to test by being in
the user’s shoes and think from the user’s point of view.
• Testing can be started once the development of the project/application is done.
• Both the testers and developers work independently without interfering in each
other’s space.
• It is more effective for large and complex applications.
• Defects and inconsistencies can be identified at the early stage of testing.
• Disadvantages
• Without any technical or programming knowledge, there are chances of ignoring
possible conditions of the scenario to be tested.
• In a stipulated time there are possibilities of testing less and skipping all possible
inputs and their output testing.
• A Complete Test Coverage is not possible for large and complex projects.
Use Case Testing
• Use Case Testing is a software testing technique that helps to identify test cases
that cover entire system on a transaction by transaction basis from start to end.
• Test cases are the interactions between users and software application.
• Use case testing helps to identify gaps in software application that might not be
found by testing individual software components.
Use Case Testing
• In a use case, there will be a set of actions for the user to complete. The actions
can be:
•
Withdraw funds,
• Balance enquiry,
• Balance transfer,
• When developing use cases, a test case table is usually developed. There will be a
success scenario as well as the steps that the user should complete. Examples of
the steps can be:
•
Insert card,
• Validates card and asks for a PIN,
• Enters a PIN,
• Validates a Pin, and
• Allows access to the account.
Difference Between White Box Testing And
Black Box Testing
Types of review
• Walkthrough :
• A walkthrough is characterized by the author of the document under review guiding the participants
through the document and his or her thought processes:
• 1. To achieve a common understanding and to gather feedback.
• 2. This is especially useful if people from outside the software discipline are present, who are not used
to, or cannot easily understand software development documents.
• 3. The content of the document is explained step by step by the author, to reach consensus on changes
or to gather information.
• 4. Within a walkthrough the author does most of the preparation.
• A walkthrough is especially useful for higher-level documents, such as requirement specifications and
architectural documents.
Technical review
• A technical review is a discussion meeting that focuses on achieving consensus about the technical
content of a document.
• Compared to inspections, technical reviews are less formal and there is little or no focus on defect
identification on the basis of referenced documents, intended readership and rules.
• During technical reviews defects are found by experts, who focus on the content of the document.
• The experts that are needed for a technical review are, for example, architects, chief designers and
key users.
• In practice, technical reviews vary from quite informal to very formal.
The goals of a technical review are to:
1. • assess the value of technical concepts and alternatives in the product and project
environment;
2. • establish consistency in the use and representation of technical concepts;
3. • ensure, at an early stage, that technical concepts are used correctly;
4. • inform participants of the technical content of the document.
Key characteristics of a technical review are: