0% found this document useful (0 votes)
34 views

Unit 1 STA

Software Testing Automation

Uploaded by

praveen04.cse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Unit 1 STA

Software Testing Automation

Uploaded by

praveen04.cse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 54

software

Set of instructions or programs that enable a user


interact with the computer
Types of software
 Application software
 System software
Application software:
programs or apps which performs specific
function
System software:
Three types
i)Operating system ii)device driver iii)utilities
Operating system
• On and off(system booting)
• File management, memory management,
processing scheduling,i/o management,
software management
• Device drivers:
• monitor,mouse,cpu, printer etc .,
• Utilities:
Help in performing regular maintenance task
-Anti virus,zip, disk cleaner, wireless, backup
Software Testing
• The process of evaluating and verifying that a
software product or application does what it is
supposed to do. Or Testing the functionality of the
software
Need for software testing:
Adv: Bug free, Performance
who is Software Tested?
To read all the documents and understand what
needs to be tested.
Based on the information procured in the above
step decide how it is to be tested.
develop test cases and prioritize testing activities
Execute all the test case and report, defects,
define severity and priority for each defect.
Types of Testing:
Manual Testing: Developers or test engineers check on
features, uses, and functionalities of the software against the
test case without any assistance from available tools and
software.
Automated Testing: Automation Testing is the method of
testing software products with special testing tools and
frameworks to minimize human intervention and maximize
quality.
AUTOMATION
• Automation Testing is the method of testing software products
with special testing tools and frameworks to minimize human
intervention and maximize quality.
• Why Automation Testing?
• When a company develops a product, it is bound to have
defects.
• So, before the release of the product, the company needs to
capture the flaws in it to provide a seamless user experience.
• It is the responsibility of the testing team to perform various
kinds of testing, from functional to non-functional, to ensure
the effectiveness, efficiency, and better user experience of the
overall product.
• Though testers do Manual and Automation testing both, doing
Automation Testing eases a lot of manual work, provides
accurate results, and saves up a lot of time, which results in the
quicker delivery of the product.
Why do we test software?
• Software testing is the process of evaluating and verifying
that a software product or application does what it is
supposed to do. The benefits of testing
include preventing bugs, reducing development costs and
improving performance.
7 Main Reasons :Why software Testing is important?
• Helps in saving money
• Security
• Quality of the product
• Satisfaction of the customer
• Enhancing the development process
• Easy while adding new features
• Determining the performance of the software
Black Box testing

• In Black box testing, the functionalities of software


applications are tested without having knowledge
of Internal code structure, implementation details
and internet paths
• Tester gives input value to examine the its
functionality& checks whether function is giving
excepted output or not
• If the function produces correct output, then its
passed in testing, otherwise failed.
• It also known as Behavioral Testing, Functional&
closed box Testing.
• Perform by the software testers
Types of black box testing
1.Functional Testing(app features test)-QTP, Selenium
2.Non Functional(app high load perform)-JMeter
Blackbox Testing Techniques
• Equivalence Partitioning
• Equivalence Partitioning also called as equivalence class
partitioning. It is abbreviated as ECP.
• Here, input values that provide to system are divided into
different classes or groups based on its similarity in the
outcome.
• Instead of using each and every input value ,use any one
value from the group to test outcome.
Boundary value Analysis
• It test, boundary value are those that contain the
upper and lower limit of a variable.
• It tests, while entering boundary value whether
the software is producing correct output or not
Decision Table Testing
• Various input combinations& their respective system behavior
are captured in tabular form.
• Check logical relationship between two and more than two
points. Ex. Gmail Account

