0% found this document useful (0 votes)
8 views162 pages

Testing (Unit 4)

The document outlines various software testing methodologies, including verification and validation, manual and automated testing, unit testing, integration testing, system testing, and acceptance testing. It discusses the advantages and disadvantages of each testing type, as well as key principles and best practices for effective software testing. Additionally, it covers static testing, test data preparation, and the importance of coding standards and guidelines.

Uploaded by

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

Testing (Unit 4)

The document outlines various software testing methodologies, including verification and validation, manual and automated testing, unit testing, integration testing, system testing, and acceptance testing. It discusses the advantages and disadvantages of each testing type, as well as key principles and best practices for effective software testing. Additionally, it covers static testing, test data preparation, and the importance of coding standards and guidelines.

Uploaded by

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

• Software Testing can be devided into two steps:

1. Verification: This step involve checking if the


software is doing what is supposed to do . It is like
asking ,”Are we building the product the right way?”
2. Validation: This step verifies that the software
actually meets the customers need and requirements. Its
like asking, ” Are we building the right product?”
Principles of s/w testing
1. Testing shows presence of defects: Testing can find bugs, but can’t
prove s/w is 100% bug free.
2. Exhaustive testing is impossible: you can’t test everything –test
important parts first.
3. Early testing is better: Finding bugs early saves time and money.
4. Defect Clustering: Most bugs are found in afew key modules.
5. Pesticide paradox: Same tests stop finding new bugs – update them
regularly.
6. Testing depend on Context: Different apps need different testing
method.
7. Absence of error – Useful Software: Bug free software is useless if it
doesn’t meet users requirements.
Manual Testing
Manual testing is a technique to test the software that is carried out
using the functions and features of an application. Which means
manual testing will be check the defect manually with trying one by
one function is working as expected.
Advantages of Manual Testing:
•Fast and accurate visual feedback: It detects almost every bug in
the software application and is used to test the dynamically
changing GUI designs like layout, text, etc.
•Less expensive: It is less expensive as it does not require any
high-level skill or a specific type of tool.
•No coding is required: No programming knowledge is required
while using the black box testing method. It is easy to learn for the
new testers.
•Efficient for unplanned changes: Manual testing is suitable in
case of unplanned changes to the application, as it can be adopted
easily.
Automation Testing
Automated Testing is a technique where the Tester writes scripts
independently and uses suitable Software or Automation Tools to test
the software. It is an Automation Process of a Manual Process. It
allows for executing repetitive tasks without the use of a Manual
Tester.
Prerequisite of Unit Testing
•Understanding of the Software Development Process.
•Knowledge of Programming languages and Development tools.
•Familiarity with the code base.
•Ability to write test cases and understand expected outcomes.
•Proficiency in using unit testing frameworks and tools.
•Awareness of best practices and guidelines for writing effective unit
tests.
•Clear understanding of the purpose and goals of unit testing in
the software development lifecycle
Advantages of Unit Testing:
Some of the advantages of Unit Testing are listed below.
•It helps to identify bugs early in the development process before
they become more difficult and expensive to fix.
•It helps to ensure that changes to the code do not introduce new
bugs.
•It makes the code more modular and easier to understand and
maintain.
•It helps to improve the overall quality and reliability of the
software.
Disadvantages of Unit Testing
•Time and Effort: Unit testing requires a significant investment of
time and effort to create and maintain the test cases, especially for
complex systems.
•Dependence on Developers: The success of unit testing depends on
the developers, who must write clear, concise, and comprehensive
test cases to validate the code.
•Difficulty in Testing Complex Units: Unit testing can be
challenging when dealing with complex units, as it can be difficult to
isolate and test individual units in isolation from the rest of the
system.
•Difficulty in Testing Interactions: Unit testing may not be sufficient
for testing interactions between units, as it only focuses on individual
units.
•Difficulty in Testing User Interfaces: Unit testing may not be
suitable for testing user interfaces, as it typically focuses on the
functionality of individual units.
Integration testing
• Integration testing is a software testing technique that focuses on
verifying the interactions and data exchange between different
components or modules of a software application.
• The goal of integration testing is to identify any problems or
bugs that arise when different components are combined and
interact with each other.
• Integration testing is typically performed after unit testing and
before system testing.
• It helps to identify and resolve integration issues early in the
development cycle, reducing the risk of more severe and costly
problems later on.
S. No. Unit Testing Integration Testing

In unit testing, each module


In integration testing, all modules of
1. of the software is tested
the software are tested combined.
separately.

In unit testing tester knows


Integration testing doesn’t know the
2. the internal design of the
internal design of the software.
software.

Unit testing is performed first Integration testing is performed after


3.
of all testing processes. unit testing and before system testing.

Unit testing is white box Integration testing is black box


4.
testing. testing.

Unit testing is performed by Integration testing is performed by the


