-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional unit test capabilities #192
Conversation
Example output of
Example output of
Example output of
or
To be documented on the wiki. |
LGTM. Food for thought: why not use Unrelated to this PR, but still triggered by it: WriteTextFile swallows exceptions without proper messages to the user (only stack traces). This could be improved by just using try (BufferedWriter bw = Files.newBufferedWriter(path);
PrintWriter writer = new PrintWriter(bw)) {
} catch (FileNotFoundException ex) {
// ...
} catch (IOException ex) {
// ...
} |
This PR adds the following functions and features to the unit test framework:
writeSourceCsv(directory, separator)
to generate CSV source data filesgetTestsOverview()
to create list with all tests. closes Testing Framework- List of test cases #124summaryTestFramework()
to get a summary of the test framework, including the % of mapped source/target fields that have a mapping. closes Add ability to track ETL unit test coverage #180getUntestedSourceFields()
,getUntestedTargetFields()
return the source/target fields that are not tested yet.outputTestResultsSummary(connection, schema)
Function to output a summary of the test results, withNote: one change to the insert sql was made to allow proper csv source files output. Variables set to NULL were ignored previously when generating the insert sql. With this change a NULL value will be explicitly inserted. This should not change the behaviour of the insert.
https://github.com/OHDSI/WhiteRabbit/pull/192/files#diff-02f1595ce6665edb5f8d77d478bc3853R265-R266