You are on page 1of 118

Agile Software Development (ASD)

Lect-10 Agile based Testing


Prof. Daiwat Vyas

B.TECH SEMESTER 6TH CSE


Agile Testing
• As the complexity of software development process is increasing continuously,
the software testing approaches needs to evolve to keep up with the development
approaches.
• Agile testing approach is a new age approach which focuses on testing smarter
rather than putting a lot of efforts yet it delivers high-quality products.

• The testers and developers need a higher level of collaboration in agile testing
approach.

• The testers have to provide corrective feedback to the development team during
the software development cycle. This is the age of on-going integration between
testing and development approaches.
Agile Testing
• What is Agile Testing?
• AGILE TESTING is a testing practice that follows the rules and principles of agile
software development.

• Unlike the Waterfall method, Agile Testing can begin at the start of the project
with continuous integration between development and testing.

Agile Testing methodology is not sequential (in the sense it's executed only after
coding phase) but continuous.
Agile Testing
• What is Agile Testing?
• Agile testing methodology aligns with iterative development methodology in
which requirements develop gradually from customers and testing teams.

• The development is aligned with customer requirements.

• Agile testing process is a continuous process rather than being sequential. The
testing begins at the start of the project and there is ongoing integration between
testing and development.
• The common objective of agile development and testing is to achieve a high
product quality.
Agile Testing from 13 April 2023
• Agile testing vs. Testing in Traditional Software Development
Agile Testing
• Agile testing vs. Testing in Traditional Software Development

Testing in Agile approach Testing in Conventional approach

In Agile-based software development, testing is In conventional product development approaches,


integrated into the development process itself, and it is testing is typically a separate phase that occurs after
not a separate phase. the development is complete.
Testing is performed iteratively and incrementally, Testing is performed in a phased manner. Testing is
with each iteration being a potentially shippable often seen as a gatekeeper to the next phase of the
product increment. product development process.
The aim of testing in Agile is to provide rapid feedback Testing is focused on identifying defects and issues,
on the quality of the product being developed, and to and the aim is to ensure that the product meets the
continuously improve it. requirements specified in the design phase.
Agile-based software development emphasizes The conventional product development approaches
automated testing. rely heavily on manual testing.
Agile Testing
• Agile testing vs. Testing in Traditional Software Development (contd…)

Testing in Agile approach Testing in Conventional approach

emphasizes continuous testing throughout the limited testing scope and focus on testing at specific
development lifecycle milestones in the development process.
takes a more collaborative and iterative approach to tend to have a more sequential approach to testing,
testing, with a greater emphasis on continuous with a focus on ensuring that the product meets the
improvement and rapid feedback. requirements specified in the design phase.
Agile Testing
• Agile Testing Principles
• There are some principles of agile testing process which are given below:

• Testing is continuous: Agile team tests continuously because it is the only way
to ensure continuous progress of the product.
• Continuous feedback- Agile testing provides feedback on an ongoing basis and
this is how your product meets the business needs.
• Tests performed by the whole team: In a traditional software development life
cycle, only the test team is responsible for testing but in agile testing, the
developers and the business analysts also test the application.
Agile Testing
• Agile Testing Principles
• There are some principles of agile testing process which are given below:

• Decrease time of feedback response: The business team is involved in each iteration
in agile testing & continuous feedback shortens the time of feedback response.
• Simplified & clean code: All the defects which are raised by the agile team are fixed
within the same iteration and it helps in keeping the code clean and simplified.
• Less documentation: Agile teams use a reusable checklist, the team focuses on the test
instead of the incidental details.
• Test Driven: In agile methods, testing is performed at the time of implementation
whereas, in the traditional process, the testing is performed after implementation.
Agile Testing
• Agile Testing Principles (in short)
• Testing is an integral part of the development process
• Test early and often
• Embrace change: Agile development teams expect requirements to change frequently, and
they are prepared to adapt their testing approach to accommodate these changes.
• Collaborate and communicate
• Focus on customer satisfaction
• Test for the appropriate level of quality: Agile development teams focus on delivering the
appropriate level of quality for the specific product being developed, based on factors such
as risk, complexity, and customer expectations.
• Continuous improvement: Agile development teams constantly seek to improve their
testing processes, tools, and techniques to increase efficiency and effectiveness.
Agile Testing
• Agile Testing Principles (in short)

• Overall, the key principles of Agile testing are to be flexible, collaborative,


and focused on delivering high-quality products that meet the needs of the
customer.
Agile Testing
• Agile Testing Methods
• There are various agile testing methods as follows:

• Behavior Driven Development (BDD)


• Test-Driven Development (TDD)
• Acceptance Test Driven Development (ATDD)
• Exploratory Testing
• Continuous Testing:
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)

• BDD is a collaborative approach that involves developers, testers, and business


