Question

I'm writing a chat client (msn messenger style) and I've got some problems in writing the acceptance tests for the send/receive feature.

Think for instance to the user story "A user can send a message to another user".

1- Should I test if the client sw correctly interacts with the server? In this case how should I represent this interaction?

2- Should I test if the second client actually receives the message? In this case I should rely on the server to prove that my software is working fine. Is this kind of assumption correct in an acceptance test?

I would like to write my tests with concordion or fitness but every help is really appreciated.

Thank you

Was it helpful?

Solution

When you're writing an acceptance test, that should be written at the highest level, as if the user was using the software. It is typically a blackbox test. In your user story, "A user can send a message to another user", you would startup 2 clients and the chat server, send the message from one client and ensures the other received it. The story says nothing about how the server should handle it, it's just saying that a user can send a message to another user.

You do want to test the individual parts as well though, i.e. does the client correctly interact with the server. These are more integration and functional tests (and you should also have unit tests to test individual components in isolation).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top