Friday, September 28, 2012

Agile QA


With more and more teams adopting agile methodology for the application development, It is important for QA to grasp the agile methodology and to adapt in such a way to start effectively using the agile methodology for testing as well.
This article is trying to introduce the Agile Methodology to testers, and compare the differences between traditional (Waterfall) QA and agile way of testing. We go on to explore how agile methodology affects the way testing is performed, the involvement of QA and how to effectively use it to produce a Quality Product

In Agile, QA is expected to be a very proactive part of development. They no longer just certify the functionality of the application based on a contract. They have to be part of the day to day development. They ensure quality at all levels and act as a communication hub between the business, management and developers.
One of the main challenges for a QA team is that the necessary skills required to perform their job effectively becomes exponentially increased. They need to understand the code, write their own automated suite cases, perform exploratory testing and suggest new ideas.
The frontiers of QA, in Agile, are a blur, because they share the same objective as developers and managers- to create the best application for the customer. They don’t care about contract documents. And an important source of misunderstanding for new QA Agile teams transitioning from waterfall, is to find that there aren’t any specifications or guides to tell them how to certify a specific functionality.
When talking about QA in Agile, one of the most common arguments I have heard is that QA is not ready to perform all the activities they are supposed to be performing in agile successfully. While for some people this may seem an issue or a threat, I see it as an opportunity for change.

As team adopt Agile methodology and QA become part of agile development process, QA will not be considered as separate part of software development team.

Testing in Waterfall and Agile

In old system, Tester is testing implementation by developer according to test cases he created however he is not sure that test meets the customer requirement or not, Tester needs approval from customer whether or not assumption made by him are adequate or correct. Feedback as to success or failure of a requirement, implementation is delayed.



In Agile methodology, the developer, has run through the acceptance tests that Customer, Developer and Tester created prior to Development team starting implementation. Tester quickly runs through the same acceptance tests and then starts doing more testing to get a feeling for how the implementation fits into the entire workflow. At the review the next morning, Customer agrees that the story is complete.



In Agile testing method developer and tester work as a pair to understand and implement what Customer(product owner, business analysts, and subject matter experts) needs.
The development focus is to create an implementation that does what it is supposed to do.
The testing focus is to check that the implementation does precisely that and does not do what it should not.
Customer tests encompass the business facing functional tests that ensure the product is acceptable to the customer

The three basic units in a software project are
the customer unit,
the developer unit, and
the testing unit.

The customer unit (which may include product owner, business analysts, and subject matter experts) determines the requirements, creates acceptance tests, and sets priorities.

The developer unit implements the requirements and ensures the implementation meets the acceptance tests.

The testing unit checks that an implementation does what it is supposed to do and does not do what it is not supposed to do. The testers help the customer unit develop acceptance tests, and the developer unit passes those tests. The triad works together to produce quality software.

Role of QA in Agile Development

In Agile development Developer runs unit test. If other developers merge their code to built integration platform. Developers run component test to see that when integrated, other developer code do not affect outcome of his code. Also developer need to run acceptance test to verify that his code meet the acceptance requirement.

Agile QA need to know developers and interact with the team in professional way. Also work closely with customer to define acceptance test for each story.
The Agile QA completes the requirement gathering in the form of test cases and once there is enough to be tested, verify these features meet the requirement specified.
Agile QA have to run all the tests, verify that built meets acceptance criteria, but often unit test are not run by tester and tester focus more on Exploratory testing, Usability testing and Property testing of the built.

Once the customer is satisfied with outcome of all test run, the built is deployed to the production platform. There is possibility that user may do unexpected behavior which may uncover the bug not face by Tester. Hence Tester in Agile has responsibility of overall experience of user and should conduct Positive as well as negative tests to uncover bugs. As a QA in Agile should also focus on unexpected, unspecified, functional and non functional test. Perform all the possible scenarios and not just specified test case scope derived from Requirements.

Agile QA provides early feedback to the team. Feedback involves using current output to influence future output. Quick feedback means less delay.

Types of tests



Customer tests encompass the business facing functional tests that ensure the product is acceptable to the customer. The result of almost every acceptance test can be expressed in yes or no terms. Examples Should password field have minimum 6 characters? or In case of Forgot password, Should app ask security question?

Property test include nonfunctional requirements such as scalability, reliability, security, and performance.

Usability tests are conducted whether users feel comfortable with the application considering different parameters : the flow, navigation and layout, speed and content. You might create some factual tests, such as, “Given a certain level of user, can he pay for an order in less than 30 seconds?” or, “Given 100 users ranking the system usability on a scale from 1 to 10, is the average greater than 8?” But often, usability is more subjective: “Does this screen feel right to me?” or, “Does this workflow match the way I do things?” Usability testing is strictly manual.

Exploratory tests are tests whose flow is not described in advance [Petti- chord01]. An exploratory tester does parallel test design, execution, result interpretation, and learning. Exploratory testing may disclose defects undiscovered by other forms of testing [Whittaker01], [Bach01]. The term has also been applied to a situation in which all team members take on the persona of a user and go through the system based on the needs and abilities of that user. Because a system has to be working to be explored, these tests cannot be created up front. But they can be performed whenever the program is in a working condition.

Unit tests are created by developers in conjunction with writing code. They aid in creating a design that is testable, a measure of high technical quality. Unit tests also serve as documentation for the way the internal code works.

Component tests verify that units and combinations of units work together to perform the desired operations. As we will see later, many of the unit and component tests are derived from the acceptance tests [Wiki03].

All types of testing are important to ensure delivery of a quality product that involves collaboration between the business customer, the developer, and the tester.

Challenges in Agile Testing

Less or No Documentation : In agile we do have less documentation. Working less documentation Requirement Specification are replaced with a Product Backlog, Functional Specification are replaced with User Stories and all other documentation is created as and when it's needed. As for planning your tests, you'll be involved in the requirement analysis process where you can include your test conditions that form part of the User Story.

Moving from manual to automation : As in agile regression testing is done in every iteration. Manually repeating all the regression test in every iteration is costly and time consuming. Manual tester need to learn automation and keep regression scripts up to date.

Need to become Technical : Agile QA need to become more technical aware and learn basics about programming languages. Agile QA can help team to fix minor defect eg : typos

Pros of Agile QA

Agile QA knows performance of application sooner and hence can pay more attention on risk areas
Agile QA have time for Detail management and planning
Requirements and designs in Agile are not assumed due to constant interaction and planning with customer

Cons of Agile testing

Time span of the iteration is less and tester need to perform all types of test, continuous integration test including regression test for previous iteration code this increase workload can lead to burnout.
Testing happen on fly hence agile tester do not get time to document every move thus less documentation or no documentation may result in ambiguity.



References :
Lean-Agile Acceptance Test-Driven Development - by Ken Pugh
Agile Testing Myths -by Ray Claridge
Waterfall vs. Agile: QA and Management - Alberto Gutierrez