stakeholders working together to define the desired behavior of the system. Tests
are written in a natural language that can be understood by all team members.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)
• Behavior Driven Development (BDD) improves communication amongst project
stakeholders so that all members correctly understand each feature before the
development process starts.
• There is continuous example-based communication between developers, testers,
and business analysts.
• The examples are called Scenarios which are written in a special format called
Gherkin Given/When/Then syntax. The scenarios hold information on how a
given feature should behave in different situations with different input
parameters.
• These are called “Executable Specifications” as it comprises of both
specification and inputs to the automated tests.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)

• It is an agile software development methodology that aims to bridge the gap


between technical and non-technical team members by promoting collaboration
and communication.

• BDD is particularly useful in Agile testing as it ensures that the software being
developed meets the desired business requirements and user expectations.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)

• BDD involves defining the behavior of the software system using a common
language that is understood by both technical and non-technical team members.

• This common language is called the ubiquitous language, which is used to


describe the system's behavior in terms of user stories, scenarios, and examples.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)

• In BDD, the development team works with the product owner and stakeholders
to identify the desired behavior of the software system.

• This is done through a process called "discovery," which involves identifying the
user stories, scenarios, and examples that describe the system's behavior.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)

• Once the behavior is identified, the development team uses BDD tools and
frameworks, such as Cucumber or SpecFlow, to write automated tests that verify
the behavior of the software system.

• These tests are written in a natural language format that is easily understood by
the product owner and stakeholders.

• Note: Other tools to be explored by students.


Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)

• BDD tests are typically written in the Given-When-Then format, which describes
the preconditions, actions, and expected outcomes of a scenario.

• These tests serve as living documentation and provide a clear understanding of


the system's behavior, which helps the development team to deliver high-quality
software that meets the desired business requirements and user expectations.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)

• Overall, BDD promotes collaboration and communication among the


development team, product owner, and stakeholders, which is essential in Agile
testing.

• By using BDD, the development team can ensure that the software being
developed is aligned with the business goals and user expectations, resulting in
higher customer satisfaction and faster time-to-market.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)

• Give an example on how BDD can be executed?


Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)
• Suppose you are developing a feature for a banking application that allows
users to transfer funds between their accounts. Here's how you might
approach this feature using BDD:

• Define the desired behavior: The desired behavior of the feature is that users
should be able to transfer funds between their accounts.

• Identify scenarios: Identify different scenarios that users might encounter


when transferring funds.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)
• Suppose you are developing a feature for a banking application that allows
users to transfer funds between their accounts. Here's how you might
approach this feature using BDD:
• Identify scenarios: Identify different scenarios that users might encounter
when transferring funds. For example:

• Scenario 1: User has sufficient balance in the source account.


• Scenario 2: User does not have sufficient balance in the source account.
• Scenario 3: User selects an invalid source or destination account.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)
• Suppose you are developing a feature for a banking application that allows users
to transfer funds between their accounts. Here's how you might approach this
feature using BDD:
• Write acceptance criteria: Write acceptance criteria for each scenario. For example:
• Scenario 1 acceptance criteria:
• The transfer should be successful.
• The user's balance in the source account should be reduced by the amount
transferred.
• The user's balance in the destination account should be increased by the amount
transferred.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)
• Suppose you are developing a feature for a banking application that allows
users to transfer funds between their accounts. Here's how you might
approach this feature using BDD:
• Write acceptance criteria: Write acceptance criteria for each scenario. For
example:
• Scenario 2 acceptance criteria:
• The transfer should fail.
• An appropriate error message should be displayed to the user.
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)
• Suppose you are developing a feature for a banking application that allows
users to transfer funds between their accounts. Here's how you might
approach this feature using BDD:
• Write acceptance criteria: Write acceptance criteria for each scenario. For
example:
• Scenario 3 acceptance criteria:
• The transfer should fail.
• An appropriate error message should be displayed to the user..
Agile Testing
• Agile Testing Methods
• 1- Behavior Driven Development (BDD)
• Suppose you are developing a feature for a banking application that allows
users to transfer funds between their accounts. Here's how you might
approach this feature using BDD:
• 2. Develop and test: Developers can use the acceptance criteria to guide their
development and testing efforts. QA engineers can also use the acceptance
criteria to design and execute tests that validate the scenarios and ensure that the
feature works as expected.

• By using BDD, teams can ensure that they are focusing on the desired behavior of
the software and that everyone is on the same page regarding what needs to be
developed and tested.
Till 13 April 2023
Agile Testing
• Agile Testing Methods from 17 April 2023
• Test Driven Development (TDD)

• A software development approach that involves writing tests before writing the
code that will implement the functionality being tested.

• This approach is a part of the Agile software development methodology, which


