Included page: .FrontPage.SAT.BalanceDue.SetUp (edit)

import
TBOT.Generic.Database


ddt: SetUp
key value
ConnectionString Server=10.184.25.4,1605;database=AUTOTESTING;User Id=automation; password=automation*100; Timeout=30
BytesColumn DataObject
FileExtension ZIP
ExpectedDirectory \\C605ZPUOTTFS2.tztst.loc\_QATeam\git\data-ott\IntegrationTests\BaselineFiles\Baseline\files\SAT\YrSpecSuites\2017\BatchAutomation\BalanceDue
DownloadPath \\C605ZPUOTTFS2.tztst.loc\_QATeam\FitnesseTestArtifacts\files\Actuals\SAT\YrSpecSuites\2017\BatchAutomation\BalanceDue\Actuals
SourceDirectory \\C605ZPUOTTFS2.tztst.loc\_QATeam\FitnesseTestArtifacts\files\Actuals\SAT\YrSpecSuites\2017\BatchAutomation\BalanceDue\Actuals
TargetDirectory \\C605ZPUOTTFS2.tztst.loc\D_Drive\Trustez\ftp\LocalUser\EFTPS\qa\in
CompareResultDir \\C605ZPUOTTFS2.tztst.loc\_QATeam\FitnesseTestArtifacts\files\Results\SAT\YrSpecSuites\2017\BatchAutomation\BalDues
ignorePathValidations false
DeleteFile true

Execute BTMDB..Package



ddt: KeywordFixture SELECT DB_NAME , LTRIM(RTRIM(Server)) as Server, AcctNo,'{{TaxYear}}' AS Tax_Year, '{{SeqNumber}}' as Seq_Number from BTMDB..Package where AcctNo='{{PAN}}'
Comments# PAN TaxYear SeqNumber WorkingDayStartCount DB_NAME? Server? AcctNo? Tax_Year? Seq_Number? GETNEXTWORKINGDAY?
Test0001 5010 2017 1 1 $DBName1= $Server1= $AcctNo1= $Tax_Year1= $Seq_Number1= $SetDate1=


import
TBOT.Generic.Database

Get Filename

Get Filename


ddt: DynamicQuery declare @filename nvarchar(max) set @filename = '{{FileVal}}' select @filename as FileName
Comments# FileVal FileName?
Test0001 NewYorkActual.rpt $File1=

Capturing current ActionDate[?]

ddt: DynamicQuery SELECT LTRIM(RTRIM(Server)) AS Server, LTRIM(RTRIM(DB_NAME)) AS DB_NAME , AcctNo,'{{TaxYear}}' AS Tax_Year, '{{SeqNumber}}' as Seq_Number, CONVERT(varchar(10),getdate(),111) as ActionDate FROM BTMDB.dbo.Package WHERE AcctNo='{{PAN}}'
Comments# PAN TaxYear SeqNumber DB_NAME? AcctNo? Tax_Year? Seq_Number? ActionDate?
Test0001 5010 2017 1 $DBName1= $AcctNo1= $Tax_Year1= $Seq_Number1= $Action_DT1=


Download File


Download Block


DDT: KeywordFixture select Action_Cd, DataObject, CONVERT(varchar(10),Action_DT,111) as Action_DT from {{DataBaseName}}.dbo.bankdata where acctno='{{PAN}}' and year={{TaxYear}} and state='NY' and prodopt=107 and SeqNo='{{SeqNumber}}'
Comment PAN TaxYear SeqNumber DataBaseName FileName Action_Cd? Action_DT? DataObject? DOWNLOAD? DateInput DateFormat FORMATDATE?
Test0001 $AcctNo1 $Tax_Year1 $Seq_Number1 $DBName1 $File1 1 $Action_DT1 System.Byte[] True $SetDate1 yyyyMMdd $FormateDate1=



Validate Filing Status

ddt: DynamicQuery DECLARE @AssetID NVARCHAR(20) IF OBJECT_ID('tempdb..#tempPrepareBalDue') IS NOT NULL DROP TABLE #tempPrepareBalDue CREATE TABLE #tempPrepareBalDue ( Filing VARCHAR(200), StateCode VARCHAR(3), ProdOpt SMALLINT, Product_Cd CHAR(1), IsRowEnabled BIT, IsEstimatedEnabled BIT, SettlementDate DateTime, IsSettlementDateEnabled BIT, PrepareStatus VARCHAR(100), IsPrepareStatusEnabled BIT, PreparedDate DateTime, IsPreparedDateEnabled BIT, PreparedBy Varchar(3), IsPreparedByEnabled BIT, IsDoFileEnabled BIT, IsFiled BIT, IsFiledEnabled BIT, IsFiledVisible BIT, FiledDate DateTime, IsFiledDateEnabled BIT, FiledBy VARCHAR(3), IsFiledByEnabled BIT, FiledStatus VARCHAR(100), IsFiledStausEnabled BIT, ID INT, SeqNo SMALLINT, PreparedSettlementDate datetime, BatchOpt SMALLINT, Comments VARCHAR(255), ActionCode TINYINT ) insert into #tempPrepareBalDue EXEC {{DataBaseName}}.BANKDB_P.spGetBalDueFilingData '{{PAN}}', {{YEAR}},{{SeqNumber}} select @AssetID=AssetID from {{DataBaseName}}.dbo.bankdata where acctno = '{{PAN}} 'and year = '{{YEAR}} 'and prodopt = '27' and Product_Cd='F' select *, CONVERT(nvarchar(6),PreparedDate,12)+'~'+REPLACE(CONVERT(VARCHAR(5),PreparedDate,108),':','') AS PreparedDateRegEx, CONVERT(VARCHAR(20),FiledDate,112) as FiledDateRegEx, @AssetID as AssetID from #tempPrepareBalDue where Filing='{{FilingType}}' and PreparedDate between DATEADD(DD,-1,GETDATE()) AND GETDATE() IF OBJECT_ID('tempdb..#tempPrepareBalDue') IS NOT NULL DROP TABLE #tempPrepareBalDue
Comments# SeqNumber DataBaseName PAN YEAR FilingType IsFiled? PreparedDateRegEx? AssetID? FiledDateRegEx?
Test0001 $Seq_Number1 $DBName1 5010 2017 New York True $PreparedDateRegEx1= $AssetID1= $FiledDateRegEx1=


File Compare

TBOT.Generic.SFTP
Comments sourceFile destinationFile resultFileName IgnorePattern compareFiles?
Test0001 NewYorkBase.rpt $File1 20180219;$FiledDateRegEx1 Both Files are Equal