We have a Computer Science project consisting of a baby alarm (a sender and a receiver) so when the baby is crying or a loud sound is perceived, an alert is sent to the parent.

I'm interested in how someone would test the sender, meaning how would you test the detection of a crying baby/loud sound. We have the algorithm to detect the sounds, but we need some help to know how would we have to think in terms of test cases.

This is what we have thought of for now regarding test scenarios:

Different types and lengths of baby cries
Maximum distance for baby to be in regards to the tool
Response time
Temperature range
Interference with other devices
Different positions/angles
False positive rates and false negative rates
Low battery

Thank you.


This kind of depends on what the structure of your project actually is. So far your tests all seem concerned with the operation of the system as a whole, i.e. You appear to be doing only black box testing.

If you want to test the units independently then you know need to open up the system and look inside it (white box testing). In this case you have stated that there is a sender and a receiver, but you haven't elaborated on how they communicate. If you wish to test either unit in isolation then you need to replace the other unit with something else. In software testing this is commonly a mock object that responds as the real component unit under a limited set of circumstances(although different mocks can be used in different tests so that we fully test all the functionality). In hardware you might want to use a reference device, one that is known to behave correctly in those circumstances, or you may simply wish to use a test rig which performs a similar role.

Also you can further break down your system into its components and test those. So for example, you might want to test how far the unit could be away from the child, so you test the microphone and trigger that detects sound as a unit without the components that send the signal to the receiver. Later you might want to test the range that the two units can be apart, so you could fake inputs from the alarm trigger and simply test the send and receive components.

Now since this question was asked in SQA, I assume (since this isn't Electrical Engineering) that you are really building a prototype out of two PCs linked over a network, and a lot of the hardware discussion above might not seem relevant. The point is that you want to approach this on multiple levels. Consider the system as a whole, and consider it broken down. Look for points you can separate and test the components that come out of that structure.

  • AlSki, thank you very much for your detailed answer, it helps me a lot to organize things a little bit. My purpose on this project is to act as the tester for the sender and cover all possible scenarios, either white box or black box. For now, as you said, I imagined only the scenarios I could think of from the black box point of view. We just began an introductory course on testing and the teacher wants to see how our testing skills and thinking evolves in time, after participating at the course. Therefore I am just beginning to learn on how to think things through and cover all sides. – Larisa G Feb 19 '14 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.