emphasizes flexibility and responsiveness to change.
Agile Testing
• Agile Testing Methods from 17 April 2023
• Test Driven Development (TDD)

• In TDD, the developer first writes a failing test case that specifies what the code is
expected to do, and then writes the code to make the test pass.

• Once the test is passing, the developer can refactor the code to improve its design
or performance, while ensuring that the test still passes.
Agile Testing
• Agile Testing Methods from 17 April 2023
• Test Driven Development (TDD)

• TDD can be seen as a form of agile testing, as it encourages frequent testing and
feedback throughout the development process.

• However, TDD is more focused on the developer's role in testing and ensuring
the quality of the code, whereas other agile testing approaches may involve more
collaboration between developers and testers.
Agile Testing
• Agile Testing Methods from 17 April 2023
• Test Driven Development (TDD) Example-

• Let us take an example for a TDD approach to check a function that calculates
the sum of two numbers:

• 1. First, write a test case that tests the sum function when given two numbers:

def test_sum():
assert sum(2, 3) == 5
Agile Testing
• Agile Testing Methods from 17 April 2023
• Test Driven Development (TDD) Example-
• 2. Run the test case and it should fail because we haven't implemented the sum
function yet.
• Implement the sum function to make the test pass:
def sum(a, b):
return a + b
3. Run the test case again to make sure the function works as expected:
def test_sum():
assert sum(2, 3) == 5
Agile Testing
• Agile Testing Methods from 17 April 2023
• Test Driven Development (TDD) Example-
• 4. Now, write additional test cases to cover edge cases, such as when one or both
arguments are zero:
def test_sum():
assert sum(2, 3) == 5
assert sum(0, 0) == 0
assert sum(0, 3) == 3
assert sum(2, 0) == 2
Agile Testing
• Agile Testing Methods from 17 April 2023
• Test Driven Development (TDD) Example-

• By following this process, we can ensure that our function works as expected, and
any changes we make to it in the future won't break existing functionality
because we can simply run our test cases again to check that everything still
works as expected.
Agile Testing
• Agile Testing Methods
• 2- Acceptance Test Driven Development (ATDD)

• It emphasizes writing automated tests for a software system before actually


writing the code.

• The tests are designed to verify the system's behavior against the requirements
and acceptance criteria, ensuring that the system meets the customer's needs.
Agile Testing
• Agile Testing Methods
• 2- Acceptance Test Driven Development (ATDD)

• It typically involves collaboration between the development team, the customer


or product owner, and other stakeholders.

• Together, they define the system requirements and the acceptance criteria that
the software must meet.
• Based on these requirements and criteria, the development team writes a set of
automated acceptance tests.
Agile Testing
• Agile Testing Methods
• 2- Acceptance Test Driven Development (ATDD)
• ATDD focuses on involving team members with different perspectives such as
the customer, developer, and tester.
• These three hold meetings to formulate acceptance tests incorporating
perspectives of the customer, development, and testing.
• The customer is focused on the problem that is to be solved, the development is
focused on how the problem will be solved whereas the testing is focused on
what could go wrong.
• The acceptance tests are a representation of the user’s point of view and it
describes how the system will function. It also helps to verify that the system
functions as it is supposed to. In some instances acceptance tests are automated.
Agile Testing
• Agile Testing Methods
• 2- Acceptance Test Driven Development (ATDD)
• The tests are run frequently throughout the development process, and any failing
tests indicate that the code does not meet the requirements or acceptance
criteria.
• The development team then updates the code to fix the issues, and runs the tests
again to verify that the system now meets the requirements.
Agile Testing
• Agile Testing Methods
• 2- Acceptance Test Driven Development (ATDD) Example-
• Assume that that you are working on developing an e-commerce website.

• One of the requirements for the website is that users should be able to create an
account and log in.

• You, as a developer, would work with the business stakeholder to create a set of
acceptance criteria for this requirement.
Agile Testing
• Agile Testing Methods
• 2- Acceptance Test Driven Development (ATDD) Example-
• The acceptance criteria could be as follows:
• User should be able to see a "Create Account" button on the home page.
• When the user clicks on the "Create Account" button, they should be directed
to a page where they can enter their personal details, such as name, email, and
password.
• After entering their details, the user should be able to click on a "Submit"
button to create their account.
• Upon successful account creation, the user should be redirected to the home
page, where they should be able to see a "Welcome" message with their name.
Agile Testing
• Agile Testing Methods
• 2- Acceptance Test Driven Development (ATDD) Example-
• Next, you would work with the testers to create automated tests that validate each of
these acceptance criteria.
• The tests can be written in a testing framework like Selenium or Cypress. Here's an
example of an automated test for the first acceptance criteria:
• Test Case: User should be able to see a "Create Account" button on the home page.
• Test Steps:
1. Navigate to the home page of the e-commerce website.
2. Verify that the "Create Account" button is visible on the home page.
3. Click on the "Create Account" button.
4. Verify that the user is directed to the account creation page.
Agile Testing
• Agile Testing Methods
• 2- Acceptance Test Driven Development (ATDD) Example-

