Lecture 6 - Classifying the Most Common Types of Testing -> Quick Intro -> By Knowledge Of The Internals Of The Software -> By The Object Of Testing -> By Time Of Test Execution -> By Positivism Of Test Scenarios -> By Degree Of Isolation Of Tested Components
– Positive testing
– Negative testing
Negative testing checks situations that involve
– User error and/or
– System failure
Positive testing checks situation where
– The software is used in a normal, error-free way and/or
– The system is assumed to be sound
Below are some important points:
1. As a rule, negative testing finds more bugs. There are two main reasons for this:
a. Errors and failures can take many shapes and forms, so the PM and the programmer might not predict some of them, and thus the code will not be ready to handle certain abnormal situations. Leo Tolstoy put it this way: “Happy families are all alike; every unhappy family is unhappy in its own way” – i.e., abnormalities have a great diversity.
b. When writing and developing features, it is natural to concentrate on the normal usage and normal functioning of the software because that’s how we provide value to our users. In other words, users don’t come to ShareLane to see error messages; they come to buy books: books can be bought only if
– the user executes an error-free scenario and
– our system is working normally.
2. Negative testing involves more creativity and puzzle-solving than positive testing. This happens for the same reason as above: errors and failures can take many shapes and forms.
3. Both negative and positive tests must be performed as a part of functional testing, but the rule is that we must execute positive tests first. Why? If functionality doesn’t work during normal usage, it doesn’t really make sense to check if it works with abnormal usage. It’s like checking to see if a corpse has chicken pox.
4. Error handling is:
a. How the system responds to errors made by users; e.g., how the system responds if a Web form is submitted with invalid data in a required field.
b. How the system reacts to errors that happen when the software is running. For example, this error message: Test Portal>More Stuff>Python Errors>register_with_error.py provides info that the file register_with_error.py calls the undefined function get_firstpage().
5. Error message is a message that provides information about error(s).
An error message is an important measure that:
– Guides users in case of mistakes. An error message is usually delivered via a Web page by a code that is specifically written for handling user errors.
– Gives debugging info to developers. An error message is usually provided by an interpreter (or a compiler), or by some logging mechanism: e.g., the Apache Web server records errors in a special error log. Next ->