Template snapshots

Checking a template's health in Contract Express

Contract Express provides the ability to check how business critical templates work in a newer version of Contract Express with snapshot testing. It is available in the
Admin > Snapshots
section.
A document snapshot is an archive that contains all information about the Document state when the snapshot is created. Each snapshot contains:
  1. The template(s) used for the document.
  2. Any generated documents.
  3. The answer set for the document.
  4. An xml representation of each questionnaire page.
To test a snapshot, you can:
  • Save a snapshot of an existing document, see
    Saving snapshots
    below for more details.
  • Upload an existing snapshot for a .zip file.
Snapshot window from the Admin page.
The table on the Snapshots tab contains the following columns:
  • Name:
    A unique identifier for the snapshot.
  • Template
    : The Template that was used to create the Document.
  • Saved from version
    : The version of Contract Express when the Document Snapshot was saved. Note that if a Snapshot predates Contract Express version 7.3, this value will be empty.
  • Last version passed
    : The latest Contract Express version where the snapshot test passed, if applicable.
  • Status
    : The current status of the snapshot test.
  • Position in Queue
    : The position of the snapshot test in the queue to testing.

Uploading snapshots

  1. Go to
    Admin > Snapshots
    .
  2. Click
    Upload snapshot
    .
  3. Drag and drop the .zip file with the snapshot to the opened panel or browse for it.
  4. Click
    Upload
    .
The snapshot will appear in the list in New status.

Saving snapshots

To save a snapshot:
  1. Go to the
    Documents
    tab and select the required document.
  2. Click Three ellipses contain options to snapshots. button and select
    Save snapshot
    .
Saved snapshot will appear in the list of snapshots in the
Admin > Snapshots
section.

Running snapshot tests

To run a snapshot test:
  1. Go to
    Admin > Snapshots
    .
  2. Check the required snapshot and click
    Run
    .
As a result, the snapshot changes its status to Pending and the
Position in queue
column will have a value. The lower the value, the sooner the test will run. Snapshot tests run during non-working hours, you can define the period for tests in the web.config file.

Analysing snapshot test results

During a snapshot test, Contract Express automatically creates a replica of the Document using the template(s) and answer set from the snapshot. The resulting files are compared with the initial files from the snapshot. You may get one of the following results displayed in the
Status
column:
  • If there are no differences, the snapshot test will have Passed status.
  • If there are some differences, the test will have Failed status. You can then view and resolve these differences.
  • If your snapshot has an Error status, some technical problems occurred. Try to rerun the test, and if the issue persists, contact Contract Express support.
If the test has failed, you can view the details by clicking on the
Failed
status.
The
Snapshot test results
page contains three sections:
  • Pages
    contains the number of questionnaire pages that Contract Express expected and the number of pages that were added and/or removed. Here you can also see the results of comparison of the original pages and pages generated during the snapshot test.
  • Documents
    contains the number of generated documents that Contract Express expected and the number of generated documents that were added and/or removed. Here you can also see the results of comparisons of the original documents and documents generated during the snapshot test.
  • Answer sets
    contains information about answer set comparison.
Comparing pages, documents or answer sets
If a page, a document, or the answer set is marked by Alert icon., there are some differences between the original output and the output from the snapshot test. To view the line by line comparison, click
View comparison
.
In the opened panel you can review the differences of original files and files generated during the snapshot test.
Comparison view for a snapshot page.
Updating snapshot behavior
Not every difference highlighted when running a snapshot test may be an issue. For example, the previous behavior may have been undesirable but the behavior has improved in a newer version of Contract Express. If upon reviewing the differences you decide that they are not issues, you may accept them by checking
Accept new results and update Snapshot
checkbox.
As a result, the status of the snapshot will become Resolved. The value in the
Saved from version
column will be changed to the version of Contract Express used to run the snapshot test.
Contacting Contract Express support
If you consider the differences in the snapshot tests results as an issue, please contact Contract Express support at contractexpress-support@thomsonreuters.com