Hi there. Quick question regarding the documentati...
# arrow
p
Hi there. Quick question regarding the documentation. What's the difference between a logical failure (reference) versus a domain error (reference)? Are they synonymous/interchangeable, or is there is a semantic difference between the two? Edit 1: Fixed domain error reference link
k
A domain error is the outcome of a logical failure within the domain. So
UserNotFound
would be the domain error for a logical failure where
getUserById
returns nothing (being the logical failure).
p
So: Logical failure:
getUserById
returns nothing Domain error: To indicate the kind of logical error we have, we return a
Either.left(UserNotFound)
.
Am I understanding it correctly?
k
The logical failure would be the method
getUserById
returning nothing or null where you expected it to return some value. Then this method would (if an either), return an Either.Left representation of the domain error.
a
in the docs we tend to use them interchangeably
u
Classification according to ISTQB • Error: A human action that produces an incorrect result. This might be a programmer writing an incorrect line of code or a user violating some business rule. ◦ Logical Error, Implementation Error, Bug: Incorrect or incomplete data model, incorrect or partially-specified control flow, incorrect algorithm, incorrect configuration or deployment, inconsistent semantics, or similar. ◦ Usage Error: The system is used in violation of its specification/interface contract; i.e., it is fed with invalid input data or confronted with input actions/events that are inadmissible in a given system state. ◦ Domain Error: These are incorrect human or machine actions within the domain of the application. From the perspective of the software system, domain errors are not errors at all, but expected behavior the response to which is part of the specification. The line between usage error and domain error is often blurry, because part of the system design is domain discovery. Therefore, errors initially classified as usage errors might become domain errors in the course of the system’s evolution. • Fault, Defect: An imperfection or deficiency in a work product where it does not meet its requirements or specifications. For software products in particular: The software system is in a state that does not conform to its specification. A fault is internal to the system under consideration; thus, it might not show on the outside or might be transient only. • Failure: An event in which a component or system does not perform a required function within specified limits. A failure is the externally visible consequence of a fault. In summary: An error can trigger a fault, wich might result in a failure.
p
@Ulrich Schuster Could you provide your reference for the definitions?
u
its my summary from definitions of the International Software Testing Quality Board (ISTQB)