Validate Evidence fields

This validator checks whether each instance of Evidence in your project had all of the fields and field values that your report template is expecting.

Debug template 14

Before we can validate these fields, we need to define them! In the interest of keeping information organized, I'm going to have to ask you to open the Report template properties: evidence fields page of the Administration manual that explains how to define Evidence fields.

We want to ensure that the latest and most up-to-date information about each topic is in a single page.

After you've defined your Evidence fields within the report template properties, validate your project. Check the on-screen Validator log to see what fields are missing or invalid and causing problems.

Example Evidence Field Error

In this example, our piece of Evidence was missing a Request field. The log reads:

[ERROR] Evidence #134 is missing the field 'Request', which is required by your report template. Please add the field to the evidence.

In another example, our Output field is required by our template, and the field exists but is empty. The log shows:

[ERROR] Your report template specifies that the field 'Output' is required, but Evidence 1 does not provide a value for it. Please provide some value.

In yet another example, our Status field defines values of Open | Closed but in our Project, the Status was set to Pending. The log shows:

[ERROR] Value 'Pending' is invalid for field 'Status' in Evidence 1. Allowed values are Open, Closed

To fix these errors, we need to first locate the specific piece of Evidence identified by the validator. First, note the Evidence ID (134 in this example above) from the error message. Then, run the following commands in the console as dradispro:

$ cd /opt/dradispro/dradispro/current
$ RAILS_ENV=production bundle exec rails console
irb> Evidence.find(134)

Expected output:

=> #<Evidence id: 134, node_id: 37, issue_id: 84, content "#[Details]#\r\nbc.. Lorem ipsum dolor sit amet, cons...", author: nil, created_at: "2017-03-29 21:54:35", updated_at: "2017-03-29 22:31:22">

Now, we have the Evidence ID (134 in this example) and will also need to note the node_id value from this output (37 in this example).

Head back to the project and navigate to /pro/nodes/##node_id##/evidence/##id##/ in your browswer, substituting in the node_id value from the console output for ##node_id## and substituting in the Evidence ID value from the error message for ##id##. In the example above, you would navigate to /pro/nodes/37/evidence/134/ and edit the Status field to make sure it had a value of either Open or Closed.

No Evidence Fields defined

If you haven't defined any Evidence fields in your report template properties, you'll get a warning when you validate your project.

[WARNING] The selected template doesn't define any Evidence fields. Dradis doesn't know what Evidence fields your report template is looking for.
[WARNING] Go to Admin > Templates > Reports and define some Evidence fields for this report template.
[WARNING] More details: https://dradisframework.com/support/guides/administration/report_template_properties.html#evidence-fields

If you see the above output, head over to the link in the message to add your Evidence fields so that Dradis knows what fields and field values to validate.

Next help article: Validate Issue fields →