Whitespace and case differences in test results
Datapoint values
Test steps which check datapoint values will always fail if the actual value of a datapoint is different from the expected value.
For example:
Then I should see field "AE.AE.AETERM[0]" has value "Pain in shoulder"
The above will fail if the actual value is different in any way:
Pain in shoulder
pain in shoulder
Query messages
The default setting is that Test steps which check query messages will pass if there is an exact match or if there are only whitespace or case differences.
For example:
Then I should see the following query on "AE_FOLDER.AE.AEENDAT[1]"
"""
End Date is before Start Date. Please correct.
"""
The above will pass if the actual query message is the same, or only has whitespace or case differences:
End Date is before Start Date. Please correct.
End Date is before start date. please correct.
End Date is before Start Date. Please correct.
There is an organization setting which will change the default behaviour so that the steps will fail if there is ANY difference between the expected and actual message. Contact support@trialgrid.com if you would like this to be enabled for your organization.
Note
Query messages which use 'gxml' will always require an exact match - whitespace or case differences will always cause the step to fail.
Deviation text
The default setting is that Test steps which check deviation message will pass if there is an exact match or if there are only whitespace or case differences.
For example:
Then I should see a deviation on "SCREEN.DM.AGE[0]" with code "Deviation" and class "Other" and message
"""
This is a deviation
"""
The above will pass if the actual deviation message is the same, or only has whitespace or case differences:
This is a deviation
This is a Deviation
This is a deviation
There is an organization setting which will change the default behaviour so that the steps will fail if there is ANY difference between the expected and actual message. Contact support@trialgrid.com if you would like this to be enabled for your organization.
Email subject and message text
Test steps which check that an email was or was not received will always pass if there is an exact match or if the only differences are in whitespace, line breaks or case. This applies to both the subject and the message text, and is not configurable.
For example:
Then I should receive an email with subject "Adverse Event raised" and message
"""
An Adverse Event has been recorded for subject 001-001.
"""
The above will pass if the received email is the same, or only differs in whitespace, line breaks or case:
An Adverse Event has been recorded for subject 001-001.
An adverse event has been recorded for subject 001-001.
An Adverse Event has been recorded
for subject 001-001.
This matters because emails are usually sent as HTML. The line breaks in the message you receive are decided by how the email is laid out for display, not by how the text was written in the Test Case, so the two rarely agree.
Where a step passes on an email which is not an exact match, the step result says so and shows the difference, so it is clear what was forgiven:
Email received after 12 seconds and forwarded to user@example.com
Email message: This is the same as expected, except for whitespace.
Note
The same applies to the "I should not receive an email" steps. An email which differs only in whitespace, line breaks or case still counts as received, and will fail those steps. The failure names the difference in the same way.
Folder names
Test steps which check Folder names will always pass if there is an exact match or if the only differences are in whitespace or case. This is not configurable.
Form names
Test steps which check Form names will always pass if there is an exact match or if the only differences are in whitespace or case. This is not configurable.