FizzBuzz Acceptance Criteria for BAs?

FizzBuzz has been discussed across the internet for years as a way of screening out candidates for programming roles, as seen here https://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/ and on the codinghorror blog, I’d recommend both posts (and a scan of the comments). Testers are also getting in on the action. On a recent project, with several Business Analysts assigned, I noticed a huge variety in the quality of their work, and wondered – what would be the equivalent to FizzBuzz for BAs look like? What about writing FizzBuzz acceptance criteria?

The Problem

The FizzBuzz program can be described in the following way (or see here)

Print numbers 1 to 100
If number is divisible by 3 then replace number with Fizz
If number is divisible by 5 then replace number with Buzz
If number is divisible by 3 & 5 then replace number with FizzBuzz

main method ready for code

The User Story might look like this

AS an employee tasked with technical screening
I WANT to set a simple programming task
SO THAT my time is saved as unsuitable candidates are screened out of the process

FizzBuzz sample output


If I was a reviewer I might look for the following

  • A program that compiles / runs
  • A readable program
  • A program that produces the correct output
  • A program that uses programming logic to produce that output (to ensure the program output is not hard coded!)

Acceptance Criteria

My first draft of the Acceptance Criteria might look like this

AC1: ensure the output is readable

GIVEN THAT the program has run
WHEN I review the output
THEN the format makes reviewing easy

AC2: check the output conditions

GIVEN THAT the program has run
WHEN I review the output
THEN the following are true

  • 100 outputs
  • First output is 1
  • Last output is 100
  • No numbers divisible by 3 ( 3,6, 9 etc)
  • No numbers divisible by 5 ( 5, 10, 15 etc)
  • Where 3, 6, 9, 12, 18, … is in the sequence the word fizz appears
  • Where 5, 10, 20, 25, … is in the sequence the word buzz appears
  • 15, 30, 45, 60, 75, 90 do not appear and are replaced by fizzbuzz

AC3: review the code, subjective – review with stakeholder

GIVEN THAT that the program can run
I WANT to review the code
THEN I can the code is readable and formatted

AC4: check that the program has logic and does not just list the answer values

GIVEN THAT that the program can run
I WANT to check the code
THEN I can see the use of a loop and the modulo (%) operator

What do you use for screening BAs? What do you think about FizzBuzz acceptance criteria?

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *