Testing in a two-week sprint is a core tenet of Agile methodologies. The goal is to move away from a "waterfall" approach where testing happens at the end and instead, integrate it as a continuous, collaborative process throughout the sprint. This is often referred to as "shifting left" on the development life-cycle. Let’s look at a breakdown of how to approach testing effectively within a two-week sprint and I am sure there will be questions.
Quality is everyone's responsibility and this is the most crucial mindset change.
Software Engineers are not just responsible for writing code. They are responsible for ensuring its quality.
QA Analysts / Engineers are not just there to "find bugs" at the end. They are active participants in the entire process.
QA Analysts / Engineers should be an integral part of the Scrum team, participating in all ceremonies: sprint planning, daily stand-ups, sprint reviews, sprint refinement (backlog grooming), architectural and security meetings, and be able to meet their stakeholders. This ensures they have a deep understanding of the user stories, can provide input on the testing effort, and identify potential issues early.
An Agile Coach once advised me to crash the Architectural meeting by asking “Is this testable?”, which I did. Everyone was surprised about the question and it turned out that the architecture was only testable from a GUI perspective but almost impossible to automate. As a result the architecture was changed.
While the core of Agile methodologies is about being flexible and adapting to change, upfront planning and collaboration are crucial to be successful as an Agile Team and Organization. The idea is not to create a rigid, "Waterfall-style" plan, but to establish a foundation and a shared understanding that guides the iterative process. While a traditional "waterfall" approach saves all testing for the end, Agile integrates it throughout the development cycle. Upfront planning and collaboration make this possible and effective. Here's why they are so vital for testing in Agile:
The core principle of "shift-left" testing is to move quality assurance activities to the earliest possible stage of the development life-cycle. Upfront collaboration is the foundation for this.
Preventing Defects, Not Just Finding Them:
By involving Quality Analysts / Engineers, Architects, and product owners in the initial planning sessions, the team can identify potential issues and misunderstandings before a single line of code is written. This is far more efficient than fixing a bug after it's been coded.
Clearer Requirements and Acceptance Criteria: Upfront discussions ensure that user stories and requirements are well-defined and testable. Quality Analysts / Engineers can help the product owner refine acceptance criteria, making sure everyone has a shared understanding of what "done" looks like from a quality perspective. This reduces ambiguity and the likelihood of building the wrong thing.
Upfront planning allows the testing team to prepare for the sprints ahead.
Test Case Design:
Quality Analysts / Engineers can start designing test cases and writing automated tests for user stories even before the development work begins. This "test-first" approach ensures that tests are ready when the code is complete, allowing for rapid feedback and continuous integration.
Defining the "Test Pyramid":
The team can collectively decide on the right balance of unit tests, integration tests, end-to-end tests, and in production test cases for the User-Story / Feature . This strategic decision, made upfront, ensures that testing efforts are efficient and effective.
Environment and Tooling Preparation:
Planning also involves identifying the necessary test environments, data, and tools. This prevents delays and ensures that the team has everything they need to perform testing activities seamlessly within each sprint.
Upfront planning allows the testing team to prepare for the sprints ahead.
Identifying High-Risk Areas:
Upfront collaboration allows the team to identify the most critical and high-risk features of the User-Story / Feature. This enables Quality Analysts / Engineers to prioritize their efforts and focus on thoroughly testing the areas that could have the biggest impact if they fail.
Effective Sprint Planning:
Upfront planning breaks down the high-level timeline into manageable iterations or sprints, each with specific goals. This provides a starting point for more detailed sprint planning and ensures that each sprint contributes meaningfully to the overall User-Story / Feature.
Continuous Improvement:
Agile's iterative nature allows for constant re-evaluation and adjustment. However, having a foundational plan provides a baseline to measure against and a clear direction for where the team is going, which is essential for making informed decisions throughout the User-Story / Feature solution creation.
Define DONE:
Before development begins, the team must have a clear and shared understanding of what "done" means for each User-Story / Feature. This includes defining clear acceptance criteria that will be used to validate the feature.
Backlog refinement:
QA Analysts / Engineers should be involved in backlog refinement to help break down large stories into smaller, testable chunks. They can provide initial estimates for the testing effort and highlight any potential risks or dependencies.
Pairing and collaboration:
Encourage Software Engineers and QA Analysts / Engineers to work together. A Software can write a unit test while a tester helps define the acceptance tests, or they can pair-program to ensure test-ability is built in from the start.
Automate regression testing:
A two-week sprint cycle necessitates a high degree of automation. As new features are added, the regression test suite (the set of tests that ensure existing functionality hasn't broken) will grow. Automating these tests allows the team to run them frequently and quickly.
Continuous Integration/Continuous Delivery (CI/CD):
Integrate automated tests into a CI/CD pipeline. Every time a Software commits code, the pipeline should automatically run a suite of tests to provide immediate feedback on the quality of the change.
Exploratory Testing:
This is a crucial element in a short sprint. It's a hands-on, creative approach where the tester explores the application to uncover bugs and learn about the product. This is particularly useful for finding issues that automated tests might miss.
Manual Testing:
While automation is vital, manual testing is still necessary. Use manual testing for things that are difficult to automate, such as usability, a new user interface, or complex business logic.
Testing in Production:
Spot checking in production and asking the stakeholders to do so is essential to ensure that the release to production did not result in an unknown side effect.