What should I test (conclusion)

Alright. While I did only receive two replies (😢), I had interesting conversations with people about my question.

The gist is: I did not make it clear enough what I wanted you to focus on.

Here’s the question again:

[…] this event tells the speakers-subsystem to play sound file xyz.mp3. Because that is the correct one for the next stop.

Your task is to write (a) test(s) for the speaker-subsystem. It is critical that the right file is played, because there are lots of people on the bus that have bad vision. If this is your task, please tell me: What do you test for?

Here’s a possible answer I was looking for:

I tell the speaker-subsystem to play sound file xyz.mp3 and I verify that this sound file was played. We assert that no other file was played and that our file was played correctly.

The idea is to think in simple, small steps. The system had one job: Play a given sound file. Our test had one goal: Verify that this happened.

Try not to make it harder than it has to be.

If that does not make sense to you or if there are more questions, let me know.



Similar Posts:

Leave a Reply