• Error Guessing:
• It is based on the experience of the tester ,where tester uses
experience to guess the problematic areas of the
software .Examples:Divide by Zero ,Handling nul values in text
fields ,Accepting the submit button without any value ,File
upload without attachment , File upload with less thanor
State Transition Testing
• It is used to capture behavior of the software
application when different input values are
given to the same function .
• Applies to those types of applications that
provide specific number of attempts to
access application.
All Pairs Testing Techniques
• It is used to test all the possible discrete combination of
values .
• This is combinational method is used for testing the
application that uses check box input ,radio button
input , list box, text box etc.
• Advantages of Black box Testing
• The tester does not need to have more functional
knowledge or programming skills.
• It is efficient for implementing the test s in the larger
system.
• Tests are executed from the user’s or client’s point of
view.
• It is used in finding the ambiguity and
contradictions in the functional specifications.
• Dis Advantages of Black Box Testing
• Without clear programming knowledge, test cases are
difficult to implement
• It does not reveal the errors in the control structure
• Working with a large sample space of inputs can be
exhaustive and consumes a lot of time.
LEVELS OF TESTING
1.Unit Testing 2. Integration Testing 3.system Testing
4.Acceptance Testing
Unit Testing
one or individual (Individual Module Testing
Done by developers
• Component /module testing
• Developers follows (white box Testing
Techniques)
• SRS -Software Requirement specification &
LLD (Low Level Detailed Design)
• Integration Testing
• Combining/merging modules
• Done by developers
• White box testing techniques
• SRS& HLD (High Level Design )document .
System Testing
• Complete Application Testing
• Done by Testers
• Black Box Testing Technique
• FRS(Functional Requirement Specification) &
Test Case Document
In system testing has four categories. They are
 Usability testing
 Functional testing
 Performance testing
 Security Testing
Acceptance Testing
• Getting approval from client
• Done by client
• Testing done at developer/client/online environment
• Satisfying client requirements
Functional
Functionality Testing
• Testing the behaviour of the application
Alpha Testing
• Application is tested for first time
Before the final release of the software is released to
users for testing.
Beta Testing
• Application is tested second time.
• Before the final release of the software is released
to users for testing.
Smoke Testing:
• Testing the major functionality of the application.
Sanity Testing:
• Testing the minor functionality of the application.
Regression Testing:
• Testing the whole application to check whether
new requirement changes affects previous
functionality.
Retesting
• Testing only the bugs fixed by the developers.
Non Functional Testing:
Usability Testing:User friendly,Look &feel, Ease of
use,Speed in interface,Context sensitiveness.
Performance Testing:
Load Testing: Application loading time
Stress Testing: estimates the peak load
Data/Volume Testing: Test to find the maximum
limit of data/volume of your application
Security Testing: protecting from unauthorized
access malware/spam/virus
Configuration Testing
• Testing system configuration as per the client
request
• Comptability Testing:
• OS-Testing in multiple os
• Browser-Testing in multiple Browser known as
cross browser testing
Other testing types
• Monkey Testing
• Random Testing
• Exploratory Testing
White Box testing
White box testing is a form of application testing
that provides the tester with complete knowledge of
the application being tested, including access to source
code and design documents.
This in-depth visibility makes it possible for white box
testing to identify issues that are invisible to gray and
black box testing.
Types of White BoxTesting
• Static Testing-i)Desk checking ii) code walk
through iii)code inspection
• Structural Testing- 1.unit/code Functional
testing, 2.Code Coverage-i)statement
coverage ii) path coverage iii)branch coverage
3.code complexity
Types of Static Testing Reviews

Static testing reviews are classified into four types


• Types of Static Testing Reviews
• Static testing reviews are classified into four types:
• 1. Informal Reviews
• Informal reviews do not use any set method to detect problems.
Coworkers review documents and give informal comments.
• 2.Walkthrough
• The document’s author will explain the document to
their team during a walkthrough. Participants would
ask questions, and any notes are taken down.
• 3. Technical Reviews
• Peers examine technical specifications in order to detect
any errors.
4. Inspections
Moderator will do a comprehensive examination as part of the
procedure to detect flaws.
Types of Participants in Review Process
1. Author
Author’s responsibility is to fix the errors found and
improves the document’s quality.
2. Moderator
The Moderator is in charge of checking for entries, following
up on reworks, coaching team members and to schedule the
meetings.
3. Scribe
Logs the error during a review.
4. Reviewer
Examine the material for defects.
5. Manager
Determine how evaluations will be carried out and
make sure that the review process goals are achieved.
Static Analysis tool
• Static analysis is where the code developed by
developers is evaluated. It is done to find structural
defects that may lead to errors.
• Review &Inspection mechanism
• Reduce manual work & perform analysis
• Un reaches codes
• Variable not used
• mismatch
• illegal ort error proto typecasting
• memory allocated but not used
Code coverage
• Code coverage is a white-box testing technique
performed to verify the extent to which the code
has been executed.
• Designing & executing test cases and find % of
code
• Instrumentation of code
Statement coverage
All the statement are covered or not (each and
every line)
Sequential flow, two way(if else) , multiway
(switch),loops ( for, do, while)
Statement coverage = (Number of executed statements / Total
number of statements in source code) * 100

Example

Read A
Read B
if A > B
Print “A is greater than B”
else
Print “B is greater than A”
endif
Case 1
• if A = 7, B= 3
• No of statements Executed= 5
• Total statements= 7
• Statement coverage= 5 / 7 * 100
= 71.00 %
Case 2
• if A = 4, B= -8
• No of statements Executed= 7
• Total statements= 8
• Statement coverage= 7 / 8 * 100
= 87.50 %
• Path coverage
• Designed to execute all or selected path
various logical path
• Start from beginning and take any path to
compute
• Split program into no. of distinct path
Path coverage
• Path Coverage testing is a structured testing technique for
designing test cases with intention to examine all possible
paths of execution at least once.
• Path coverage = (Number of executed paths / Total number
of paths in source code) * 100

