TrialGrid can test Derivations in a similar manner to testing Edit Checks. A Test Case for a Derivation will have steps to enter data into the fields included in the Derivation Steps and then a step to check that the Derivation has calculated the correct result.
The Test Case Advisor does not yet include support for Derivations. Test Cases for Derivations must be created manually.
This example tests a Derivation called “AVG_HRT”
1 2 3 4 5 6 7 8 9 10 11 12 13 14
@Derivation:AVG_HRT Feature: Test Average Heart Rate Derivation Background: Given I am logged in with role "Investigator" And a subject exists Scenario:Derivation result When I enter data: | DataPoint | Value | | V1.VS.HRT | 78 | | V1.VS.HRT | 80 | | V1.VS.HRT | 82 | Then I should see field "V1.VS.AVG_HRT" has value "80"
In the above example the ‘I enter data’ step will only submit data for the specific fields. All others will be ‘untouched’ in Rave. Sometimes Derivations are triggered from an invisible Field which would not be submitted when using an ‘I enter data’ step and so the Derivation would not be run. In this case the ‘I enter and save data’ step should be used.