Sunteți pe pagina 1din 5

TestHarness is an exe, which is used to generate active report in PDF or Extract

form.

Find the TestHarness exe place at \\dba-server\Penson Functional


Silo\16.Penson Tools\Development\TestHarness

NOTE : This application works only for active reports which implement
IPensonActiveReport.dll
Place Penson.ActiveReports.dll in the same folder as Active reports dll
Place IPensonActiveReport.dll in the same folder as TestHarness.exe

Steps to set up TestHarness application.


1) Run the test setup script for the procedure on ProcessUS and WorldWide db.
Attached is the sample test set up script togenerate reportdefinition ID.
DECLARE @ProcedureName Char(13)
DECLARE @ShortReportName Char(6)
DECLARE @ReportType VarChar(256)

DECLARE @Extension Char(3)


DECLARE @Delimiter CHAR(1)
DECLARE @DatabaseKey CHAR(25)
DECLARE @LanguageID smallint
SET @ReportType = 'Customer Equity Summary'
SET @DatabaseKey = 'ProcessUS'
SET @ProcedureName = 'dbo.prcEXT736'
SET @ShortReportName = 'EXT736'
SET @LanguageID =1
SET @Extension = NULL
SET @Delimiter = NULL

INSERT dbo.ReportDefinition (ProcedureName, ReportDescription, ProcessRunTypeID, Priority,


DatabaseKey, ReportType, ReportNumber,ProductID,GlobalFile)
SELECT @ProcedureName,'Customer Equity Summary',1,
1,@DatabaseKey,@ReportType,'736',
Null,0

DECLARE @ReportDefinitionID Int


SET @ReportDefinitionID = @@IDENTITY ;

INSERT dbo.ReportDefinitionParameter SELECT @ReportDefinitionID,'@ClientID'


INSERT dbo.ReportDefinitionParameter SELECT @ReportDefinitionID,'@FileName'
INSERT dbo.ReportDefinitionParameter SELECT @ReportDefinitionID,'@GroupType'
INSERT dbo.ReportDefinitionParameter SELECT @ReportDefinitionID,'@ProcessDate'
INSERT dbo.ReportDefinitionParameter SELECT @ReportDefinitionID,'@RepCode'

INSERT INTO dbo.RSParameter (ReportNumber,ParameterName,


DisplayType,DisplayOrder,Description,DefaultValue, StoredProcedure)
VALUES (@ShortReportName,'RepCode','CMT.usrRepCode',1,'&Rep Code',NULL,NULL)
INSERT INTO
dbo.RSReport(ReportNumber,ReportName,StoredProcedure,Firm,Correspondent,Office,Priority,
RSFrequencyId,Delimiter,Extension,DBKey,ReportDefinition)
VALUES (@ShortReportName,'Customer Equity Report',
@ProcedureName,0,1,1,22,1,@Delimiter,@Extension,NULL,NULL)

INSERT INTO dbo.RSReportLanguage (ReportNumber, LanguageID)


VALUES (@ShortReportName, @LanguageID)

2) Add the Local DB Connection String


In TestHarness.exe.config modify the value of the key
“DBConnectString.1.DisplayValue” to local DB Connection String “data
source=DBA-Server;initial catalog=ProcessUS;integrated
security=SSPI;persist security info=False"

3) Add New report to TestHarness application


Double click on the TestHarness.exe. Once the application opens , click
on the Configure
button.
A new window CONFIGURE TEST HARNESS opens.
Click on NEW button and key in the report name. This “Report
Description” gets saved in
the ReportDefinition.Config file and will appear in the drop down for later
use.
Fill in rest of the details.
ReportName : Is a name given to the report
Report Id : Is the ID generated as per Step 1
ClassName : same as the active report dll name
Stored ProcedureName : Name of the procedure to be execute.
Report Frequency : Frequency at which the report has to be
generated.
Report DLL Location : Location of the DLL will be a specified directory on your
local machine.
DB Connection String : select any of the connection string from the
drop down.
DataBase : Database on which the procedure has to be executed.
Rest of the values will be default ones.

Under REPORT TYPE section, select the active report format.

Stored Procedure parameters : Add the input parameters to the grid


at the bottom
of the screen. Set the test values for the procedure here.
Attached is the screen shot for the same
4) Set the “ReportPath” in TestHarness.exe.config.
<add key="ReportPath" value="C:\Development\TestHarness\Reports\" />

a) Run the report by double clicking on the Testharness.exe . In the TestHarness


Main Window, select the newly created report defintion, and then click the “Test” Button.
b) The test harness Main Window
c) Screenshot once the report is generated
5) Once the report done message is displayed, the PDF\Extract form of the
report can be found at
“C:\Development\TestHarness\Reports”

S-ar putea să vă placă și