• Creating and executing tests for all possible paths results in


100% statement coverage and 100% branch coverage.
• In this type of testing every statement in the program is
guaranteed to be executed at least one time. Flow Graph,
Cyclomatic Complexity are used to arrive at basis path
• possible paths of execution at least once.
Eg. of path coverage
• Read A
Read B
IF A+B > 50 THEN
Print "Large"
ENDIF
If A+B<50 THEN
Print "Small"
ENDIF
Path Coverage ensures covering of all the paths
from start to end
• All possible paths are-
• 1-3-5-7
• 1-3-5-6-8
• 1-2-4-5-6-8
• 1-2-4-5-7
• So Path Coverage is 4.
Cyclomatic Complexity
– Cyclomatic Complexity is a software metric used
to indicate the complexity of a program.
– Cyclomatic Complexity refers to the number of
minimum test cases for a white boxed code which
will cover every execution path in the flow.
• Example. if a>b
//do something
else
//do something else
In the above code, cyclomatic complexity is 2 as minimum 2 test
cases to cover all the possible execution path in the known code.

• Cyclomatic Complexity is computed in one of


three ways:
• The numbers of regions of the flow graph correspond to the
Cyclomatic complexity.
• Cyclomatic complexity, V(G), for a flow graph G is defined as
• V(G) = E – N + 2
• where E = number of flow graph edges and N = is the
number of flow graph nodes.
• Cyclomatic complexity, V(G), for a graph flow G is also
defined as
• V(G) = P + 1
• Where P = number of predicate nodes contained in the flow
graph G.
DataFlow Testing
• White Box testing
• Test the path in the program using the status of the
variables
• focus on the path through which variables receives
data and uses the data
• Data flow testing is a family of test strategies based on
selecting paths through the program's control flow in
order to explore sequences of events related to the
status of variables or data objects.
• Dataflow Testing focuses on the points at which
variables receive values and the points at which these
values are used.
Control Flow
• Control flow testing is a form of white-box testing where the
implementation of the code is known to the tester.
• The development team often performs control flow testing. This
process determines and observes the execution paths of a program
in a structured way.
• We use this Following are the steps involved into the process of
control flow testing:
• Control Flow Graph Creation: From the given source code a control
flow graph is created either manually or by using the software.
i)Coverage Target:
ii)Test Case Creation:
iii)Test Case Execution:
iv)Analysis:
Software Testing life cycle
• Software Testing life cycle(set of phases)
• Part of software developing life cycle
• Req. gathering(SRS)-design-code-Test-deployment
• Testing
• Checking whether the product is correctly working or not
• Done by testers to check the quality of the product
• Product properly working as per the requirements
• Find errors, bugs & Defects
• Product without testing may fail
• Requirement Analysis
• Quality Assurance team(QA)
• Requirements from SRS is analyze by analyst
• Requirement review meeting with all stake holders
• find inconsistent& incorrect data
• Features to be test & not to the test eg. amazon
Test planning
• Managing team calculate estimated effort & cost
• Hardware and software resources, testers
• Approach, scope of testing, tool selection
• Test Plan Document(TPD)& effort estimation document
• Test case Development
• Identify Test data
• Develop Test cast(create, verify, rewrite)
• Test case set of steps to be execute
• Test case development(TCD, Test Data)
• Test coverage tests case optimization
• Test Environment Setup
• setting up h/w& s/w conditions to test
• Configure the project with the environment
• Test team will do readiness check(smoke testing)
Test execution phase
• Done based on test plans & test cases
• Execute test scripts, maintain & report bug to
development team
• Complete RTM, test case results and defect reports
• Map defects, retest defect fixes and track defects
Test closure (Exit criteria)
• Evaluate cycle completion criteria ( time, test
coverage, cast)
• Test closure report, test metrix.
Waterfall model
• Life cycle model : water fall model, prototype ,
agile, v- model, spiral model.
• SDLC: Software Development Life cycle
• i)Requirement gathering, ii)specification,
iii)system design, iv)Implementation, v)Testing,
Deployment &vi)Maintenance
• water fall model[S/W developing life cycle model]
• i)Traditional method
• ii)We cannot go back to previous phases
• iii)Linear sequential model
iv)Set of phases
v)verify and validate and crate one document
after each phase
• Requirement Gathering, Specification
i) SRS
ii)factors
iii)function and performance requirements
System Design:(it create SDD software design Document)
i)Architecture – component
High level – module
Detailed – internal logic
Implementation: programming language
Testing
Detect errors, bugs, defects
Deployment: Real time environment releases
Maintenance: All environment checking
When we use Waterfall model:
1.Requirement constant
2.Project short
3.Long time
4.Tools and technologies is constant
Advantage of waterfall model:
i)Simple to implement
ii)Fixed requirements
iii)release date & cost is determined
iv)Each phase complete before next phase

