The OpenClassrooms Quiz
Let's now take an real-life example of a feature that you probably know - the quiz on OpenClassrooms!
The art of writing user stories
Writing user stories is not an exact science. Two people may write the user stories for a feature very differently, without either being 'wrong'.
Rather, it is an art. And the art of writing effective user stories is one that develops with practice. There really is no substitute for practice.
Even right now, with what you have learned in the last couple of lessons, you could get a blank piece of paper and try to write down the user stories for:
The Facebook Like feature.
Making a bid on a listing on eBay.
A feature of your favorite product.
Even if you struggle, trying to write user stories will make this whole skill come to life. There is no shortcut for practice in this skill. If you wanted to stop reading now, and spend 30 minutes trying to write down the user stories for any feature in any product - you will learn more than you ever will from reading.
Hacking user stories
If my product needs a new search feature to be built, I will look at other respected sites that have a search functionality and write down the user stories for it.
This might sound a bit crazy, but I'm not necessarily going to build the same user stories and product as my competitor. I just want to understand the logic they used to create that product. And then I'll at least be aware of some of the logic, flow and decisions that they made.
Next time you have a specification to write, ask yourself who has done this well. Use their product. Write the user stories out as you do so. It will improve your art!
The OpenClassrooms Quiz: creating a full set of user stories
In the following sections, I will run through the exercise of creating the user stories for the OpenClassrooms quiz.
I will adopt the following process to generate the user stories:
Write down the very high-level logic of a quiz.
Write down a brief description of how users will interact with the quiz chronologically.
Bullet point the main interactions chronologically.
Translate those bullets into user stories.
Here are some general rules/logic of quizzes:
A teacher will create a quiz.
A student will take a quiz.
A quiz can have any number of questions (e.g. 3, 5, or 10).
Questions can have a single correct answer (single choice) or many correct answers (multi-choice)
When students submit their answers, they see a results page showing the correct answers and explanations, as well as their score.
A 70% score is required to pass a quiz.
If a student fails, they can take the quiz again 24 hours later.
If they fail the quiz twice, they cannot take the quiz again.
The teacher can work on the quiz and, when ready, decide to publish the quiz.
Let us now think about our two user roles (teacher who creates the quiz and student who attempts the quiz). The main interactions chronologically would be:
First, the teacher creates a quiz.
Then, the teacher adds questions and other details.
Afterwards, the teacher publishes the quiz.
Next, the student who has registered for this course can see the quiz and begin the quiz.
When the student submits the quiz, she will see results.
Based on whether the student has passed/failed, we implement certain logic such as showing successful pass/fail messages, letting the student repeat the quiz, etc.
This is similar to step 2 above, but in more detail.
In order to create a quiz, the teacher will:
Click on "create new quiz", which will open the "Create Quiz" page.
Add a question (the question, the possible answers, the correct answers, and the explanation).
Save the quiz and come back later to continue working on it (if necessary).
Publish it when it is ready.
As a student, I will do the following in order:
Click on a quiz.
Arrive on the quiz page.
Enter my answers and submit the quiz.
See a results page.
And then I think about the results and the impact of pass/fail:
If a student has a score of at least 70% then they pass the quiz.
Next, they see a results page instead of a quiz page.
If the student fails the quiz, then they can retake this quiz 24 hours later.
If a quiz has been failed twice, then they can no longer attempt the quiz. They also cannot get a certificate of completion.
Now lets create the user stories for the OpenClassroom quiz. Remember user stories should be written in the following format:
Create quiz (teacher)
As a teacher, I want to create a quiz page so that I can add questions and save them without publishing.
As a teacher, I want to specify the question, possible answers, correct answers and explanation
As a teacher, I want to see an error message if a question does not have correct answers selected so that I can easily see if I've forgotten to specify them.
As a teacher I want to choose between questions that have a single correct answer and multiple correct answers in order to test my students' knowledge when there is more than one correct answer.
As a teacher, I want to publish the quiz only once it is fully created so that it only appears to students when it is ready.
Attempt quiz (student)
As a student, I want to open the quiz page when I click on a quiz in a course that I have registered for so that I can see the questions I have to answer.
As a student, I want to be able to choose answers and submit the quiz so that I can test my understanding.
As a student, I want to be able to see my results after I submit so that I can verify whether my knowledge was good enough to pass.
As a student, I want to be able to see explanations for all questions, including an indication of ideal answers beside every question so that I can learn from the questions I got wrong.
As a student who has passed the test, I want to see my results if I revisit the quiz page later in order to check my score and to avoid attempting a quiz that I have already passed.
As a student who has failed the test, I want to be able to retake this quiz 24 hours later.
As a student who has failed the test twice, I should be prevented from taking the quiz more than twice so that I'm required to really pay attention to the course and the quiz (rather than submitting many times without thinking).
As a student who passes all tests and activities, I should get a course certificate so that my achievements are recognized.
As a student who fails the course twice, I should not get a course certificate because I haven't demonstrated sufficient knowledge of the material.
We have just created 15 user stories for the OpenClassrooms Quiz!
For this lesson, all I want is that you could follow the process and understand what I have done. To be able to do a similar job yourself, you need to practice! Feel free to hack your favorite product's user stories right now!