5.
the developer. tester.
What is tested in the system testing
• Functional Testing: This checks if the system’s features work as
expected and meet the defined requirements.
• Performance Testing: This tests how the system performs under
different conditions, is it fast and stable?
• Security Testing: This ensures the system’s security measures
protect sensitive data from unauthorized access or attacks.
• Compatibility Testing: This makes sure the system works well
across different hardware, software, and network environments.
• Usability Testing: This evaluates how easy and user-friendly the
system is, making sure it provides a good experience for users.
• It has both functional and non-functional testing. System
Testing is a black-box testing. System Testing is performed
after the integration testing and before the acceptance testing.
System Testing Process

System Testing is performed in the following


steps:
•Test Environment Setup: Create testing
environment for the better quality testing.
•Create Test Case: Generate test case for the
testing process.
•Create Test Data: Generate the data that is to
be tested.
•Execute Test Case: After the generation of the
test case and the test data, test cases are
executed.
•Defect Reporting: Defects in the system are
detected.
•Regression Testing: It is carried out to test the
side effects of the testing process.
•Log Defects: Defects are fixed in this step.
•Retest: If the test is not successful then again
test is performed.
Advantage /Disadvantage of system
testing
Advantages: Disadvantage
It checks the entire functionality of •Requires proper planning,
the system with different test scripts coordination, and execution.
•Can be impacted by changes made
and also it covers the technical and during development.
business requirements of clients. •Requires specialized skills and
•After this testing, the product will expertise.
almost cover all the possible bugs or •May require multiple test cycles to
errors and hence the development achieve desired results.
team will confidently go ahead with
acceptance testing
•Verifies the overall functionality of
the system.
•Improves the system’s
maintainability and scalability.
Types of Acceptance Testing
Here are the Types of Acceptance Testing
1.User Acceptance Testing (UAT): to determine whether the product is working
for the user correctly.
2.Business Acceptance Testing (BAT) : to determine whether the product meets
the business goals and purposes or not.
3.Contract Acceptance Testing (CAT) : Check if all points of signed agreement
are fulfilled or not
4.Regulations Acceptance Testing (RAT): to determine whether the product
violates the rules and regulations that are defined by the government of the
country where it is being released.
5.Operational Acceptance Testing (OAT): It mainly includes testing of recovery,
compatibility, maintainability, reliability, etc.
Use of Acceptance Testing
1. To find the defects missed during the functional testing phase.

2. How well the product is developed.

3. A product is what actually the customers need.

4. Feedback help in improving the product performance and user


experience.

5. Minimize or eliminate the issues arising from the production.


When to do regression testing?
• When new functionality is added to the system and the code
has been modified to absorb and integrate that functionality
with the existing code.

• When some defect has been identified in the software and the
code is debugged to fix it.

• When the code is modified to optimize its working.


Process of Regression testing
White Box Testing Techniques
• One of the main benefits of white box testing is that it allows for testing
every part of an application. To achieve complete code coverage, white box
testing uses the following techniques:
1. Statement Coverage: In this technique, the aim is to traverse all
statements at least once. Hence, each line of code is tested. In the case
of a flowchart, every node must be traversed at least once. Since all
lines of code are covered, it helps in pointing out faulty code.
2. Branch Coverage: Branch coverage focuses on testing the decision
points or conditional branches in the code. It checks whether both
possible outcomes (true and false) of each conditional statement are tested.
In this technique, test cases are designed so that each branch from all
decision points is traversed at least once. In a flowchart, all edges must be
traversed at least once.
3. Condition Coverage: In this technique, all individual
conditions must be covered as shown in the following example:
•READ X, Y
•IF(X == 0 || Y == 0)
•PRINT ‘0’
•#TC1 – X = 0, Y = 55
•#TC2 – X = 5, Y = 0
4.Multiple Condition Coverage: In this technique, all the
possible combinations of the possible outcomes of conditions are
tested at least once. Let’s consider the following example:
•READ X, Y
•IF(X == 0 || Y == 0)
•PRINT ‘0’
•#TC1: X = 0, Y = 0
•#TC2: X = 0, Y = 5
•#TC3: X = 55, Y = 0
•#TC4: X = 55, Y = 5
5. Basis Path Testing: In this technique, control flow graphs are
made from code or flowchart and then Cyclomatic complexity is
calculated which defines the number of independent paths so that
the minimal number of test cases can be designed for each
independent path. Steps:
•Make the corresponding control flow graph
•Calculate the cyclomatic complexity
•Find the independent paths
•Design test cases corresponding to each independent path
•V(G) = P + 1, where P is the number of predicate nodes in the
flow graph
•V(G) = E – N + 2, where E is the number of edges and N is the
total number of nodes
•V(G) = Number of non-overlapping regions in the graph
Advantages of White Box Testing
Thorough Testing: White box testing is thorough as the entire
code and structures are tested.
Code Optimization: It results in the optimization of code
removing errors and helps in removing extra lines of code.
Early Detection of Defects: It can start at an earlier stage as it
doesn’t require any interface as in the case of black box testing.
Integration with SDLC: White box testing can be easily started
in Software Development Life Cycle.
Detection of Complex Defects: Testers can identify defects that
cannot be detected through other testing techniques.
Comprehensive Test Cases: Testers can create more
comprehensive and effective test cases that cover all code paths.
State or Graph based Testing?

• Graph based testing is a method to test a software or an


