How Agile Testing Improves the Quality & Reduces the Cost of a Software Project
The traditional procedure for software development involves a series of stages from start to finish: requirements analysis, planning and design, development, testing, deployment, and maintenance. This approach is typically called the waterfall model, largely because like a waterfall, the progress of development flows in one direction. However, this approach has often been criticized as largely ineffective in software development, including in projects handled by an offshore development team, because it does not allow for adjustments in development when changes in requirements arise.
A more flexible model called the agile methodology arose to address this problem. Essentially, this model or framework for software development advocates the use of several development cycles called sprints where small working increments of the product are to be developed and deployed. This allows for agile projects to easily accommodate changes in requirements and allows project members to adjust their planning strategies accordingly. Additionally, it enables the early delivery of working software.
The agile methodology includes a testing framework that adheres to this flexible and adaptable software development framework. Whereas in the waterfall method, testing is done at the very end of the project after all development items have been completed, agile testing requires that testing is done for each sprint and that testing is performed by all the developers in an agile team. For this reason, agile testing requires the members of a project to be cross-functional.
In this article, we take a closer look at agile testing and see the benefits that it brings to a software development project.
The idea of incremental and iterative software development dates back to as early as the 1960s with adaptive software development and evolutionary project management. However, it was only in 2001 that a strict and standard set of guidelines for agile development was published. The details of agile development were conceptualized by a group of software developers including Jeff Sutherland and Ken Schwaber and were published in a document entitled the Manifesto for Agile Software Development.
The Agile Manifesto contains a number of principles that must be followed during an agile software development project, including the following:
- Changes in requirements must be accommodated.
- There should be an early and continuous delivery of working increments of the software.
- There should be a close and constant coordination between the developers and the stakeholders.
- Teams should be self-organizing and should not be micromanaged in order for them to create the best possible design and architecture for each sprint.
Agile testing is a software testing framework designed to work in harmony with agile software development methodologies. Instead of testing being a separate phase from actual coding and development, testing in the agile methodology is integrated into the coding process. After each functional unit has been developed, full testing is performed on the said unit, and development for it will not stop until it has fully passed the test criteria.
In addition to the integration of testing and development within an agile sprint, agile testing requires that developers within a team be cross-functional, meaning that they should also perform full testing on each unit they develop. Instead of testers performing the testing for functional units developed by developers, testers in an agile team only supervise developers using their expertise and domain knowledge in software testing so that the developers are able to formulate correct and complete test cases for each development user story.
As a result, agile testing enables the immediate fixing of bugs once they are found instead of the team having to wait for the end of the project to fix a huge pile-up of bugs. This results in shorter bug fixing times, because as opposed to the waterfall method, developers will not have to spend significant time re-reading and re-engaging with the codes they wrote a long time ago. Moreover, since development for the user story that contained bugs is often fairly recent in agile testing, there is a smaller chance of the developer introducing new bugs to the system upon fixing old ones due to decreased familiarity with the said use case. Collectively, these result in a dramatic reduction in development cost.
Agile vs Waterfall Testing
Let’s do a comparison of agile and waterfall testing to help us determine which testing model will best suit our needs. For this purpose, let’s list the benefits and drawbacks of each approach.
|Agile Testing||Waterfall Testing|
|Pros||● Immediate fixing of bugs, leading to shorter bug fixing durations
● Works well with changing requirements
● Substantially lowers project cost
|● Documentation is straightforward and easy
● Onboarding of new members is more straightforward
|Cons||● May result in frustration for inexperienced developers||● Restrictive in terms of accommodating changes
● Dramatically higher project cost with even minor changes in requirements
Agile Testing: Pros
Agile testing allows bugs to be fixed quickly, thus reducing the time for developers to re-engage with their codes and pinpoint the exact source of bugs. This reduces overall bug fixing time, and consequently, it reduces the overall project cost. Moreover, agile testing allows projects to easily accommodate changes in requirements. In contrast with the waterfall method wherein all test cases are written during the planning stage and are executed after all development has finished, with agile testing, test cases are written as requirements come, so only the test cases for the user stories being developed need to be finalized. As such, there is minimal wastage in effort when large deviations from the initial requirements arise. Again, this contributes to the reduced development cost.
Agile Testing: Cons
While agile testing generally tends to result in quicker overall development, it may also sometimes lead to discouragement in amateur developers who are new to agile testing. Whereas with the waterfall method, developers don’t have to deal with bugs until the latter part of the project, with agile testing, they will have to deal with bugs all the time. This can cause frustration in the part of the developer early in the project and, depending on their professionalism, this may affect their development of succeeding functional units.
Waterfall Testing: Pros
With the waterfall testing method’s rigid structure, it lends itself well to complete and organized documentation. We expect that the test cases written from the very beginning should be applicable to the entire project until the very end since no changes are typically permitted. This results in easier onboarding for new members of the team, as they will only have to read the documentation and test cases written during the planning change and are not subject to confusion over changes in requirements.
Waterfall Testing: Cons
Due also to the rigid structure of the waterfall method, agile testing tends to be very restrictive in terms of allowing changes in requirements. Basically, it cannot be applied when requirements are expected to change after the planning stage has transpired. When such changes occur, it becomes very difficult to change all the documented plans and test cases formulated at the beginning and cascade these changes onto all dependencies. Such changes will result in a huge increase in development cost compared to the original projection.
We can see from the above comparison that unless the project requirements are set in stone at the very beginning and the client is absolutely sure of all the details of the project at the start, agile testing is the way to go.
Agile Testing Best Practices
Agile testing works best when done in conjunction with other best practices for the agile methodology. Let’s take a look at two of these best practices and see how they can add further value to agile testing.
The traditional approach for software testing is the manual testing approach, where testers have to manually perform the test cases by interacting with the system’s user interface in order to determine whether the functional unit just developed passes each test criterion. While this is the easiest approach, it is not always the most economical. Test automation addresses this with the use of automation tools that enable developers to develop scripts that perform the execution of these test cases for them. This becomes very useful in agile projects, where development is done in sprints. In every sprint, regression testing has to be performed in order to check that no previously working functionality has been broken. As such, this will entail a developer to merely run all test scripts previously developed to ensure that all previously working use cases are still working.
In test-driven development, the requirements for each sprint are converted into test cases that each user story must pass, after which the deliverable for that sprint will be considered as acceptable. The idea is that once the requirements have been expressed as test cases, the developer will then begin with a simple code and incrementally improve on the code until the use case he/she is developing passes all the test cases. The test cases should be complete and comprehensive so that it is sufficient for the functional unit to pass all the test cases for it to be considered acceptable by the client. This approach dramatically reduces the number of bugs that arise because testing becomes essentially the main priority in development. With agile testing, this becomes even more valuable because changes in requirements can cause several bugs to surface, so changing the test cases to reflect these changes in requirements becomes a reliable guide towards maintaining the integrity of the application in the face of these changes.
About the Author:
Anastasia Stefanuk is a passionate writer and a marketing manager at Mobilunity. The company provides professional staffing services, so she is always aware of technology news and wants to share her experience to help tech startups and companies to be up-to-date.