Interface DataQualityTestLogger
- All Known Implementing Classes:
SimpleDataQualityTestLogger
public interface DataQualityTestLogger
An interface for logging the results of data quality tests.
-
Method Summary
Modifier and TypeMethodDescriptionvoidfail(@Nullable TableValidationSuite suite, @Nullable String method, @NotNull String exception, long executionTimeMillis) The test failed.voidfinished()All tests are finished.Optional implementation -get all logged failure exception String valuesdefault @Nullable StringOptional implementation - get the first logged failure exception StringintGets the number of test failures.intGets the number of test passes.intGets the number of test skips.voidmessage(@Nullable TableValidationSuite suite, @Nullable String method, @NotNull String message) Record a message.voidpass(@Nullable TableValidationSuite suite, @Nullable String method, long executionTimeMillis) The test passed.voidskip(@Nullable TableValidationSuite suite, @NotNull String method) The test was skipped.
-
Method Details
-
pass
void pass(@Nullable @Nullable TableValidationSuite suite, @Nullable @Nullable String method, long executionTimeMillis) The test passed.- Parameters:
suite- configuration being tested.method- method being tested.executionTimeMillis- time the test took to execute.
-
fail
void fail(@Nullable @Nullable TableValidationSuite suite, @Nullable @Nullable String method, @NotNull @NotNull String exception, long executionTimeMillis) The test failed.- Parameters:
suite- configuration being tested.method- method being tested.exception- exception leading to the failure.executionTimeMillis- time the test took to execute.
-
skip
The test was skipped.- Parameters:
suite- configuration being tested.method- method being tested.
-
message
void message(@Nullable @Nullable TableValidationSuite suite, @Nullable @Nullable String method, @NotNull @NotNull String message) Record a message.- Parameters:
suite- configuration being tested.method- method being tested.message- message to record
-
finished
void finished()All tests are finished. -
getNFailures
int getNFailures()Gets the number of test failures.- Returns:
- number of test failures.
-
getNPasses
int getNPasses()Gets the number of test passes.- Returns:
- number of test passes.
-
getNSkips
int getNSkips()Gets the number of test skips.- Returns:
- number of test skips.
-
getFirstExceptionString
Optional implementation - get the first logged failure exception String- Returns:
- a String representing the first test failure, or null
-
getAllExceptionStrings
Optional implementation -get all logged failure exception String values- Returns:
- a List<String> representing all test failures, or null
-