• If this test fails, you would work with the testers and business stakeholders to
identify the problem and make any necessary changes to the software to ensure
that it meets the acceptance criteria.

• Once all the acceptance tests have been written and passed, the feature is
considered complete and ready for deployment.
Agile Testing
• Agile Testing Methods
• ATDD vs TDD
Agile Testing
• Agile Testing Methods
• ATDD vs TDD
• Test-driven development (TDD) and acceptance test-driven development (ATDD) are
two popular software development methodologies that aim to improve the quality of
code and ensure that software meets its intended requirements.

• TDD is a development technique where developers write tests before they write code.
• The idea behind TDD is that by writing tests first, developers can focus on building code
that satisfies the test cases.
• In TDD, developers write unit tests for small pieces of code and run them frequently to
ensure that the code is working as expected. Once the tests pass, developers can move on
to the next unit of code.
Agile Testing
• Agile Testing Methods
• ATDD vs TDD
• ATDD, on the other hand, is a collaborative approach where the development
team works with stakeholders to define acceptance criteria that software must
meet to be considered acceptable.

• These acceptance criteria are used to develop acceptance tests, which are
automated tests that simulate user behavior.

• Unlike TDD, ATDD focuses on testing the behavior of the entire system rather
than individual units of code.
Agile Testing
• Agile Testing Methods
• ATDD vs TDD
• In ATDD, acceptance tests are written before the code is developed.

• This approach ensures that the code meets the requirements and expectations of the
stakeholders.

• The acceptance tests are used to verify that the software meets the acceptance criteria
defined by the stakeholders.

• ATDD is often used in agile software development to ensure that software meets the
needs of the end-users.
Agile Testing
• Agile Testing Methods
• ATDD vs TDD
• In summary, TDD and ATDD are two different development methodologies that
focus on testing code in different ways.

• TDD focuses on testing individual units of code, while ATDD focuses on testing
the behavior of the entire system.

• Both approaches have their advantages and can be used depending on the needs
of the project.
Agile Testing
• Till 17 April 2023
Agile Testing
• Agile Testing Methods from 20 April 2023
• 3- Exploratory Testing ??
Agile Testing
• Agile Testing Methods from 20 April 2023
• 3- Exploratory Testing
• Exploratory testing is an important approach in Agile testing that focuses on
discovery, investigation, and learning.
• It is an informal testing approach that is performed without a formal test plan,
with testers using their knowledge, skills, and experience to test the software as
they go along.
• It is often used in conjunction with other testing approaches, such as automated
testing and manual testing.
• It can help identify defects and issues that may not be uncovered by other testing
approaches, as it allows testers to use their creativity and intuition to uncover
potential problems in the software.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing
• It it can help teams respond quickly to changes in requirements or user feedback.

• By allowing testers to explore the software and provide feedback early in the
development process, teams can identify issues and make changes before they
become more difficult and costly to fix.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing
• In this type of testing, the test design and test execution phase go hand in hand.
Exploratory testing emphasizes working software over comprehensive
documentation.
• The individuals and interactions are more important than the process and tools.
Customer collaboration holds greater value than contract negotiation.
• Exploratory testing is more adaptable to changes. In this testers identify the
functionality of an application by exploring the application.
• The testers try to learn the application, and design & execute the test plans
according to their findings.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing

• Remember, the goal of exploratory testing is not to find every possible defect, but
to uncover high-risk areas of the system that could cause problems for users.

• Be creative, keep an open mind, and focus on the end-user's perspective to ensure
that the attendance management system meets their needs and expectations.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example)

• Eg???
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example)
• Assume that you're testing a new feature on a website that allows users to create
and save custom playlists of songs.
• You decide to use exploratory testing to uncover any issues that might not be
immediately obvious.
• Steps:
• First, you would familiarize yourself with the feature by reading any available
documentation and talking to the developers who built it.
• Next, you might start by creating a few playlists of your own, to get a sense of how
the feature works and what options are available.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example)
• Steps: (Contd…)
• As you create playlists, you might notice that some of the songs aren't playing
correctly, or that the order of the tracks is incorrect. You would take note of these
issues and investigate them further.
• You might also try to break the feature by doing things like adding an excessive
number of songs to a playlist, or creating a playlist with no songs at all.
• This would help you identify any potential edge cases that the developers might
not have considered.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example)
• Steps: (Contd…)
• Throughout the testing process, you would be taking notes and logging any
issues you encounter. You might also be asking questions and brainstorming with
the other members of your testing team.
• After you've done some initial testing, you would review your notes and prioritize
any issues you found based on severity and likelihood of occurrence. You would
then communicate your findings to the development team, who would work to
address the issues and improve the feature.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example)
• Steps: (Contd…)

