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.
gsVerDigest_2002_electronic_publishing_djv := "\h014200000..."
WebPageUrl("http://djvu.org/resources/", "Downloads & Resources - DjVu.org");
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!