Software Testing in Agile Environment
Agile is an iterative methodology for software development. It bases on a close collaboration within the entire project team despite the development stage. Coding and quality verification are iterative and incremental.
At QA and testing stage, the implementation of Agile strategies requires specific techniques that differ from ones used during traditional software development. Agile testing should be iterative. It is not a one-time process. Agile testing is continuous in nature. In comparison to traditional software development, every Agile team member participates in testing activities. Agile testing makes the code “clean” as developers fix the detected bugs within the same interaction.
QA specialists must be flexible. They should not base testing activities on a full specification as the project requirements are determined and realized throughout the whole software development lifecycle (SDLC) that includes four stages:
- inception - initiation of the project
- iterations construction - delivery of the working system
- transition - deploy of a release into production
- production - support of the release.
The initial stage is project initiation called Iteration 0 or Sprint 0 depending on the Agile methodology, e.g., Scrum, XP (eXtreme Programming), FDD (Feature Driven Development), etc. Project initiation can take from a couple of hours to several weeks. It depends on the project specifics. At this stage, a project team conducts envisioning of initial requirements and architecture. Based on the results, a QA team determines a testing approach and sets up testing environment if necessary. There are several Agile testing strategies.
“Whole team” testing approach
The choice of testing strategy depends on the process size and complexity. According to the “whole team” approach, every member of Agile team should be aware of the specifics of programming and testing activities, despite his / her strengths. The generalization of different specialists with a wide range of skills takes place.
The approach increases the overall productivity and accelerates activities by reducing the wait time. It requires less paperwork, for example, a test plan, as the team members are closely collaborating. But the quality of testing based on the whole team strategy may suffer from group thinking. Besides, specialists may not have the skills required to conduct the task.
Development team testing approach
Agile development team prefers the whole team strategy applying such practices as continuous integration (CI) and test-driven development (TDD). Following CI approach, the team is able to perform continuous regression testing. The team performs multiple integrations of subsystems per day. To verify each integration and detect errors, specialists use an automated build. In other words, they conduct a static analysis to find errors of different nature, e.g., security issues.
TDD is one of confirmatory testing approaches. It verifies whether the requirement is implemented as it has been described before. The approach includes refactoring, e.g., the change of a source code to improve its design without modifying its semantics, and test-first development (TFD). According to TFD practice, a specialist writes a single test and part of code just enough to fail this test. He / she runs the test. If it fails, then the specialist updates the code to make the test pass. If the updated test passes, then a new test is written. The process is cyclic.
Agile team can performs TDD of different levels. Acceptance test-driven development (ATDD) starts with writing acceptance tests before the implementation of corresponding functionality. The tests are based on three different perspectives: customer (a problem to be solved), development (the way to solve the problem), and testing (the verification of realization). Acceptance TDD refers to behaviour driven development (BDD) that focuses on the expected behavior of the software under development. If no requirements are available, then user stories become the basis for testing. According to story test-driven development, the procedure starts with a story test provided by a customer. If the story test fails, then a specialist prepares a unit test. If the unit test passes, then code refactoring takes place.
Specialists perform refactoring to improve the quality of ready code. By making small changes of the code design, developers make it easier to comprehend and modify the code in future. Refactoring enables to apply an incremental and iterative approach to development. But during refactoring, the code semantics remains unchanged, and developers do not add any new feature. Refactoring is only the improvement of existing code and not the addition of a new one.
Apart from that, specialists can perform refactoring of a database schema that includes functional and structural aspects. Database refactoring is the process of database design improvement without any changes in its informational and behavioral semantics. In comparison to code refactoring, the database one is more complex. During code refactoring, a specialist should keep only behavioral semantics, while database refactoring also requires the maintainability of informational semantics. Refactoring can be applied to a user interface as well.
Independent test team
In case of complex environments that require specific skills and knowledge, the advanced strategy is applied to Agile software development. According to this approach, an independent QA team, that focuses only on testing activities, performs quality evaluation.
The tester’s role in non-Agile projects is to analyse requirements and documentation, select a testing strategy, prepare a Test Plan, design and execute test scripts, report detected bugs, and make sure a development team has fixed all of them. In case of Agile software development, a QA team is integrated into every stage of the process. Independent testers collaborate with developers and product owners to ensure a proper implementation of functional and business logic. Testers verify the meeting of acceptance criteria. A constant communication within the whole project team during daily meetings helps to detect and prevent errors in advance.
Besides, if development teams are working in parallel, independent test team helps to reduce expenses. One QA team will support several development ones. Apart from that, testing tools and expensive hardware environments are already available. Test environment setup includes setting up development tools, hardware, and work area. To optimize the process, developers adopt open source software tools. Independent test team uses both open source and commercial tools as they face more complex issues, for example, ones connected with system integration. Developers and independent test team should have a shared bug tracking system, especially while working on a complex system. When a system is ready to go into production, independent test team performs end-of-lifecycle testing. Also, testers can conduct parallel independent testing of Agile projects.