Fundamentals of Testing Flashcards
Other than human error, what makes testing necessary?
There might be other factors that impact the project.
Things that make it so that you cant plan everything or consider everything through.
- Deadlines
- Complexity
- Dependencies
What are the main purpose of testing?
To identify as many defects as possible. Tests should be designed to find as many defects as possible.
Testing can contribute to both avoidance of errors and rectification of them, this is also called a proactive- and reactive approach.
What is the main difference of these two approaches?
Proactive is when the error is found before the program is ran. This could be by finding specification errors, logical errors or clarifying misunderstandings.
Reactive is when you find an error by running a test on the program, and you then seek to fix the error (debug), .
In short, proactive is before the error happens and reactive is after the error have happened and been found.
It is not possible to test for everything therefore we need to prioritize. How do we prioritize which tests to do first?
We identify the most critical and essential pieces of functionality. Then we rank them.
Why is it important to prioritize which tests to write and run first?
To make sure that the most important tests have been done, and the done tests are more important than those to be done.
Who identifies the most important functionality?
That is decided by the users or sponsors of the system.
Can testing prove that a system is error free?
No, it can prove the existence of the errors found, not that there are not other errors?
What is Exhaustive Testing?
Is when all possible data combinations are used and tested.
Unless the application has an extremely simple logical structure and limited input, it is not possible to test all possible combination.
For this reason, risk and priorities are used to concentrate on the most important aspects to test.
What is the Pareto Rule?
That 20 % of the code will contain 80 % of the errors.
- This is because most of the complexity of a system most likely revolves around specific functionality.
Is it a good idea to apply the same testing approach to every or most projects?
No, all testing is context dependent and risk is a key aspect.
Why is risk important in testing?
To prioritize tests, and assess how much test coverage is needed and where. This ties in with the fact that exhaustive testing is usually not possible.
When designing a system, when should testing begin?
As early as possible to identify as many errors as possible, as it is cheaper to find and correct in the specification and requirement identification phase than in production.
What is the difference between testing and debugging?
Testing attempts to identify faults and errors where debugging attempts identify the cause of the error and how to correct them.
Testing will then test if the debugging have inadvertently affected other parts of the program, where debugging does not check for that.
Would the tester also do debugging?
No, usually a company will have a team of testers, doing tests (systematically explore a component to find and report defects). and then pass the findings to the developer who will do the debugging. The tester would then test the component or system again after.
What is static testing?
Tests where the code is not executed. Like reviews or other kinds of code walkthrough. The IntelliJ IDE also does static tests for you (When it tells you there is errors while you code)