Closed jhlee-mitre closed 2 years ago
The approach looks solid, but some brief changes requested. Also, you should create rspec unit tests for minimumId. You should create an
assertions
subfolder within the spec directory, and then something like aminimum_id_spec.rb
file to test this behavior.
Yes, I will add rspec.
The approach looks solid, but some brief changes requested. Also, you should create rspec unit tests for minimumId. You should create an
assertions
subfolder within the spec directory, and then something like aminimum_id_spec.rb
file to test this behavior.
Does this minimum_id rspec part need to be separate from assertions_spec.rb?
The approach looks solid, but some brief changes requested. Also, you should create rspec unit tests for minimumId. You should create an
assertions
subfolder within the spec directory, and then something like aminimum_id_spec.rb
file to test this behavior.Does this minimum_id rspec part need to be separate from assertions_spec.rb?
Not necessarily - but I think, organizationally, it'll be much easier to keep track of our unit tests if we have an assertions subdirectory and then a file within that for each type of assertion.
Got it. I will create a separate one. Thanks!
Incorporated all suggestions.
Summary
Add handling minimum_id in Assert
New behavior
If a TestScript contains a minimumId in Assert, the engine examines if the response contains at a minimum fixture specified by minimumId. The definition of "minimum" is
Code changes
Added a Hash function: deep_merge() in assertion.rb. This is a function merging two hashes into one recursively. The essential logic of judging whether a minimum fixture included in response or not is:
Testing guidance
Use general_testscript.json