Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Implementing proper Regression Testing using NPrinting

Hi,

I would like to share my "a-ha" moment: NPrinting allows to implement regression testing for QlikView that was so much requested from me in the last years.

The ingredients:

-get some data (database, text files, Excels..)

-make a QlikView script loading data above

-make some charts and formulas

-using NPrinting make HTML reports. Nothing fancy, just a table with few columns of numbers

-add NPrinting filters to define a day, say yesterday (or January first ). The assumption is that past numbers do not change anymore.

-manually check the numbers

-rename the HTML file (ex "sales_report_finland_2015_01_01.html") to  "reference_sales_report_finland_2015_01_01.html"

-make a batch file like the one bellow and run it !

rem refresh QlikView file

"C:\Program Files\QlikView\qv.exe" /r whatever.qvw

rem generate NPrinting reports

"C:\Program Files (x86)\NPrinting\Client\NPrinting.exe" /NprintingFile whatever.nsq /Job "regression test"

fc "sales_report_finland_2015_01_01.html" "reference_sales_report_finland_2015_01_01.html" > nul

if %ERRORLEVEL% NEQ 0 (

  echo Sales Report regression test failed

)

The regression test will fail if:

  • the database / files alters history
  • the loading script has "new features" that are "new bugs"
  • same for the chart formulas

Do you currently have other ways to implement regression testing ?

Cheers, Alex

0 Replies