Академический Документы
Профессиональный Документы
Культура Документы
How can complete testing be carried out without detailed requirements and plans? How
much test documentation is sufficient?
With regard to the levels and phases of testing, what, in this context, is acceptance testing?
Does it mean attempting to substitute unit tests for acceptance tests or vice versa! And how
can the effectiveness of automated tests be measured? What about non-functional tests; the
evaluation of quality characteristics such as performance, volume, reliability, usability
scalability, memory usage, etc?
In this plethora of uncertainties, there is a further issue that of the role of the professional
tester. This is particularly important in the context of multi-site teams that are increasingly
becoming the norm in large multi-nationals. Indeed, do testers have the right skills or are
they able to add value in this seemingly unstructured environment?
So, is it possible to harness the apparent advantages of agile, with its emphasis on speed,
customer responsiveness and flexible pragmatism, together with the structured discipline of
testing, with its focus on defined plans, sign off levels, and sequential process steps?
Test-driven Development also means that testing takes on a specification role. In the
absence of detailed requirements, test cases define the required behavior of the system. In
other words, a feature is not specified, until its acceptance test has been written, and a
feature is not done until all of the acceptance tests have passed. In addition, reviewing the
test cases directly with the business is vital in order to avoid possible rejections of the
system when the business does get involved.
In this way, unit and acceptance tests become key requirements/features and design
artifacts as is illustrated in Figure 1:
Unit: Drives design-executable design specifications; does the code do what the
developer intended?
Acceptance: Defines completion-executable requirements; does the system do what the
customer requires?
Figure 1: Test-driven Development is based on a cyclical pattern of Code, Unit Tests
and Acceptance Tests
Unit
Testing
Code
Acceptance
Testing
Release to Customer
Test cases by their very nature are specific, can add detail and reduce the ambiguity of
requirements. In a recent assignment, the requirements of a Sogeti client were kept vague
for two key reasons. First, not all of the requirements could be fleshed out initially. Second,
the client did not want to waste time on requirements that they felt would be wrong no
matter how long they spend working on them up-front. The development of the test cases,
involving the users, allowed the requirements to be incrementally clarified. The test cases
provided very clear scenarios, including input data and expected results, which helped the
users to understand the requirements.
Generally, Sogeti has found from practical experience that using TDD has in many cases
been very positive for the production of high quality software in highly iterative and
incremental environments. This is particularly the case when combined with:
Continuous build and integration, where automated unit/component tests are run daily
on integrated builds; and
Coverage measurement as one of the done criteria - to achieve high degrees of
structural coverage of code.
TDD is not without its own issues, relating to educating developers as to what constitutes
good unit tests. We have come across many examples of automated unit tests that simply
check for the existence of code rather than testing what the code does.
Similarly, some developers write unit tests that just focus on checking the main (simple)
positive path known as happy path testing and so results in incomplete testing. But on
balance, TDD is undoubtedly a powerful practice that ensures good testing practice is used.
Our experience shows that the perfect agile tester is someone who has a software development
background, but has transitioned into a testing role and has built up a wealth of experience or a traditional tester with strong development skills. Experience and breadth of skills are
both essential.
Technical know-how is not enough. But with these skills of dedicated testers come real
benefits, as Bret Pettichord3 outlines: a focus on customer usage over technical
implementation and a focus on uncovering flaws over confirming completeness.
Professional testers therefore can adapt to fit this enlarged role and so provide additional value
by not only focusing on finding defects but also playing a team and liaison role with the key
stakeholders throughout each iteration.
Conclusion
Agile leverages best practices for the rapid and efficient delivery of high-quality software,
through frequent iterations, teamwork and an innovative blend of skills. It therefore
requires a particular mindset, one based on adaptability and flexibility, in comparison to
traditional plan-driven approaches.
Testing is therefore adapting the traditional principles of a hierarchical test strategy and
applying them with rigor and discipline, but without the heavy hand of documentation.
And professional testers are rising to this challenge of more closely collaborating with
developers, analysts and other business stakeholders, operating as fully-integrated team
members. In the search for faster software development, this can only be of benefit to
organizations that need to keep one step ahead.
4 Kent Beck, the creator of Extreme Programming and one of the 17 original signatories of the Agile Manifesto in 2001
Contacts: