Saturday, 14 August 2010

Lessons and Tips

After some years of Agile QA experience and having discussed the challenges faced with many fellow QAs, I felt the need to write down my thoughts on the subject.

Agile has grown in popularity because it addresses many of the issues found with the traditional Waterfall approach such as; long delivery timescales, requirement changes, delivery not matching requirements, documentation overload etc. Fundamentally Agile provides an iterative approach that relies heavily on collaboration and frequent feedback.

In my view the Agile QA Engineer has three responsibilities:
  1. Helps to define the Quality, in other words collaborate with stakeholders to establish the Acceptance Criteria (AC).
  2. Measure the Quality, in other words test the AC, and because in the Agile world this needs to be done frequently it must be automated where possible.
  3. Report on the Quality, in other words reporting (providing evidence) on the tests that have been run and whether they have passed or failed.
The value of good ACs cannot be underrated. Basically the developed application is an extension of the Acceptance Tests, tests which in turn are an expression of the ACs that can demonstrate they have been met.

An Agile QA Engineer responsibilities extend beyond the limits of testing a Story to highlight measures to inject quality into the project as a whole, such as:
  • Ensuring there are project wide ACs in areas such as; code coverage, regression, performance, end-to-end journeys etc
  • Measuring and reporting against the project wide ACs
  • Ensuring that the Sprint Life cycle and the CI process lends itself to meeting the QA responsibilities

Agile is practised widely but rarely well, here are some of the common challenges faced:
  • AC are too high-level when development work starts .. 'It does what it is says on the tin' is not enough, and these days it say a lot on a typical tin (of beans for example).
  • Limited opportunities for the Devs and QAs to review the Story prior to starting the Sprint
  • QA has little knowledge of the app beyond the Stories
  • Unwieldly and un-read test plans and test results
  • QA deliverables are not given a high enough priority
  • Changes to ACs are not communicated effectively in the team
  • Insufficient 'buy-in' to the importance of ACs before starting development
  • Product Owner availability and access
  • Discussion about ACs that don't include all vested parties
  • Application testability .. lack of IDs
  • Project (Kan Ban) board doesn't support the (Agile) process
  • Insufficient knowledge or application of Agile principles

The reasons behind these challenges are usually no-ones fault, they are born out of lack of time and resources and teams that are new to the Agile way-of-working.

Here are some lessons I've learned and tips that I hope will help:

General
  • Ensure QA underpins the project, e.g. smoke test run on code checking, automated regression suite, dedicated test environments, bug reports, qa metrics, qa on project board, showcase the tests etc
  • The minimum commitment from the PO should total (full time) commitment
  • Follow a standard template for Stories and Bugs
  • Test that Agile principles and practices are accepted, make then visible to the team
  • Ensure project board drives activity rather than just reporting on it, e.g. it should reflect the lifecycle and should include; priotised spring backlog, ACs defined, development, developer 'show me', prioritised dev with bugs, functional qa, UX qa, done-done.
  • Keep Stand-ups short .. make it KanBan focussed
  • Establish test reporting and metrics early including metrics for: bugs, performance, regression test, historic comparison, unit test coverage
  • For an inexperienced Agile team assign an Agile mentor
  • Corporate-wide business scenarios should be published and centralised e.g common validations
  • Agree the Agile process flow (e.g. board usage, dealing with bugs, prioritisation) up-front and consider documenting this.

Acceptance Criteria Gathering (please see my Blog for an indepth look)
  • ACs should be comprehensive on business functionality, less so on usability, less so on presentation. Usability and Presentation can be influenced by technology limits and developer creativity and so can be specified at a high level in the ACs. ACs should include; scope, assumptions, integration cases, project wide etc.
  • ACs should be presented in a structured manner e.g. BDD style
  • Ensure ACs are documented, visible, and communicated using tools such as Jira. They should include references to designs, wireframes etc Changes to ACs must be documented
  • Pre-plan for the next sprint to drive-out additional ACs
  • When reviewing ACs play around with the application and give yourself time
  • Mandate that there should be no AC discussion without a; PO, Dev and QA present (power of three)
  • Employ techniques for drawing out ACs such as; mind mapping, flow charts, use cases, scenarios matrix, crud etc. Consider an AC Checklist.
  • Ensure an agreed and understood process exists for handling changes to the ACs 
  • Remember to include project wide end-to-end journeys

Collaboration
  • Ensure Devs give an informal 'show me' before handing over the Story for QA
  • QAs should review each other's tests at the end of each Story.
  • Technical Architect and UI/UE/UX to be involved in all planning sessions
  • Acceptance TDD is a great way of ensuring delivery meets tests (which in turn meet ACs), however this approach is not a replacement for thorough ACs

Reporting
  • Follow the Agile principle of 'working software over documaentatin' and follow 'automated tests with reporting and traceability over test plans'.
  • Don't pass/fail stories, just report on the tests which should correspond to the ACs .. don't become the 'quality police' just report against the ACs
  • Don't create soft copies of bug 'post its' for functional intra-sprint bugs, there is limited benefit and it hinders collaboration
  • Assign bug 'post-its' to the story on the Project Board so there is visibility
  • Consider ways of providing AC - test-to-AC and test-to-Story traceability
  • Reporting to take screenshots of the app at various states to demonstrate meeting ACs
  • Communicate the Test Metrics (including the Test Run report) regularly and widely. 
  • Provide a separate set of reports for User defined (end-to-end) tests so that the Users can focus on the key reports

Automation (please see my Blog for an indepth look)
  • Automate all tests where possible (including page layout, non js, cross browser, server outages), and if a test cannot be automated, keep a log of manual tests for ad-hoc execution
  • Set-up a strategy for defining IDs and Classes in the HTML to support
  • Apply Page Object pattern to automated test framework with the tests using DSL
  • Use Data driven tests where possible
  • Set-up test data sources or a mocking strategy early-on
  • Produce an automatically generated user readable report on the Tests. Ideally this should be web based and include a summary.
  • Define acrchitectural strategy up-front eg. CM.error, timeout, ecuruty, back button, nonJS
  • Consider how to test inner app states that are not visible
  • Remember that manual testing generates the most errors in the Sprint so don't neglect this area. Assign a percentage of the overall test time for a story to manual testing, I would recommend around 10%.

Planning
  • Estimate technical QA stories and plan for the start of the sprint.
  • Pre-planning for the next Sprint at the start of the current Sprint to make best use of the down-time
  • Prioritise (triage) bugs and stories frequently and use the Project Board to reflect the priority
  • Be empowered to expediate the fixing of high-priority bugs