| || |
Test cases for common problems
I'm a beginner tester and I'm trying for find a site with listing of the typical test cases for different problems, functions, data structures, etc. I haven't had any luck.
I'm looking for something like: These are the test cases for a Stack, or Queue, Breadth First Search, an LRU cache, etc.
Do you know about any source?
Thank you very much in advance
Hi, Adrian, and welcome.
You're not going to find "typical" test cases because in software testing the most common answer to any general question is "it depends..."
No matter what you're testing, the test cases will vary according to the implementation. Are there limitations on the kind of input data the item in test will accept? Format requirements? Expected output formats? Are there defined error conditions? What about logical error conditions (should an input for age accept a negative number, for instance)?
Typically test cases fall into some broad categories: does it do what it says it should (also known as "steel thread" or "happy path"), does it not do what it says it shouldn't, can I make it do what it says is shouldn't, can I make it not do what it says it should, and does it handle failure gracefully (depending on the implementation this can be anything from requiring a user friendly error message to "it doesn't reboot your system or wipe your hard drive, that should be good enough").
In general, you probably won't be testing low-level constructs because these are typically provided for you by most modern software languages (and they generally unit test their own work - why reinvent the wheel?). You're more likely to be working with the implementations of the low-level constructs for some specific purpose in a piece of software.
I'd suggest you take a look at Joe Strazzere's site, All Things Quality - it's an invaluable resource with a lot of links to other useful and interesting test resources.