inferno-framework / bulk-data-test-kit

Inferno Test Kit for servers implementing the Bulk Data Access Implementation Guide
Apache License 2.0
0 stars 0 forks source link

FI-2407: Optimize Bulk Data Test Kit #6

Closed emichaud998 closed 9 months ago

emichaud998 commented 9 months ago

Summary

Reorganized the bulk data test kit to condense some of the repeated test code to simplify and optimize the bulk data test kit. Rather than having a copy of each test for each type of bulk data export, there now is one copy of each test in which the test groups for each type of bulk data export can reference and pass in different config options to the tests. Note: Needed to pass in the input and output variables for the patient export with different names so that any results stored in those input/output variables from the group export tests does not show incorrect results for the patient export tests that come afterward.

Testing Guidance

Ensure the spec tests run and all pass by running bundle exec rspec, and then run test kit locally and make sure the results are as expected. Also look at the reorganized code and make sure the structure of the test kit is organized and makes sense.

yunwwang commented 9 months ago

This looks good. I think there are more reduction can be achieved. For example, bulk_data_group_export_group_stu2 can be removed and

group from: :bulk_data_group_export_group_stu2

can be changed to

      group from: :bulk_data_group_export_group,
            title: 'Group Export Tests STU2',
            id: :bulk_data_group_export_group_stu2,
            config: {
              options: { require_absolute_urls_in_output: true }
            }

If there's specific reason to keep this group, that would be also fine.

The same for bulk_data_patient_export_group_stu2

These two validation groups in v2: bulk_data_patient_export_validation_stu2 and bulk_data_group_export_validation_stu2, are not used and should be removed.