• Exploratory testing is all about being creative and curious, and using your
instincts and experience to uncover issues that might not be immediately
apparent.

• It's a valuable testing technique that can help ensure that software is reliable,
user-friendly, and effective.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example)

• Class Activity

• For Employee Attendance Management System, list steps to be followed


for executing Exploratory Testing.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example)
• Class Activity
• For Employee Attendance Management System, list steps to be followed
for executing Exploratory Testing.

• Start with a basic understanding of the system: Before you start testing, make
sure you have a good understanding of the system's requirements, features, and
user workflows.
• This will help you identify potential areas of risk and focus your testing efforts.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example) (contd…)
• For Employee Attendance Management System, list steps to be followed
for executing Exploratory Testing.

• Create test scenarios: Identify different scenarios that could happen while
using the attendance management system.
• For example, testing for normal attendance marking, testing for late coming,
testing for absentees, testing for half day leaves, testing for public holiday
attendance marking, etc.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example) (contd…)
• For Employee Attendance Management System, list steps to be followed
for executing Exploratory Testing.

• Test the user interface: Check the user interface of the system to ensure that it
is user-friendly and easy to navigate.

• This will help you identify any usability issues, such as confusing or misleading
labels, poor design, or inefficient workflows.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example) (contd…)
• For Employee Attendance Management System, list steps to be followed
for executing Exploratory Testing.

• Test system integration: Check how the attendance management system is


integrated with other systems like HR systems, Payroll systems, or Biometric
attendance machines, if any.
• This is to make sure that data is correctly flowing from one system to another.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example) (contd…)
• For Employee Attendance Management System, list steps to be followed
for executing Exploratory Testing.

• Test system scalability:

• Check how the system performs under different load conditions, and test if it can
handle high volumes of users at peak times, such as the beginning and end of the
workday.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example) (contd…)
• For Employee Attendance Management System, list steps to be followed
for executing Exploratory Testing.

• Test for security vulnerabilities:


• Check for any security vulnerabilities that could potentially be exploited by
hackers or malicious insiders.
• Test for user authentication and access controls, data encryption, and data
backup and recovery procedures.
Agile Testing
• Agile Testing Methods
• 3- Exploratory Testing (Example) (contd…)
• For Employee Attendance Management System, list steps to be followed
for executing Exploratory Testing.

• Record and report defects:


• Record any defects or issues you find during testing and report them to the
development team.
• Provide clear and concise descriptions of the problem, including steps to
reproduce it, screenshots or videos if possible, and any relevant log files or error
messages.
Agile Testing
• Agile Testing Methods
• 4- Continuous Testing
• It is an Agile testing method that involves testing early, often, and continuously
throughout the software development life cycle (SDLC).
• The goal of continuous testing is to identify defects as early as possible in the
SDLC, which helps reduce the cost of fixing defects and shorten the time to
market.
• It is achieved by automating as much of the testing process as possible and
integrating testing into the overall development process. This means that tests
are run automatically every time code changes are made, and the results of these
tests are used to inform further development.
Agile Testing
• Agile Testing Methods
• 4- Continuous Testing
• also involves collaboration between developers, testers, and other stakeholders,
who work together to ensure that testing is integrated into the development
process from the beginning.

• This helps to create a culture of quality and ensures that everyone is working
towards the same goal.
Agile Testing
• Agile Testing Methods
• 4- Continuous Testing (example)

• Assume that you're working on an e-commerce website, and you're responsible


for testing the checkout process.
• You start by writing test cases based on the user stories and acceptance criteria
defined in the sprint backlog.
• As the development team starts building the checkout functionality, you execute
the test cases and report any issues found. The developers fix the issues, and you
retest to ensure that the fixes have resolved the problems.
Agile Testing
• Agile Testing Methods
• 4- Continuous Testing (example) (contd…)

• As the sprint progresses, the developers add more features to the checkout
process, such as coupon codes, gift cards, and shipping options. You update your
test cases and execute them after each new feature is added.

• You also perform exploratory testing to find defects that might not be covered by
the test cases. You use automated testing tools to run regression tests, which help
you identify any issues caused by changes made to the codebase.
Agile Testing
• Agile Testing Methods
• 4- Continuous Testing (example) (contd…)

• Throughout the sprint, you collaborate with the development team to ensure that
the software is tested thoroughly and meets the acceptance criteria.