application by representing it as a graph.
• The graph consists of nodes that represent different
components or states and edges that represent the transitions
or interactions between these nodes.
• The goal of this approach is to test different scenarios by
traversing through this graph created for the software.
What are the different types of
Graph based Testing?
1.State Transition Testing – This is used for testing transitions
between different states in a software. This approach is used
when a software has multiple states and the transitions between
states should be represented.
2.Data Flow Testing – This is to test the input, transition and
output of data in a system. It ensures that the data is rightly being
used and manipulated in a system.
3.Control Flow Testing – This method is used to test the control
within the software code. The control flow graph is designed to
represent different branches of code that helps in designing
different test cases.
4.Interaction Flow Testing – This is used to test different
interactions between components in a software. This graph is
used to write different test cases that help in testing all possible
scenarios.
Difference between Performance
testing and Functional testing:
Aspect Functional Testing Performance Testing
Evaluates the system's
Verifies that software functions performance under
Purpose as intended and meets specified various conditions like
requirements. load, stress, and
scalability.
Tests individual functions or Measures responsiveness,
Focus features to ensure correct speed, and stability of the
behavior. entire system.
Involves load testing,
Includes unit testing, integration
Scope stress testing, scalability
testing, system testing, etc.
testing, etc.
Difference between Performance
testing and Functional testing:
Validates functionality, Assesses speed, reliability,
Testing Criteria user interface, data scalability, and resource
handling, etc. usage.
Unit testing, integration Load testing, stress testing,
Examples testing, system testing, endurance testing,
acceptance testing, etc. scalability testing, etc.

Response time, throughput,


Pass/fail based on
Key Metrics resource utilization, error
functional requirements.
rates, etc.

Concerned with how well


Concerned with what the
Users' Perspective the system performs under
system does.
different conditions.

Selenium, JUnit, TestNG, Apache JMeter,


Tools
etc. LoadRunner, Gatling, etc.
Test data suite preparation
• Test data suite preparation in software testing
involves designing and gathering the necessary input data to
execute a set of test cases.

• This data is used to verify that the software behaves as


expected under various conditions and scenarios.

• A well-prepared test suite includes data for valid, invalid,


boundary, and edge cases, ensuring comprehensive testing
coverage.
Key Steps in Test Data Suite
Preparation
Identify Test Objectives: Define what aspects of the software need to be
tested, including functionality, performance, and security.
Design Test Cases: Develop reusable, independent test cases that cover
different scenarios, including boundary conditions and negative testing
scenarios.
Prepare Test Data: Create or select data to execute the test cases, considering
various data types and formats, such as valid, invalid, and boundary data.
Organize Test Cases: Group related test cases logically to manage and execute
them efficiently.
Prioritize Tests: Determine the order in which test cases should be executed
based on their importance and criticality.
Automate Tests: Consider using test automation tools to streamline the
execution of test cases and reduce manual effort.
Validate and Maintain: Regularly review and update the test suite to ensure
its effectiveness and relevance.
Test data suite diag
Static Testing
• Static Testing is a type of Software Testing method that is
performed to check the defects in software without actually
executing the code of the software application.
• Whereas in Dynamic Testing checks, the code is executed to
detect the defects.
• Static Testing also known as Verification testing or
Non-execution testing is a type of Software Testing method
that is performed in the early stage of development to avoid
errors as it is easier to find sources of failures and it can be
fixed easily.
The errors that cannot be found using Dynamic Testing, can be
easily found by Static Testing.
1. Static can be done manually or with the help of tools to find
bugs and improve the quality of the software.

2. It helps to find errors in the early stage of development which


is also called the verification process.

3. It enhances maintainability and ultimately saves time and


money in the long run.
Need for Static Testing

• Increased software size


• Dynamic testing is
expensive
• Dynamic testing is
time-consuming:
• Bugs detection at early
stages
• Improvement of
development productivity
What is Coding Standards and
Guidelines?
• Good software development organizations want their
programmers to maintain to some well-defined and standard
style of coding called coding standards.
• They usually make their own coding standards and guidelines
depending on what suits their organization best and based on
the types of software they develop.
• It is very important for the programmers to maintain the
coding standards otherwise the code will be rejected during
code review.
Purpose of Having Coding Standards
The following are the purpose of having Coding Standards:
• A coding standard gives a uniform appearance to the codes
written by different engineers.

• It improves readability, and maintainability of the code and it


reduces complexity also.

• It helps in code reuse and helps to detect errors easily.

• It promotes sound programming practices and increases the


efficiency of the programmers.
Coding Guidelines in Software
Engineering
• Avoid using a coding style that is too difficult to understand
• Avoid using an identifier for multiple purposes:
• Code should be well documented:
• Length of functions should not be very large
• Try not to use GOTO statement
Advantages of Coding Guidelines
1.Coding guidelines increase the efficiency of the software and
reduces the development time.
2.Coding guidelines help in detecting errors in the early phases, so
it helps to reduce the extra cost incurred by the software project.
3.If coding guidelines are maintained properly, then the software
code increases readability and understandability thus it reduces
the complexity of the code.
4.It reduces the hidden cost for developing the software.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy