DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations

We Need to Better Define Acceptance Criteria

One of the problems with traditional specifications is that it often does not clearly delineate exactly when a feature is finished.

David Bernstein user avatar by
David Bernstein
CORE ·
May. 29, 19 · Opinion
Like (2)
Save
Tweet
Share
5.41K Views

Join the DZone community and get the full member experience.

Join For Free

At the finish line

It's easier to cross the finish line when you know where it is.

Photo credit by Air Force Marathon Office

"You are done, finished. Time to move on."

How I long to hear those words when I'm working on a task. Specifications can be squishy, and it can be difficult sometimes to determine if the task is complete or not. Software developers don't want to gold plate. The problem is that we often don't know how our software is going to be used, and we don't want to it fail in the field. As a result, we often try to make our code as robust as we can. In that process, we can end up overbuilding.

But there's a solution to this dilemma. It's really easy. Define upfront what has to happen in order for the task to be completed. In other words, before you start, ask yourself how you will know when you're done? It seems like a reasonable question. Before we embark on any journey or on any task, we should ask that question because when we fail to do so, it's entirely possible that we will miss our mark. One of the problems with traditional specifications is that it often does not clearly delineate exactly when a feature is finished.

But there is a way to do this. We call them acceptance tests, and whether they're done manually or are automated, they essentially serve the same purpose: to tell us when we are finished with the task so that we can move on. Moving on is important. It gives us the opportunity to work on other tasks and even come back to the first task and enhance it later.

Building maintainable, resilient systems requires thinking about the software development process a bit differently than most people do. It requires understanding the nature of change so that we can accommodate it when it happens.

When defining "done" we have to take in several dimensions. In order for a feature to be considered done it not only has to work as expected but it has to be built in such a way that it's straightforward to work within the future. Just getting a feature to work is not good enough, not when that feature has to be maintained through time.

The software we write must be understood not just to the person who wrote it but to other professional developers as well. That means that we have to adopt common standards and practices for building code. If we're working in an object-oriented language then we have to know when to use inheritance and when not to. But unfortunately, the software industry is not as mature as other industries and professions so we're still struggling and reinventing the wheel in many places.

Today, acceptance criteria are central to my way of thinking about features. The very definition of a feature includes its acceptance criteria because that's how all know when I'm done. I often express this using the "given, when, then" syntax. This says that given some initial conditions, when a trigger occurs that invokes the behavior that I want to create, then the system will be changed in specific ways. I can then compare these results to what I expect to determine whether my acceptance criteria have been met or not.

Acceptance tests are just the formalization of our acceptance criteria expressed in the form of a test or an assertion. This can be manual or it can be automated. Again, we are simply asking the question, "How will I know when this feature is finished, what result will it produce?"

When I have clearly defined acceptance criteria for the features that I'm building then I find I waste far less time overbuilding but even more important than that I find that I can move on without worrying or feeling guilty that I haven't done enough because when my acceptance test passes, I know that I have accomplished what I set out to.

Further reading:

Acceptance Criteria in Scrum: Explanation, Examples, and Template

The ABCs of Acceptance Test Design

Software development

Published at DZone with permission of David Bernstein, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Simulating and Troubleshooting BLOCKED Threads in Kotlin [Video]
  • Low-Code Development: The Future of Software Development
  • Accelerating Enterprise Software Delivery Through Automated Release Processes in Scaled Agile Framework (SAFe)
  • Authenticate With OpenID Connect and Apache APISIX

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: