Agile Testing: Best Practices and Methodology
Do you ever come across a situation as a developer or a coder wondering how did this code script get the approval to be released?
Or maybe you were one of the testers who received a code right before its deployment and insisted that the code was not ready, yet your marketing team pushed it on release.
Most of the companies follow a culture like this where they prioritize deadlines above quality and end-up delivering codes full of bugs. Keeping the testing department aloof of the development process gives way to such chaos within the testing and development teams. Needless to say, marketing and sales teams play a major role in additionally pressurising companies into releasing codes without proper testing.
Agile methodologies come to rescue here! Agile can help bridge the gap between increasing business expectations and unsatisfactory IT delivery. Though more than 70% of the businesses today still follow the waterfall model of software development and testing, Agile testing companies are taking centre stage by offering dynamic software testing services to offer efficiency and increased speed to delivery for businesses.
Defining Agile
Looking at the definition of agile, oxford says “agile is used to describe a way of managing projects in which work is divided into a series of short tasks, with regular breaks to review the work and adapt the plans.”
Agile is a better way of developing software. In the field of testing, Agile is a kind of software testing process that follows the path laid down by agile software development. Here the development is aligned with customer’s and testing team’s requirements.
Through agile development, testing companies today have started to give value to:
- Individuals and interactions over processes and tools
- Working software over comprehensive documentation
- Customer collaboration over contract negotiation
- Responding to change over following a plan
In other words, agile testing focuses on delivering a continuous stream of business value, even if your systems or processes are constantly changing.
How Agile is different from the Traditional Waterfall Approach?
The waterfall approach in software development is a sequential process in which development is done in a steady flow of steps starting from requirement analysis and going all the way to maintenance.
In this process of development, software testing is yet another phase that’s touched only until the end of the development cycle.
Here are some of the qualities of the traditional waterfall method:
- First code, then test
- Development and testing teams were considered separate from each other each working in their own silo
- Each part of the process is heavy and requires tons of documents
- Testing becomes a bottleneck in the very end, thus making it virtually impossible to maintain a schedule
- Automation tools come into picture after the coding process is completed
The waterfall approach mostly lacks effective team engagement and suffers from disrupted communication between developers.
The latest agile methodology delivers solutions to the, most common loopholes in the waterfall model.
- Brings together coding and testing
- Effective feedback and collaboration come into the picture
- The added process of exploratory testing suggests loopholes in the code before time
- Gives rise to better ideas and mind mapping
- All teams integrate into one structured operational system
Agile testing Methodologies
Now let’s have a closer look at the most common agile testing methodologies.
Four basic agile methods are being used by developers and treasurer today:
- Behaviour Driven Development (BDD
- Acceptance Test-Driven Development (ATDD)
- Exploratory Testing
- Session-Based Testing
1) Behaviour Driven Development (BDD)
Behaviour driven development or BDD is very similar to the test-driven development approach or TDD.
It encourages communication between the stakeholder involved in a project so every other member understands every feature of the system before the beginning of the development process. In BDD, tester developers and analysts create scenarios that promote example focussed communication in detail.
The main idea of BDD is that a specific team creates relevant scenarios and then builds a test series around those scenarios that are predicted to fail. Next, these testers build software functionality and program them to pass in the same scenarios.
The basic difference that comes from traditional Test-Driven Development (TDD) is that there, complete software functionality is tested, not just individual components of a software code.
Best practices
Best practices for testers following a BDD methodology include:
- Streamline the documentation to keep the process lean
- Embrace the famous “three amigos” model where the product owner, developer and tester come together to discuss possible issues
- Use a framework like Cucumber to define criteria accurately
- Build automated tests in a way that they can be reused as and when needed
- Make your business analysts learn the Gherkin syntax and write test cases directly
2) Acceptance Test-Driven Development (ATDD)
Acceptance Test-Driven Development or ATDD involves three players, customer, developer, and tester. All these three players come together in meetings to gather inputs from their roles and use them to define acceptance tests. The customer focuses on the problem, the developer pays attention to proposing a possible solution to the problem and testing analysis on possible situations where things could go wrong.
It basically represents a user’s perspective and represents the possible ways of how the system can function. It also ensures that the system functions as planned. These tests are mostly automated and their script is closely similar to the BDD approach.
Best practices
Best practices for testers following an ATDD Agile methodology include:
- Interact closely with customers, for example through focus groups, to determine expectations
- Focus more on team members standing on the front line with the customers, such as sales representative, customer service agents and accountM
- Managers to understand customer expectations better
- Prioritize strategies on two questions:
- Will your customer use the system if it does X?
- How can we as a service provider validate if the system does X?
3) Exploratory Testing
The test execution and test design phase go hand in hand in exploratory testing. It’s a type of functional testing service that focuses on interacting with the software rather than separately planning, building and running test cases. It allows testers to play with their code differently. Firstly, it’s not scripted, which means testers can mimic possible user behaviours and get to be creative in finding all possible ways that can break a software. They do not document the process but pay more attention to identify the defects. Because of its unscripted approach, exploratory testing often helps in identifying ways how users can interact with the software in real life.
Exploratory testing follows four key principles:
- Parallel test planning, test design and test execution
- Specific yet flexible
- Aligned toward the investigation of potential opportunities
- Knowledge sharing
Best practices
Best practices for testers using exploratory testing include:
- Use tools like mind map or spreadsheet to organise the functionality of the application
- Focus more on certain areas
- Keep a track of your test scripts to avoid repeating mistakes
- Document results in tools like qTest Explorer to maintain accountability
4)Session Based Testing
Session-based testing is very similar to exploratory testing but more organised. Its goal is to ensure that the software is tested comprehensively. It adds charters that helps testers identify what to test and in which sequence. Secondly, it adds test reports which give testers the option to document all their discoveries throughout the testing process. These tests are conducted in time-boxed sessions which ends with a face-to-face brief between testers and developers, scrum masters or managers, covering the following points:
- What was done? (Past)
- What was discovered or achieved? (Results)
- What issues did they face? (Obstacles)
- What is left? (Outlook)
- What did they felt about the areas they tested? (Feelings).
Best practices
Best practices for testers using session-based testing include:
- Outline clear directions or missions for testers to be on track
- Develop a clear charter that indicates the mission
- Run the testing session without any interruptions
- Document all your activities and notes during the session in a session report maintained throughout the test
- Hold a briefing session between the tester and the manager to review your findings from the session and discuss the strategy ahead
Agile Testing Quadrants
With the above testing methodologies well in place, it’s difficult to assess which type of tests should be run, how often to run, when to run, and who to run it by? The famous concept of agile testing quadrants comes into picture here, given by Gregory and Crispin, that provides a taxonomy of the tests. As per Crispin, the two left-hand quadrants can help teams know which of the given codes to write and understand when they are done writing. The two-right handed quadrants helps the team know more about the code they have written by providing valuable feedback to the left-hand quadrants.
Quadrant 1:
Automated Quadrant – This quadrant has tests that are specifically designed to improve the code of the product being scripted. These tests help improve the design without affecting the functionality as a whole. The tests being covered here include unit tests, API tests, web service testing and component tests. The main idea is to improve the quality of the product by a structured source code management and seamlessly integrated development environment. This quadrant helps teams identify possible pain points and eases out the processes for the future. Some of the basic tools used here include TeamCity, xUnit, Eclipse, IntelliJ Idea, etc.
Quadrant 2:
Automated and manual Quadrant – This quadrant contains tests such as Functional testing, story tests, Prototypes, and simulations that are designed to improve the business outcomes. They help create products that drive value for the business and customers by formulating the right set of questions and ultimately derive tests that are aligned with the business. It involves a lot of brainstorming and planning. To support this, tools like MindMap may be used along with Visio for a straight flow of diagrams. Behaviour driven tools such as Cucumber and easyB can be easily used to ease functionality.
Quadrant 3:
Manual Quadrant – This quadrant is associated with Manual testing and contains tests to provide feedback for the tests that are conducted in Q1 and Q2. It tests the product and user experience by evaluating the product and its use by opting for options like demos, feedback, checking user experience, etc. The tests most commonly used here include Exploratory Testing, Scenario-based Testing, Usability Testing, User Acceptance Testing, and Alpha/Beta testing. It involves intuition and critical thinking along with a strategical usage of Simulator and emulators.
Quadrant 4:
Tools Quadrant – This quadrant is associated with Automated tools and contains tests that use technology to ensure the code fulfils every non-functional requirement such as security and compatibility. The tests used in this process include Performance & Load Testing and Security Testing. Majorly the tests performed in this quadrant are done on priority basis which means they may begin early in the SDLC process or be introduced later in testing as and when required. Major tools used in this process include jConsole, jProfiler, Loadrunner, jMeter, jUnitPerf, etc.
Make Agile Testing Work for your Enterprise
With agile testing, development can be more controlled that can result in reduced bugs in code and fewer chances or your application crashing down. Repetitive testing ensures all the components of your software system are working correctly at every single step. Agile testing is a necessary step towards achieving high test coverage and better code quality along with delivering value to your customers.
We at Elite QASolutions follow the best agile testing practises in our end-to-end testing procedures. Our best in industry testing approach helps our clients seamlessly integrate both their agile and hybrid development processes together to deliver quality products.
Schedule a call to know how Elite QASolutions can help you get better testing results!