Tentaplugg Flashcards
Define the term test-case and give three of the elements a good test-case must contain
Test Case: test case has an identity and is associated with a program behavior. A test case also has a set of inputs and a list of expected outputs.
What is the definition of software testing?
A process of analyzing a software item to detect the differences between existing and required conditions (that is defects/errors/bugs) and to evaluate the features of the software item.
Where is an error made in software testing?
An error is made by people. When people create errors while coding, we say that they introduce bugs in the system.
What is a fault in software testing?
A fault is the result of an error. Could also be called a bug. It is more precise to say that a fault is the representation of an error.
What is fault of commission and fault of omission?
A fault of commission occurs when we enter something into a representation that is incorrect. Faults of omission occur when we fail to enter correct information. Of these two types, faults of omission are more difficult to detect and resolve.
What is a failure in software testing?
A failure occurs when a fault executes.
What is an incident in software testing?
An incident is the symptom associated with a failure that alerts the user to the occurrence of a failure.
What is a test in software testing?
A test is the act of exercising software with test cases. A test has two distinct goals: to find failures or to demonstrate correct execution.
Define functional-based and structural-based testing. Give an example of a testing technique for each of them. What types of faults are these techniques useful at detecting?
Functional – based on requirement specification, best at finding omission errors, eg:
equivalence class testing
Structural – based on the implementation of the program, best at finding commission
errors, eg: path coverage
State transition testing:
Order the following test coverage criteria for state transition testing from weakest to strongest: event coverage, path coverage, transition coverage, state coverage.
Are all of them always applicable?
Event and state < transition < path
Path is not applicable when there are loops
What type of systems is state transition testing best suited for?
Systems that need to remember previous states
What is the forumula for calculating cyclomatic complexiy?
E - N + 2*P
E - Edges, N - Nodes, P - Partitions
What are the limitations of testing?
- Testing cannot prove correctness
- Testing can demonstrate the presence of failures
- Testing cannot prove the absence of failures
Explain the principles of mutation testing.
Mutation testing introduces changes in the code to see if the test suite will detect the mutants and tests the quality of the test suite
A good model must be precise and concise. Explain what this means in practice.
i. Precise means it accurately represents the system
ii. Concise means it only covers the aspects relevant to the testing goal
Give two possible inconveniences of model-based test-case generation over manual test-case generation.
i. Requires a different skillset from the testers
ii. Some systems may be too complex to be represented by a model
Describe two of the steps involved in model-based testing
- Model the SUT and/or its environment
- Use an existing model or create one for testing
- Generate abstract tests from the model
- Concretize the abstract tests to make them executable
- Execute the tests on the SUT and assign verdicts
- Analyze the test results.
Give one advantage and one disadvantage of scripted testing compared to exploratory testing.
i. Scripted testing is easy to reproduce
ii. Scripted testing does not allow to change the test process to explore further an interesting fault found
Give an advantage of MM-path testing over top-down and bottom-up approaches for integration.
No need for stubs and drivers.
What are two other kinds of system-level testing apart from functional testing?
Acceptance testing and performance testing
Name three kinds of system-level testing.
Acceptance testing, performance testing and funtional testing.
Give two examples of coverage criteria that can be used in a project. For each of them state one limitation.
i. Line coverage – is a very weak coverage criteria that will not say much about the quality of the code.
ii. Condition coverage – can result in a very large set of test-cases
What is statement coverage good at detecting?
i. Dead code
ii. Unused statements
iii. Unused Branches
What is decision coverage?
You make sure that all possible decisions (if-statements) are executed as both true and false.
What is conditional coverage?
You make sure that all possible conditions (x > 3, b == 0) are executed as both true and false.