• By the end of the sprint, the checkout process is fully tested, and any defects are
resolved, ensuring that the software is of high quality and meets the customer's
requirements.
Agile Testing
• Advantages of Agile Testing Methodology???
Agile Testing
• Advantages of Agile Testing Methodology
• The benefits of the agile testing approach are as follows:
• It saves time and money
• Agile testing reduces documentation
• It is flexible and highly adaptable to changes
• It provides a way for receiving regular feedback from the end user
• Better determination of issues through daily meetings
Agile Testing
• Test Plan for Agile QA
• In agile testing, the test plan is written as well as updated for every release. A test plan in
agile includes:
• The scope of the testing
• Consolidating new functionalities to be tested
• Types of testing/Levels of testing
• Performance & load testing
• Consideration of infrastructure
• Risks Plan
• Planning of resources
• Deliverables & Milestones
Agile Testing
• Agile Testing Life Cycle
• The agile testing life cycle includes the following 5 phases:
• Impact assessment
• Agile Testing Planning
• Release Readiness
• Daily Scrums
• Test Agility Review
Agile Testing
• Agile Testing Life Cycle
• The agile testing life cycle includes the following 5 phases:
• Impact assessment
• Agile Testing Planning
• Release Readiness
• Daily Scrums
• Test Agility Review
Agile Testing
• Agile Testing Life Cycle
• The agile testing life cycle includes the following 5 phases:
• Impact assessment
• Agile Testing Planning
• Release Readiness
• Daily Scrums
• Test Agility Review
Agile Testing
• Agile Testing Strategies

• Agile testing life cycle spans through four stages


Agile Testing
• Agile Testing Strategies
• What is a Test Strategy?

• One looks at the existing constraints in the system


• Existing resources one has to do the testing
• Figuring out the best approach to meet the test objectives effectively
Agile Testing
• Agile Testing Strategies
• Agile testing life cycle spans through four stages
• (A) Iteration 0
• During the first stage or iteration 0, you perform initial setup tasks. It includes
identifying people for testing, installing testing tools, scheduling resources (usability
testing lab), etc. The following steps are set to achieve in Iteration 0
• a) Establishing a business case for the project
• b) Establish the boundary conditions and the project scope
• c) Outline the key requirements and use cases that will drive the design trade-offs
• d) Outline one or more candidate architectures
• e) Identifying the risk
• f) Cost estimation and prepare a preliminary project
Agile Testing
• Agile Testing Strategies
• Agile testing life cycle spans through four stages
• (B) Construction Iterations
• The second phase of agile testing methodology is Construction Iterations, the
majority of the testing occurs during this phase.
• This phase is observed as a set of iterations to build an increment of the solution.
• In order to do that, within each iteration, the team implements a hybrid of
practices from XP, Scrum, Agile modeling, and agile data and so on.
• In construction iteration, the agile team follows the prioritized requirement
practice: With each iteration, they take the most essential requirements
remaining from the work item stack and implement them.
Agile Testing
• Agile Testing Strategies
• Agile testing life cycle spans through four stages
• (B) Construction Iterations
• Construction iteration is classified into two, confirmatory testing and investigative
testing.
• Confirmatory testing concentrates on verifying that the system fulfils the intent of
the stakeholders as described to the team to date, and is performed by the team.
• While the investigative testing detects the problem that confirmatory team has skipped
or ignored.
• In Investigative testing, tester determines the potential problems in the form of defect
stories. Investigative testing deals with common issues like integration testing,
load/stress testing, and security testing.
Agile Testing
• Agile Testing Strategies
• Agile testing life cycle spans through four stages
• (B) Construction Iterations
• Again for, confirmatory testing there are two aspects developer testing and
agile acceptance testing.
• Both of them are automated to enable continuous regression testing throughout
the lifecycle. Confirmatory testing is the agile equivalent of testing to the
specification.
Agile Testing
• Agile Testing Strategies
• Agile testing life cycle spans through four stages
• (B) Construction Iterations
• Agile acceptance testing is a combination of traditional functional testing and
traditional acceptance testing as the development team, and stakeholders are
doing it together.

