10 Agile Testing
10 Agile Testing
• 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.
• 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
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)
• 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.
• 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.
• BDD tests are typically written in the Given-When-Then format, which describes
the preconditions, actions, and expected outcomes of a scenario.
• 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)
• Define the desired behavior: The desired behavior of the feature is that users
should be able to transfer funds between their accounts.
• 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.
• 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)
• 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)
• 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
• 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.
• 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.
• 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)
• 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
• 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.
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.