Klausurfragen Flashcards
Explain the static examination type “Review”
Review is process or meeting (+1) during which a work product or set of work products is presented (0.5) to project personnel, managers, users, customers or other interested parties (+1) for comment or approval
Control flow based coverage
● Statement coverage
● Branch coverage
● Decision coverage
● Path coverage
Connection: Error
● Somebody makes a mistake.
● As a consequence the software contains a defect or fault
● When executing the program containing a defect an error may occur.
● An error may cause the failure of the whole system
Kinds of Error
● Functional Errors
● Configuration Errors
● Interface Errors
● Documentation Errors
Kinds of metric
● Product metric
● Process metric
● Project metric
General Model Theory - Propertys
- Mapping property
- Reduction property
- Pragmatic property
Definiton: Metric
A metric is the objective attribution of a number (or symbol) to an entity to characterize a specific attribute.
Sorting the scales
● Nominal Scale
Pure classification of values
● Ordinal Scale
Values are totally ordered
● Interval Scale
Captures information about the size of the intervals that separate the classification
● Rational Scale
Values are totally ordered and additive
● Absolut Scale
Values are absolute entities
Kinds of Static Examnination of Software
● Measuring
● Conformance Check
● Review
● Inspection
Metic: Granularity
● Base metric (simple, direct metric)
- Easy to measure, but hard to interpret
● Derived metric (pseudo, indirect metric)
- There is no direct metric or measurement is very
Classification: Measurement Procedure metric
● Objective (precise) metric
- Measurement is done according to an exact procedure
● Subjective (estimated) metric
- The value is estimated, because it cannot be calculated.
● Calculated metric
- Values are determined based on a formula
Classification: Purpose metric
● Prescriptive metric
- Characterizes the expected state
● Descriptive metric
- Characterizes the actual state
● Prognostic metric
- Creates a forecast, which can be
determined only later
● Diagnostic metric
- Characterizes the actual state.
● cyclomatic number
Classification: Source of a Metric
● Model-based metric
- Combines directly measurable or estimated attributes according to a given formula
● Empirical metric
- Based on observations in the real world, without an underlying model.
Classification: Manipulation Metric
● Robust metric
- Returns results that can not be manipulated if the metric is known
● Undermineable metric
- Returns authentic results only if the application of
the metric is not known
Quality Properties of Metrics = Metric for Readability
● Plausibility
● Relevance
● Profitability
● Comparability & Precision
● Availability
Goal-Question-Metric (GQM) - Advantages:
● Only relevant attributes are measured
● Interpretations are defined in the context of the respective goals
When is Mean Time Between Failure useful?
● errors are not corrected
● the kind and intensity of the usage remain the same
● the users do not provoke nor avoid the errors
Quality Model
● The quality model is the cornerstone of a product or process quality evaluation system.
● Defines, which qualities are important and which are not important
● often forming a tree or graph
State machine
● A behavior model, consisting of a finite number of states
Definition: State
Condition or situation in the life of a system during which it:
● satisfies some condition
● performs some activity, or
● waits for some events
Events
Specification of a significant stimulus that has a location in time and space and can trigger a state transition:
● Signal event
● Call event
● Change Event
● Time event
Transition
Relationship between two states
● where the source state will enter the target state
Interaction Rule
Most failures are induced by single parameter faults or by interaction of two parameters, with progressively fewer failures induced by interactions between three or more parameters
Combinatorial Testing
A black-box test selection technique in which test cases are generated to execute specific combinations of values of several input parameters
Conflict Handling Strategies
A conflict is an irrelevant interaction of two or more parameter values.
Conflict handling strategies to exclude irrelevant interactions: ● Abstract Parameter ● Sub-Models ● Replacement ● Avoidance
Test First Development
- Write a test for a new feature
- Run all tests and see the new one fails
- Write code for the new feature
- Run the tests
- Refactor code
TDD = Test First Development + Refactoring
Test First Development - TDD Benefits
● Instant feedback
● Better development practices
● Improve quality assurance
Test First Development - TDD Limitation
● Hard to apply
● TDD needs an upfront design
● Difficult to write test cases for hard-to-test code
Path coverage in the activity graph
● Define (at least) one test case for each path through the activity graph
Benefits Use Case
● Use cases are considered to systematically design test cases
● Formalization (transformation to a state/ activity diagram) discovers missing information and errors early
● Drawbacks of natural language specifications are weakened
Test Driven Development
Test driven development (TDD) is an software development approach in which a test is written before writing the code. Once the new code passes the test, it is refactored to an acceptable standard.
Refactoring (TDD)
Refactoring consists of improving the internal structure of an existing program’s source code, while preserving its external behavior.
Diffetent types of steps provided by Gherkin
● Given: describe the initial context of the system
● When: describe an event or an action
● Then: describe an expected outcome or result
Explain why “Exhaustive Testing” is only feasible in rare cases?
● argumentation of too many test cases
● for example/in-depth argument for too many test cases
Explain the concept of “Test Case Selection Criteria” - TCSC
A TCSC defines for a given program P implementing its specifications a set of conditions which the set of test cases has to meet
Practical criterion of Path Coverage
● limiting the number of traversals of loops
● avoids the path explosion caused by loops
Test case design of Boundary Interior Coverage
● No loop execution
● One loop execution (boundary)
● At least two loop execution (interior)
Control flow base: Coverage
● Statement Coverage
- weak criterion but not easy to achieve
● Branch coverage
- minimal criterion in unit testing - inadequate for compound decisions
● Decision coverage
- expensive but intensive
● Path coverage
- more a theoretical option
Variants of Condition Coverage
● Basic Condition Coverage
● Branch and Condition Coverage
● Modified Condition Decision Coverage
● Compound Condition Coverage
Practical criterion of Path Coverage
● limiting the number of traversals of loops
● avoids the path explosion caused by loops
Examples for “linguistic effects”
● incomplete specified verbs, incomplete comparisons or nominalizations
● requirements that are of lesser value
NLP Classes
● Deletion
● Generalization
● Distortion