• While developer testing is a mix of traditional unit testing and traditional service
integration testing.
• Developer testing verifies both the application code and the database schema.
Agile Testing
• Agile Testing Strategies
• Agile testing life cycle spans through four stages
• (C) Release End Game Or Transition Phase
• The goal of “Release, End Game” is to deploy your system successfully into
production. The activities include in this phase are training of end users, support
people and operational people. Also, it includes marketing of the product
release, back-up & restoration, finalization of system and user documentation.
• The final agile methodology testing stage includes full system testing and
acceptance testing. In accordance to finish your final testing stage without any
obstacles, you should have to test the product more rigorously while it is in
construction iterations. During the end game, testers will be working on its
defect stories.
Agile Testing
• Agile Testing Strategies
• Agile testing life cycle spans through four stages
• (D) Production
• After the release stage, the product will move to the production stage.
Testing
• 2 Approach
• Test-Last
• Test-Early
Test-Last Approach
• With this approach, as testing has to wait till the particular stage is completed
• Unit testing, that is supposed to be done by the developers is often skipped. The
various reasons found are based on the mind-set of the developers.
• This results in −
• Compromising on the quality of the product delivered.
• Having the accountability for quality on testers only.
• High-costs in fixing the defects, post delivery.
• Inability to obtain customer satisfaction, which would also mean
loss of repeat business, thus effecting credibility.
Test-First Approach
• The Test-First approach replaces the inside-out (write code and then
test) to outside-in (write test and then code) way of development.
• In these methodologies, the developer designs and writes the Unit tests
for a code module before writing a single line of the code module.
• The developer then creates the code module with the goal of passing
the Unit test.
TDD Process Steps
Advantage of TDD
• The developer needs to understand first, what the desired result should be
and how to test it before creating the code.
• Testing and refactoring before the developer moves on to the next test.
• As the suite of Unit tests is run after each refactoring, feedback that each
component is still working is constant.
• The Unit tests act as living documentation that is always up to the data.
• If a defect is found, the developer creates a test to reveal that defect and
then modify the code so that the test passes and the defect is fixed. This
reduces the debugging time. All the other tests are also run and when they
pass, it ensures that the existing functionality is not broken.
Continue
• The developer can make design decisions and refactor at any time and
the running of the tests ensures that the system is still working. This
makes the software maintainable.
• The developer has the confidence to make any change since if the
change impacts any existing functionality, the same is revealed by
running the tests and the defects can be fixed immediately.
• On each successive test run, all the previous defect fixes are also
verified and the repetition of same defect is reduced.
• As most of the testing is done during the development itself, the
testing before delivery is shortened.
Misconception
• TDD is all about testing and test automation.
• TDD does not involve any design.
• TDD is only at Unit level.
• TDD means handing Acceptance tests to the developers.
Acceptance Criteria
• Acceptance Criteria are conditions which a software application should
satisfy to be accepted by a user or customer.
• It mentions the defined standards of a software product must meet.
• These are a set of rules which cover the system behaviour and from
which we can make acceptance scenarios.
• It include
• Functional
• Non-functional
• Performance
Example of Acceptance Criteria
• User Story: Creation of orders in online shopping cart
• Criteria: 1.
• User should be able to selects multiple items and add to shopping cart.
• The user should be able to see the items in the shopping cart.
• The user should be able to purchase items using their local currency.
• The user should be able to see an order number when the payment method is made.

• Other examples of Acceptance Criteria can include:


