Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Verify DjVu content in web applications automatically.

Verify DjVu content in web applications automatically.

DvJu is a file format designed primarily to store scanned documents. Since these documents are often static in nature, Silk Performers WebVerifyDataDigest function is ideal for verifying if the content gets returned correctly from the server during testing.

 

You can have Silk Performer generate the WebVerifyDataDigest function values during recording.

 

The first step is to have the recorder identify the DvJu content type being sent by the server. This is typically either 'image/vnd.djvu' or 'image/x-djvu;charset=UTF-8'.

Go to SETTINGS | ACTIVE PROFILE | WEB | RECORD | VERIFICATION and select the "Record Digest Verification" option.

Remove the 'text/html' entry and add 'image/vnd.djvu' & 'image/x-djvu;charset=UTF-8', then click OK. It should look like this:

Now, when you record your use case, the Silk Performer recorder should script a constant for the digest value and a corresponding WebVerifyDataDigest function.

 const
  gsVerDigest_2002_electronic_publishing_djv := "\h014200000..."
                                                                               "\h0372037A0..."

...

  WebPageUrl("http://djvu.org/resources/", "Downloads & Resources - DjVu.org");
  WebVerifyDataDigest(gsVerDigest_2002_electronic_publishing_djv);
  WebPageLink("Electronic Document Publishing using DjVu (DjVu 200 Kb)", "2002_electronic_publishing.djvu");

 

If the functions are not recorded, then the most likely scenario is that the server is using a different kind of response header than the ones specified in the Silk Performer Active Profile. In this case, open your recorded TrueLog file and check the In-Header responsible for the DjVu content. Find the correct header value, add it to the Active Profile as described above and try recording again.

 

Please note, if you do not remove the 'text/html' value, you will get Digest verifications recorded for every webpage!

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Version history
Revision #:
1 of 1
Last update:
‎2017-12-20 10:47
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.