Skip to main content

PDF Content Extractor


From Appvance IQ it is possible to read a pdf document and is possible to assert for a string in the whole document or you can also mention asserting for content on a specific page of the document. All from Scenario Builder Assertions.

UseThe PDFbelow contentexample extractionshows whenan example of how this can be achieved.

A simple java file was created which browses the pdf document and a Scenariojar Editorfile testwas needscreated out of the java file.

Go to confirmScenario thatBuilder and create a generatedfunctional PDFscenario containswith expectedthe textscript ortype values.being This'Java' and provide the Class and the method name as desired and browse the jar file.

Save the scenario and Play the scenario.

Once the scenario is mostplayed usefulback forsuccessfully, invoices,go statements,to confirmations,the reports,Validation Suite tab and other documents produced byselect the applicationrequired under test.

  1. Generate or download the PDF during the test run.
  2. Extract the relevant textassertions from the PDFdrop-down output.
  3. Validateavailable. only

    You can choose the stabletest-case, businessfrom valuesthe neededdrop-down and also choose the step / Request

    And provide the expected Value (Expected text that we are looking for the test objective.

  4. Record enough evidence infrom the executionPDF), outputFormat can be chosen as PDF and the target can be a
    • Page number

    A regular expression

    or the full document itself.

    Once those entries and made, from the Scenario Builder, refresh the scenario to diagnosehave failures.

    those

    Goodassertions practices

    added.
    • AvoidCheck validatingthe fullbelow documentsscreenshots whenfor areference. small set

      Save the scenario again and playback the scenario to check the results of fields proves the behavior.

    • Normalizepdf whitespace,validations. dates,
      and dynamic values before comparison when needed.
    • Keep expected values in approved test data sources instead of hard-coding them into multiple scenarios.

    Last updated: SeptemberJune 18,26, 20262023

    If you have any feedback on this topic, please contact us at documentation@appvance.ai