• The user would not be able to submit a form if all the mandatory fields are not entered.
• Modes of payments can be selected, like payment by credit card, debit card.
• An automatic email is sent once the payment is made and confirmed.
Acceptance Test
• It is a formal test conducted to determine whether the software
application satisfies its Acceptance Criteria and also help the customers
to decide whether to accept the system or not.
• The customer implements the acceptance tests to check whether the
user story is completed and correctly implemented.
• An application can have many acceptance tests to be sure that the
functionality of software works.
• These are black box approach tests.
Example
• The customer screen allows user to perform search on first and last
names
• Add few customer names in the database.
• Display customer search button
• Enter the name to be searched.
• Hit Search button.
• Expected results should be displayed
Acceptance Criteria Acceptance Testing
1. Set of conditions which need to be met to
1. Scenarios derived from acceptance criteria.
accept story as complete
2. Acceptance Criteria requires minimal amount
2. Here we require detailed documentation.
of documentation
3. It is a created prior to development phase, in 3. It is implemented during the development
planning phase. phase.
4. It states what needs to be done 4. It states how it needs to be done.
5. Acceptance criteria is written by the product
5. Acceptance tests can be added anytime by the
owner or the business analyst before the
customers or a specific testing team.
development phase.
6. Definition of acceptance criteria is more 6. It is more easier for the stakeholder to explain
difficult for a stakeholder than acceptance tests the acceptance scenario than criteria
7. It ensures that the team knows when they are 7. It ensures that the system is behaving as
completed with the user story. expected.
8. It is made through joint effort of developers, 8. Here it is implemented by developers and
testers and stakeholders. testers.
Acceptance TDD
• Acceptance Test Driven Development (ATDD) defines Acceptance
Criteria and Acceptance Tests during the creation of User Stories, early
in development.
• The Key practices in ATDD are as follows −
• Discuss real-world scenarios to build a shared understanding of the
domain.
• Use those scenarios to arrive at acceptance criteria.
• Automate Acceptance tests.
• Focus the development on those tests.
• Use the tests as a live specification to facilitate change.
Benefits of ATDD
• Requirements are unambiguous and without functional gaps.
• Others understand the special cases that the developers foresee.
• The Acceptance tests guide the development.
TDD vs BDD
• TDD describes how the software works.
• On the other hand, BDD −
• Describes how the end user uses the software.
• Fosters collaboration and communication.
• Emphasizes on examples of behaviour of the System.
• Aims at the executable specifications derived from the examples
Principle of Agile Testing
• Testing is NOT a Phase
• Testing Moves the project Forward
• Everyone Tests
• Shortening Feedback Response Time
• Clean Code
• Reduce Test Documentation
• Test Driven
Exploratory testing
• Exploratory Testing is defined as simultaneous learning, test design and test
execution.
• It is an approach to testing that values the tester as an integral part of the test
process and shares the same values as the Agile Manifesto.
• Exploratory Testing is also complementary to test automation; that is while
automated checks are checking for regression issues, Exploratory Testing focuses
on new features which have been developed.
• The exploratory testers focus on areas where existing automated tests might
come up short.
• Testing can be unstructured and freestyle or be managed using charters and test
sessions.
• Also due to the short intervals of development, testing inherently becomes risk
based, and exploratory testing can focus on high risk areas to find potential
problems.
Brian Marick’s testing quadrant from 27 April 2023
Continue
Continuous
• Quadrant Q1 − Unit Level, Technology Facing, and supports the developers.
Unit tests belong to this Quadrant. These tests can be Automated tests.
• Quadrant Q2 − System level, business facing, and conform product behaviour.
Functional tests belong to this quadrant. These tests are either manual or
automated.
• Quadrant Q3 − System or User Acceptance Level, Business Facing and focus
on real time scenarios. User Acceptance Tests belong to this quadrant. These
tests are manual.
• Quadrant Q4 − System or Operational Acceptance Level, Technology Facing
and Focus on Performance, Load, Stress, Maintainability, Scalability Tests.
Special tools can be used for these tests along with automation testing.
Risk based Testing
• Risk is the occurrence of an uncertain event with a positive or negative effect
on the measurable success criteria of a project.
• It could be events that have occurred in the past or current events or
something that could happen in the future
• These uncertain events can have an impact on the cost, business, technical
and quality targets of a project.
• Positive and Negative Risks
• Risk based testing involves prioritizing the feature's, modules and functions
to be tested based on impact and likelihood of failures.
• It involves assessing the risk based on the complexity, business criticality,
usage frequency, visible areas, defect prone areas, etc.
When to implement Risk based Testing
• Risk based testing can be implemented in
• Projects having time, resource, budget constraints, etc.
• Projects where risk based analysis can be used to detect
vulnerabilities to SQL injection attacks.
• Security Testing in Cloud Computing Environments.
• New projects with high risk factors like Lack of experience
with the technologies used, Lack of business domain
knowledge.
• Incremental and iterative models, etc.
Risk Management Process
• Factors for the Practice

Likelihood Impact
Complexity Business Importance
New Development (level of reuse) Financial Damage
Interfacing Usage intensity
Size External visibility
Technology Cost of rework
Inexperience (development team)
Regression Testing
• Regression testing essentially checks if the previous functionality of
the application is working coherently and that the new changes
executed have not introduced new bugs into the application.
• In the agile environment, Regression Testing is performed under two
broad categories:
• Sprint level Regression testing: This regression test is focused on
testing the new functionalities that are implemented since the last
release.
• End to End Regression testing: This test incorporates end-to-end
testing of ‘all’ the core functionalities of the product.
Regression testing approaches
• The Traditional Testing Approach: In this method, each sprint cycle
is followed by sprint level regression test. Post a few successful sprint
cycles, the application goes through one round of end-to-end
regression testing.
• This method allows the team to focus on the functional validity of the
application and gives testers the flexibility to decide on the degree of
automation they want to implement.
Continue
• Delayed Week Approach: In this approach, the sprint level regression test
is not confined to a timeline and can spill over into the next week. For
example, if the sprint level regression test that is supposed to be completed
in Week 2 is not completed, then it can spill over to Week 3.
• This approach works well in the beginning of the testing cycles as the testing
team at that time is still in the process of gaining an implicit understanding
of the functionalities and the possible defects.
• Instead of parking the bugs/defects and addressing them at a later date,
continuous testing lifts the burden of backlogs that build up during end-to-
end regression tests.
Continue
• Delayed Sprint Approach: In this approach, the regression cycle is
common and regression test cases that were employed for the second
sprint contain the functionality stories that were a part of the first
sprint.
• Since the regression cycle is only delayed by a sprint, this approach
discounts the need for having two separate regression test cycle types.
This approach also avoids a longer end-to-end regression test cycle.
• this approach has two challenges –
• Maintaining the sanctity of the regression tests is difficult.
• Maintenance of automation efforts increases considerably.

You might also like