Testim Documentation

Welcome to the Testim documentation. You'll find comprehensive guides to help you get started quickly, example code snippets, and tips for being more productive. You will also find details about advanced features that allow you to customize Testim to fit your environment or special testing conditions. Don't worry, we'll support you if you get stuck. Let's jump right in!

Guides    Changelog

PDF file validation

Learn how to validate PDF files using the Download Validation step.

You can use the Download Validation step to perform advanced validations of PDF files such as number of lines and content.

Example code:

return pdf(fileBuffer).then((data) => {
  const {numpages, text} = data;
  // number of pages
  console.log("numpages", numpages);
  // PDF text
  console.log("text", text);
  if(numpages !== parseInt(expectedNumOfPages)) {
    return Promise.reject(new Error(`Invalid number of pages: ${numpages}`));
  if(!text.includes(expectedText)) {
    return Promise.reject(new Error(`Invalid pdf text: ${text}`));

Parameters - Packages and JavaScript used in this example:

  1. name: pdf, type: Package, value: [email protected]
  2. name: expectedNumOfPages, type: JavaScript, value: '2'
  3. name: expectedText, type: JavaScript, value: 'A Simple PDF File'

Chrome browser requirements

This feature is supported in Chrome version 67 and above.
It requires a change to your Chrome browser settings:

  1. Open Chrome, go to Settings -> Advanced -> Privacy and security -> Content settings -> PDF documents (you should also be able to copy this direct link and paste it to a Chrome window: chrome://settings/content/pdfDocuments)
  2. Enable the setting:

Updated 6 months ago

PDF file validation

Learn how to validate PDF files using the Download Validation step.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.