Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-62735

Add unit test support for expected output in separate files

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • QE 2022-02-07, QE 2022-02-21, QE 2022-03-07, QE 2022-01-24

      Extend the unit testing framework to allow test to compare results with expected results that are stored in separate files:

      • Instead of using ASSERT_EQ test should be allowed to write to ostream, and after completion the output will be compared against the known output from a resource file.
      • In case of difference, test should fail with the diff. Also a temp file with actual out put should be created to allow for investigation or bulk diffing.
      • Add tooling to update the expected output files based on actual result. Should support bulk update if all changes to expected results are desired.

       Depends on https://jira.mongodb.org/browse/SERVER-62736 to be able to allow inclusion of expected output files into the target binary, so that the contents can be used for comparison.

            Assignee:
            anna.wawrzyniak@mongodb.com Anna Wawrzyniak
            Reporter:
            anna.wawrzyniak@mongodb.com Anna Wawrzyniak
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: