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.
Recommended workflow
Generate or download the PDF during the test run.Extract the relevant textassertions from thePDFdrop-downoutput.Validateavailable.onlyYou can choose the
stabletest-case,businessfromvaluestheneededdrop-down and also choose the step / RequestAnd provide the expected Value (Expected text that we are looking for
the test objective.Record enough evidence infrom theexecutionPDF),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.
Goodassertions practices
added. AvoidCheckvalidatingthefullbelowdocumentsscreenshotswhenforareference.small
set
Save the scenario again and playback the scenario to check the results of
fields provesthebehavior.Normalizepdfwhitespace,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