Best Practices in Agile Testing

In the previous posts, I covered basics of Agile Testing. Those include It’s definition, approach, challenges, Advantages and Principles of Testing in Agile. Here, is another very basic but important topic which is generally underrated – The Best Practices to follow while Testing in Agile environment.

       Unit test is a must

Unit Test – Smallest piece of code that can be tested individually.
This smallest piece of code is the one which is ignored most commonly. Test execution activities begin with Unit Testing and thus form the foundation of quality checks. Ironically, unit testing is the one which is most commonly ignored or cut short upon.
The teams must understand the importance of Unit Tests and make sure they are being executed. Automation is also another important factor which broadly help unit testing.

       Minimize dependencies

One of the most important attribute of an effective test case is that it can be executed by anyone in the team irrespective of who authored. The same principle applies to Agile too. The tests must be written in a manner that they have minimum dependency on test data and other configurations and thus can be executed and used to generate reports by anyone, anytime

       Follow Test Driven Development (TDD) or Behavior Driven Development (BDD) appropriately

TDD and BDD are the latest buzz words when it comes to boiling down another buzz word – Agile! While these techniques are definitely useful and prove very handy, care must be taken while implementing the same. It is not always necessary that the models fit into

       Automate

     Test Automation is yet another field which is always in discussions and looks really attractive. It’s a different topic of discussion, but for now, below are the areas which can be good candidate for for automation:
       Unit Tests
       Regression Tests
       Deployment

       Create Scenario/Story-based Test Cases

      With the development being done in Agile and releases are done as a collection of user stories,  testing activities should not be ignored and follow similar procedures. It’s important to write test cases based on individual user stories which are further linked appropriately to the Epics.
Topics in this series:

Approach to Agile in Testing

In my previous post, I talked in brief about “Testing in Agile“. Following the same, here are the approaches that may be followed for testing activities in Agile Framework.

Following the right approach to testing is a crucial factor to incorporate successful testing activities in Agile process. Since the development model is different than traditional methods, the teams need to sit together and finalize a process that best suits their project. Generally, following two approaches may be applied:
       Testing in Same Sprint
This method is like the traditional testing process where the QA team perform their test cases in the same sprint/Module (as per traditional process). Ideally, this should be the right approach to follow. Here, the QA team works on the same user stories as development team and prepare their test cases, perform execution iterations and make sure that the sprint delivers a quality product.
       Sprint lag – Sprint+1: Separate QA and DEV sprints
Since testing itself in Agile has its own challenges and tight deadlines is one of the main risk, most of the times, QA team is left with insufficient time to complete their execution iterations. This may happen due to continuous changing requirements which lead to last minute coding in development phase, deployment delays and many more factors.
To overcome this problem, some teams follow the ‘Sprint lag’ or ‘Sprint+1’ method. In this method, development and QA teams work on different sprints. For example,
Sprint 0:
Development Team – Works on Sprint 0
QA team – Works on test case preparation of Sprint 0
Sprint 1:
Development Team works on
1.    Sprint 1 development items
2.    Sprint 0 bug fixes
QA team works on –
1.    test execution iterations of Sprint 0
2.    test case preparation of Spring 1
Sprint 2:
Development Team works on
3.    Sprint 2 development items
4.    Sprint 1 bug fixes
QA team works on –
3.    test execution iterations of Sprint 1
4.    test case preparation of Spring 2

Principles of Agile Testing through the Agile Manifesto

I am working on the Agile Testing article and had a hard time when it came to principles of Agile Testing. All the bloggers and websites have done a good job in listing various pointers as the principles. In this post, I have tried to understand the Principles behind the Agile Manifestothrough QA or Software Testing perspective:

1.    Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.
Each sprint in Agile must be a deliverable which satisfies the customer’s requirements. The value of the same is always appreciated much more when it’s bug free thus making through testing at each stage a mandatory. Regression testing is one area which generally takes a lot of time as the software starts evolving in later sprints. Automation of regression and unit test cases must be taken into consideration right from the beginning to curb this issue.
2.    Welcome changing requirements, even late in development. Agile processes harness change for the customer’s competitive advantage.
Changing requirements leading to issues in related functionalities is generally the top reason of defects and thus all deliverables must be tested thoroughly before UAT. At the same time, testers also need to make sure that their test suites are updated regularly. Getting the regular review of test cases from the users is also recommended to make sure the same is updated as expected.
3.    Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale.
Many times, delivering a working product in shorter timescale leads to skipping the testing activities. This is one area; the teams need to sit together and find the possible solutions. Automated unit tests and regression tests combined with exploratory testing may be a savior in such situations. Automation does come along with maintenance cost but the same can drastically reduced when right automation framework with maximum shared objects and repositories is used thus making the individual scripts easy to maintain.
4.    Business people and developers must work together daily throughout the project.
Agile is all about evolving requirements. I think strong communication comes into picture in this principle. All the stakeholders: Development team, QA team, users/business analysts etc must be an integral part of core team and included in all communications in all cycles.
5.    Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done.
QA team in Agile are often ignored due to various factors – time being the most common. Just like all teams, the test team also need to be motivated and provided with required environments to perform their testing activities effectively.
6.    The most efficient and effective method of conveying information to and within a development team is face-to-face conversation.
This is one principle QA team also need to follow and understand properly. While there is a process for all the activities including raising bugs, but at the same time discussing the same with teams and providing their feedback on various details is equally important. Where-ever possible, all collaborating teams should be physically located together to save time and effort on emails and calls.
7.    Working software is the primary measure of progress.
All stakeholders must understand that a working software is primary goal of any project. The QA team should also focus more on getting the product deliverable instead of concentrating on breaking the system (which is the general mindset of testers). The data generated should be simple and easily understood by all stakeholders. Complicated reports with fancy metrics might look great on display but they do not guarantee client satisfaction. The only full proved method for client approval is a working software as per customer expectations.
8.    Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.
The QA team should be included in all details and have the crucial responsibility of making sure that the test coverage is achieved to highest possible.
9.    Continuous attention to technical excellence and good design enhances agility.
The QA team must ensure that all testing activities starting from understanding and test case writing to execution and bug verification are performed properly. The development team also need to make sure that all inputs of test team are taken seriously. It’s is the joint responsibility of QA and development team which ensures excellence and quick delivery of quality products
10.  Simplicity–the art of maximizing the amount of work not done–is essential.
When I try to relate this with testing, ‘Unit Testing’ is the first term which comes to my mind instantly. Unit testing is the most basic of all and is often ignored the most. Making sure that the smallest unit of code is working fine is the first step to quality software.
11.  The best architectures, requirements, and designs emerge from self-organizing teams.
When I think of this principle with respect to testing, All the basics of testing seems to apply here. The QA teams need to ensure that the requirements are covered in the test suites, regression tests are regularly updated, right tools for automation are chosen and the team members are skilled enough to cope up with frequent changes in the requirements.
12.  At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.

               The more frequently product is tested for its effectiveness, the more robust it becomes. Regression testing can play an important role while executing this principle.

See Also:


I tried my best to explain the principles with respect to QA or software testing mind. Please feel free to provide your inputs. I would be more than happy to edit or update any of the points.