Testing Derivations

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.

TrialGrid can suggest Test Cases for Derivations from the Derivation editor sidebar.


there is no 'Test Case Advisor' to generate Test Cases for multiple Derivations at the same time.


TrialGrid will not always be able to suggest appropriate values for Fields in Derivation Test Cases, particularly if the Derivation includes additional Fields which are used to trigger the Derivation calculation in Rave but which do not form part of the Derivation result. If TrialGrid cannot calculate data values then it will create a Test Case which can then be manually edited.

This example tests a Derivation called "AVG_HRT"

 1 @Derivation:AVG_HRT
 2 Feature: Test Average Heart Rate Derivation
 4   Background:
 5     Given I am logged in with role "Investigator"
 6     And a subject exists
 8   Scenario:Derivation result
 9     When I enter data:
10       | DataPoint    | Value |
11       | V1.VS.HRT[1] | 78    |
12       | V1.VS.HRT[2] | 80    |
13       | V1.VS.HRT[3] | 82    |
14     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.