Nishil Patel
Dec 12, 2023
6 min read
Agile testing uses the core principles of the agile development methodology, enabling you to run quality assurance and testing activities in all phases of development. In this article, we’ve covered agile testing. You’ll learn about the key principles of agile testing, agile testing quadrants, strategies for it, the agile lifecycle, and practical steps to run agile testing for your software.
1.
Introduction
2.
What is agile testing in software?
3.
What are the key principles of agile testing?
4.
What are the agile testing quadrants?
5.
What are the agile testing strategies?
6.
What is the agile testing lifecycle?
7.
How to run agile testing in software? [Step-by-step]
8.
FAQs
For most software teams, delivering a top-notch product while keeping up with rapid development and release cycles can be pretty daunting. In such cases, agile testing can become a lifesaver. Rather than keeping testing activities on standby until development finishes, agile testing integrates the quality assurance (QA) and testing processes into the project as soon as it kicks off and into every development phase. Learn more about agile testing in this article.
Agile testing is a software testing methodology that uses the principles of agile development. In contrast to the traditional testing methodology (such as waterfall), where the testing activities start after the development completes, agile testing includes the testing activities in all phases of development — starting from the requirement gathering, all the way to the deployment and feedback phase.
The key focus of agile testing is iterative and continuous product improvement. This enables teams to adapt the testing activities to the dynamics of an agile project. Moreover, with agile testing, quality assurance(QA and testers can catch software issues as soon as they arise and resolve them before they snowball to become larger defects.
Also Read: Quality Assurance vs Quality Control
Key principles of agile testing:
Also Read: Why every CI/CD pipeline needs a visual bug tracker
Agile testing quadrants are a 2D matrix-based representation that divides the agile development methodology for testing into four categories: Two of them representing the business aspects in agile testing, and the other two representing the technological aspects of it. Each of the quadrants includes specific types of testing in a typical SDLC.
The concept was first described by Brian Marick in the year 2003. It was then popularized by Gregory and Crispin in 2009 in their book “Agile Testing: A Practical Guide for Testers and Agile Teams”.
Each quadrant helps balance the testing efforts in agile to ensure that the dev team’s requirements and the product market’s expectations are thoroughly vetted and validated for a top-notch end product.
The quadrants are split along two axes:
Here’s a breakdown of each quadrant:
Key strategies for agile testing:
TDD uses the approach of writing the tests before the actual code is written and implemented. This strategy makes developers critically think about the expected output from the very beginning. Once the code is written, implemented, and ready to be tested, the testing activities start right off the bat to verify if the new features meet the project specs.
In an e-commerce app, if you are building a function to calculate discounts on orders, before writing the function, you create test cases for various scenarios: a standard order, applying a coupon, and an order that shows the best price after the maximum discount allowed. With TDD, you only write the code to pass those tests. This way, you can ensure that all potential cases are covered before the feature is delivered.
With BDD, you can write test cases in plain language to describe the expected behavior of the software. This enables you to collaborate with both technical and non-technical stakeholders to define scenarios using a simple syntax.
If you are testing a login feature in your app, in BDD, you would write a scenario such as: Given the user is on the login page, when the user enters correct credentials, then the user should be redirected to the dashboard. This clear language makes it easier for everyone to understand the expected outcome.
CI/CD processes and tools can help automate test runs so that every code commit triggers a chain of tests that verify the functionality of the system.
Also Read: How to reduce rollbacks in CI/CD pipelines
If you use a CI tool like Jenkins or GitLab CI, you can automatically run your suite of unit tests and integration tests every time new code is pushed. When tests fail, the CI system alerts you immediately, allowing you to fix the issues before they accumulate.
While automation is key in agile testing, manual testing still matters, and there is an unwavering place for manual exploratory testing in the agile process. Exploratory testing enables you to use experience and technical expertise to test software to identify defects that automated tests might miss.
After running a suite of automated tests on a new feature, you might use exploratory testing to navigate through the application just like an end user would. Then, you can check how the system behaves when you try unexpected sequences of actions or invalid inputs.
ATDD is a collaborative agile practice where developers, testers, and business stakeholders jointly define acceptance criteria for a feature before coding. These criteria are framed as automated tests from a user's perspective, ensuring everyone understands what needs to be built and that the software meets user expectations.
SBT is a structured approach to exploratory testing conducted in uninterrupted, time-boxed sessions (e.g., 90 minutes). Each session has a specific "charter" (mission) guiding the tester, who dynamically designs, executes, and documents tests, observations, and any defects found.
Also Read: What is a requirement traceability matrix (RTM)?
The agile testing lifecycle is an iterative process that works using a set of pre-defined stages to integrate testing activities in every sprint as the development goes on. This leads to a continually improved product and provides the flexibility to adjust testing processes to align with the frequently updating requirements.
Key stages of the agile testing lifecycle:
Agile testing steps:
Before the sprint begins, start things off by sitting down with your team and defining clear objectives for testing. This enables you and your team to work together to set acceptance criteria for the user stories and features considered to be tested in the current sprint. Use these criteria as a blueprint for your test cases.
Steps for it:
For example, if you are testing an e-commerce checkout, ensure that acceptance criteria cover payment processing, error handling, discounts, and order confirmation.
During the sprint planning session, develop a testing plan that outlines what needs to be tested, how it will be tested, and the resources required. This helps organize your work and ensures that every aspect of the new code is verified.
Steps for it:
Your testing plan then becomes a go-to document that keeps updating through the sprint, as you add new test cases or update existing ones based on the feedback from earlier iterations.
Also Read: Unit Testing vs Integration Testing
Next, work on writing tests that align with the predefined acceptance criteria. Wherever feasible, consider automating the test cases to make sure that they can run quickly with every build.
Steps for it:
For example, if your application includes a login feature, you can write automated tests that simulate correct and incorrect login attempts. This can verify the functionality and serve as a safety net for future changes.
As the development cycle progresses, run these test cases repeatedly. Integrate automated tests into your continuous integration system so that every commit triggers the test suite.
Steps for it:
These short, iterative testing and feedback cycles can ensure that the sprint’s code remains stable. Plus, the developers make the necessary adjustments as soon as issues are detected.
Next, collect and analyze results to identify any deviations from the expected output. Any issues found during testing need to be logged and discussed.
Steps for it:
For instance, if a test fails due to a login error, consider reporting it immediately with all relevant details, allowing developers to fix the bug without delay.
As each sprint concludes, join the sprint retrospective meeting to reflect on the process. This is your opportunity to assess what worked effectively and identify areas for improvement in your testing approach.
Steps for it:
This regular examination helps you refine your approach continuously. Over time, you can build a dynamic process that gradually eliminates repetitive defects and improves overall quality.
Read More: What are sprint retrospectives? Techniques and steps to run
As new challenges and requirements come up, make sure to adjust and refine the test cases accordingly. Don’t forget to update, add, or even remove tests to adapt to changes in the application and development methods.
Steps for it:
Nishil is a successful serial entrepreneur. He has more than a decade of experience in the software industry. He advocates for a culture of excellence in every software product.
Meet the Author: Nishil Patel, CEO, and Co-founder of BetterBugs. With a passion for innovation and a mission to improve software quality.
We never spam.
Share your experience with the founderhere!