Dis advantages:
i)Bing bang approach
ii)Can’t accept change
iii)Document driven process
iv)Client feed back
V Model
V-Model also referred to as the Verification and Validation Model.

• In this, each phase of SDLC must complete before the next phase
starts.

• It follows a sequential design process same as the waterfall model

• Testing of the device is planned in parallel with a corresponding stage


of development.
Verification:
• It involves a static analysis method (review)
done without executing code.
• It is the process of evaluation of the product
development process to find whether specified
requirements meet.
Validation
• It involves dynamic analysis method (functional, non-
functional), testing is done by executing code.
• Validation is the process to classify the software after
the completion of the development process to
determine whether the software meets the customer
expectations and requirements.
• V-Model contains Verification phases on one side of
the Validation phases on the other side.
• Verification and Validation process is joined by coding
phase in V-shape. Thus it is known as V-Model.
Verification Phase of V-model:
• Business requirement analysis: This is the first step where product
requirements understood from the customer's side. This phase contains
detailed communication to understand customer's expectations and exact
requirements.
• System Design: In this stage system engineers analyze and interpret the
business of the proposed system by studying the user requirements
document.
• Architecture Design: The baseline in selecting the architecture is that it
should understand all which typically consists of the list of modules, brief
functionality of each module, their interface relationships, dependencies,
database tables, architecture diagrams, technology detail, etc.
• The integration testing model is carried out in a particular phase.
• Module Design: In the module design phase, the system breaks down into
small modules. The detailed design of the modules is specified, which is
known as Low-Level Design
Coding phase
• After designing, the coding phase is started.
• Based on the requirements, a suitable programming language is decided.
• There are some guidelines and standards for coding.
• Before checking in the repository, the final build is optimized for better
performance, and the code goes through many code reviews to check the
performance.
• Validation Phase of V-model:
• Unit Testing: In the V-Model, Unit Test Plans (UTPs) are developed
during the module design phase.
• These UTPs are executed to eliminate errors at code level or unit level.
• A unit is the smallest entity which can independently exist, e.g., a
program module.
• Unit testing verifies that the smallest entity can function correctly when
isolated from the rest of the codes/ units.
Integration testing
• Integration Test Plans are developed during the Architectural
Design Phase. These tests verify that groups created and tested
independently can coexist and communicate among themselves.
• System Testing: System Tests Plans are developed during
System Design Phase. Unlike Unit and Integration Test Plans,
System Tests Plans are composed by the client?s business team.
System Test ensures that expectations from an application
developer are met.
• Acceptance Testing: Acceptance testing is related to the business
requirement analysis part.
• It includes testing the software product in user atmosphere.
Acceptance tests reveal the compatibility problems with the
different systems, which is available within the user atmosphere.
• It conjointly discovers the non-functional problems like load and
performance defects within the real user atmosphere.
Advantages
• Easy to Understand.
• Testing Methods like planning, test designing happens well before
coding.
• This saves a lot of time. Hence a higher chance of success over the
waterfall model.
• Avoids the downward flow of the defects.
• Works well for small plans where requirements are easily understood.
• Disadvantages
• Very rigid and least flexible.
• Not a good for a complex project.
• Software is developed during the implementation stage, so no early
prototypes of the software are produced.
• If any changes happen in the midway, then the test documents along
with the required documents, has to be updated
Software Reliability
• Reliability is usually defined in terms of a statistical
measure for the operation of a software system
without a failure occuring.
• it is a measure for the probability of a software
failure occuring.
• Two terms related to software reliability:
• Fault :A defect in the software
• Eg. A bug in the code which may cause a failure.
• Failure: A deviation of the programs observed
behaviour from the required behaviour
• Software reliability was emerged in the early
1970 and was created to predict the number of
defects or faults in the software as a method
of measuring software quality
• In statistical term ,”probability of failure free
operation of a computer program in a specified
environment for a specified time”.
• Example :if pgm x were to be executued 1000
times and reqiure a total of eight hours of
execution time,it is likeley to opreate correctly
999 times.
Measure of Reliability
• MTBF=MTTF+MTTR
Where MTBF-Mean Time between failure
• MTTF-Mean Time to failure
• MTTR-Mean time to Repair
Measure of availability : Software availability is
the probability that a program is operating
according to requirement at a given point in
time
Availability=MTTF/MTTF+MTTR*100%

You might also like