Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA Scripts #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions test/cybersource-rest-qa-node/Data/Configuration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
'use strict'

var CybersourceRestApi = require('cybersource-rest-client');
/*
* If Cybs.json file is not provided Merchant configuration properties are taken from Configuration module
*/

//set the constant values
const MerchantId = "testrest";
const MerchantKeyId = "08c94330-f618-42a3-b09d-e1e43be5efda";
const MerchantSecretKey = "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE=";
const AuthenticationType = "jwt";
//const AuthenticationType = "http_signature";
const KeysDirectory = "Resource";
const KeyFileName = "testrest";
const RunEnvironment = "cybersource.environment.sandbox";
const KeyAlias = "testrest";
const KeyPass = "testrest";
const RequestJsonPath = "Resource\\request.json";
const EnableLog = true;
const LogFileName = "cybs";
const LogDirectory = "../log";
const LogfileMaxSize = "5242880"; //10 MB In Bytes

// Constructor for Configuration
function Configuration() {

var configObj = {
"authenticationType": AuthenticationType,
"merchantID": MerchantId,
"runEnvironment": RunEnvironment,
"requestJsonPath": RequestJsonPath,

"keyAlias": KeyAlias,
"keyPass": KeyPass,
"keyFileName": KeyFileName,

"keysDirectory": KeysDirectory,

"merchantKeyId": MerchantKeyId,
"merchantsecretKey": MerchantSecretKey,

"enableLog": EnableLog,

"logFilename": LogFileName,
"logDirectory": LogDirectory,
"logFileMaxSize": LogfileMaxSize
};
return configObj;

}

module.exports = Configuration;
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
dirName,fileName,Flag
Payments/CoreServices,ProcessPaymentTest,0
Payments/CoreServices,ProcessCreditTest,0
Payments/CoreServices,CapturePaymentTest,0
Payments/CoreServices,ProcessAuthorizationReversalTest,0
Payments/CoreServices,RefundCaptureTest,0
Payments/CoreServices,RefundPaymentTest,0
Payments/CoreServices,VoidCaptureTest,0
Payments/CoreServices,VoidCreditTest,0
Payments/CoreServices,VoidPaymentTest,0
Payments/CoreServices,VoidRefundTest,0
Payouts/CoreServices,ProcessPayoutTest,0
TMS/CoreServices,CreateInstrumentIdentifierTest,0
TMS/CoreServices,CreatePaymentInstrumentTest,0
TMS/CoreServices,DeleteInstrumentIdentifierTest,0
TMS/CoreServices,DeletePaymentInstrumentTest,0
TMS/CoreServices,RetrieveAllPaymentInstrumentsTest,0
TMS/CoreServices,RetrieveInstrumentIdentifierTest,0
TMS/CoreServices,RetrievePaymentInstrumentTest,0
TMS/CoreServices,UpdateInstrumentIdentifierTest,0
TMS/CoreServices,UpdatePaymentInstrumentTest,0
Flex/CoreServices,GenerateKeyTest,0
Flex/CoreServices,TokenizeCardTest,0
Flex,KeyGenerationNoEncTest,0
UserManagement/CoreServices,GetUserInformationTest,0
TransactionSearch/CoreServices,CreateSearchRequestTest,0
TransactionSearch/CoreServices,GetSearchResultsTest,0
TransactionDetails/CoreServices,RetrieveTransactionTest,0
TransactionBatches/CoreServices,GetIndividualBatchFileTest,0
TransactionBatches/CoreServices,GetListOfBatchFilesTest,0
SecureFileShare/CoreServices,DownloadFileWithFileIdentifierTest,0
SecureFileShare/CoreServices,GetListOfFilesTest,0
Reporting/CoreServices,CreateAdhocReportTest,0
Reporting/CoreServices,CreateReportSubscriptionForReportNameByOrganizationTest,0
Reporting/CoreServices,DeleteSubscriptionOfReportNameByOrganizationTest,0
Reporting/CoreServices,DownloadReportTest,1
Reporting/CoreServices,GetAllSubscriptionsTest,0
Reporting/CoreServices,GetAvailableReportsTest.js,0
Reporting/CoreServices,GetNotificationOfChangesTest.js,0
Reporting/CoreServices,GetPurchaseAndRefundDetailsTest.js,0
Reporting/CoreServices,GetReportBasedOnReportidTest,0
Reporting/CoreServices,GetReportDefinitionTest,0
Reporting/CoreServices,GetReportingResourceInformationTest,0
Reporting/CoreServices,GetSubscriptionForReportNameTest.js,0
Reporting/CoreServices,RetrieveAvailableReportsTest.js,0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testCaseId,encryptionType,message
CKeyGen_01,RsaOaep256,Success
CKeyGen_02,PqaPabc255,Fails due to invalid encryptionType
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testCaseId,keyId,message
CTokC_01,07X8Ng6jmpyovcIkff7KNp0xb4XtwkT9,Success
CTokC_02,0023154mudgshfyrtdgfj456fhdggdg1,Fails due to invalid keyId
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testCaseId,encryptionType,message
CKeyGenNE_01,None,Success
CKeyGenNE_02,SDMP,Fails due to invalid encryptionType
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CAuth_01,0.00,Success
CAuth_02,0,Fails
CAuth_03,GHL6,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CAuthMC_01,0.00,Success
CAuthMC_02,0,Fails
CAuthMC_03,GHA9,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CAO_01,2854.00,Success
CAO_02,200.0,Fails
CAO_03,ADHJ5,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CMI_01,2016.05,Success
CMI_02,200.0,Fails
CMI_03,ZNK9,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CMUD_01,2016.05,Success
CMUD_02,200.0,Fails
CMUD_03,QWERT3,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CSU_01,106.00,Success
CSU_02,200.0,Fails
CSU_03,SDRT12,Fails due to onvalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CV_01,100.00,Success
CV_02,200.0,Fails
CV_03,HGFWQ3,Fails due to invalid
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dirName,fileName,Flag
AVSNonUsSupportedCardTypes,AmexOptima,0
AVSNonUsSupportedCardTypes,MaestroInternational,0
AVSNonUsSupportedCardTypes,MaestroUKDomestic,0
AVSNonUsSupportedCardTypes,SoloUK,0
AVSNonUsSupportedCardTypes,Visa,1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TestCaseID,API_Name,Result,Remarks,RunTime
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CNR_01,2401.00,Success
CNR_02,200.0,Fails
CNR_03,FDE32,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CR_01,100.00,Success
CR_02,200.0,Fails
CR_03,DSWAZ1,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dirName,fileName,Flag
AVSRelaxAvs,NonRetail,1
AVSRelaxAvs,Retail,1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
TestCaseID,API_Name,Result,Remarks,RunTime
CNR_01,CreateNonRetail,Pass,Assertion Passed-Status Code:201 created,2018-09-19T15:17:13+05:30
CNR_02,CreateNonRetail,Pass,Assertion Passed-Status Code:201 created,2018-09-19T15:17:13+05:30
CNR_03,CreateNonRetail,Fails,CreateNonRetail paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T15:17:14+05:30
CR_01,CreateRetail,Fails,CreateRetail paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T15:17:14+05:30
CR_02,CreateRetail,Fails,CreateRetail paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T15:17:14+05:30
CR_03,CreateRetail,Fails,CreateRetail paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T15:17:14+05:30
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CAE_01,100.00,Success
CAE_02,200.0,Fails
CAE_03,KLTR7,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CD_01,2016.05,Success
CD_02,200.0,Fails
CD_03,GHTR3,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CMC_01,2016.05,Success
CMC_02,200.0,Fails
CMC_03,HGWQ5,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CV_01,100.00,Success
CV_02,200.0,Fails
CV_03,POTR8,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dirName,fileName,Flag
AVSusSupportedCardTypes,AmericanExpress,1
AVSusSupportedCardTypes,Discover,1
AVSusSupportedCardTypes,MasterCard,1
AVSusSupportedCardTypes,Visa,1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
TestCaseID,API_Name,Result,Remarks,RunTime
CAE_01,CreateAericanExpress,Pass,Assertion Passed-Status Code:201 created,2018-09-19T15:50:17+05:30
CAE_02,CreateAericanExpress,Fails,Assertion Failed-Status Code:201,2018-09-19T15:50:17+05:30
CAE_03,CreateAericanExpress,Fails,CreateAericanExpress paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T15:50:17+05:30
CD_01,CreateDiscover,Pass,Assertion Passed-Status Code:201 created,2018-09-19T15:50:17+05:30
CD_02,CreateDiscover,Fails,Assertion Failed-Status Code:201,2018-09-19T15:50:18+05:30
CD_03,CreateDiscover,Fails,CreateDiscover paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T15:50:18+05:30
CMC_01,CreateMasterCard,Pass,Assertion Passed-Status Code:201 created,2018-09-19T15:50:18+05:30
CMC_02,CreateMasterCard,Fails,Assertion Failed-Status Code:201,2018-09-19T15:50:19+05:30
CMC_03,CreateMasterCard,Fails,CreateMasterCard paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T15:50:19+05:30
CV_01,CreateVisa,Pass,Assertion Passed-Status Code:201 created,2018-09-19T15:50:19+05:30
CV_02,CreateVisa,Fails,Assertion Failed-Status Code:201,2018-09-19T15:50:19+05:30
CV_03,CreateVisa,Fails,CreateVisa paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T15:50:19+05:30
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CAVSO_01,2861.00,Success
CAVSO_02,2500,Fails
CAVSO_03,LKA9,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CAES_01,100.00,Success
CAES_02,200,Fails
CAES_03,GHP12,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CBPA_01,72210.00,Success
CBPA_02,6700,Fails
CBPA_03,AQWA9,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CAC_01,2854.00,Success
CAC_02,200.0,Fails
CAC_03,ZDFRT6,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CDC_01,2839.00,Success
CDC_02,200.0,Fails
CDC_03,GHTR56,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CMIC_01,2016.05,Success
CMIC_02,200.0,Fails
CMIC_03,BVFC27,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CMUD_01,2016.05,Success
CMUD_02,200.0,Fails
CMUD_03,IUYTR2,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TestCaseId,totalamount,Message
CMC_01,106.00,Success
CMC_02,200.0,Fails
CMC_03,ASDU4,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CVC_01,2531,Success
CVC_02,200.0,Fails
CVC_03,DFRE2,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dirName,fileName,Flag
CVN,AmexCID,1
CVN,DiscoverCID,1
CVN,MaestroInternationalCopy,1
CVN,MaestroUKDomestic,1
CVN,MasterCardCVC2,1
CVN,VisaCVV2,1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
TestCaseID,API_Name,Result,Remarks,RunTime
CAC_01,CreateAmexCID,Pass,Assertion Passed-Status Code:201 created,2018-09-19T20:13:25+05:30
CAC_02,CreateAmexCID,Fails,Assertion Failed-Status Code:201,2018-09-19T20:13:25+05:30
CAC_03,CreateAmexCID,Fails,CreateAmexCID paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T20:13:26+05:30
CDC_01,CreateDiscoverCID,Pass,Assertion Passed-Status Code:201 created,2018-09-19T20:13:26+05:30
CDC_02,CreateDiscoverCID,Fails,CreateDiscoverCID paymentid is not created due to Reason: ,2018-09-19T20:13:26+05:30
CDC_03,CreateDiscoverCID,Fails,CreateDiscoverCID paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T20:13:27+05:30
CMIC_01,CreateMaestroInternationalCopy,Fails,CreateMaestroInternationalCopy paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T20:13:27+05:30
CMIC_02,CreateMaestroInternationalCopy,Fails,CreateMaestroInternationalCopy paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T20:13:27+05:30
CMIC_03,CreateMaestroInternationalCopy,Fails,CreateMaestroInternationalCopy paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T20:13:28+05:30
CMUD_01,CreateMaestroUKDomestic,Pass,Assertion Passed-Status Code:201 created,2018-09-19T20:13:28+05:30
CMUD_02,CreateMaestroUKDomestic,Fails,Assertion Failed-Status Code:201,2018-09-19T20:13:28+05:30
CMUD_03,CreateMaestroUKDomestic,Fails,CreateMaestroUKDomestic paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T20:13:28+05:30
CMC_01,CreateMasterCardCVC2,Pass,Assertion Passed-Status Code:201 created,2018-09-19T20:13:29+05:30
CMC_02,CreateMasterCardCVC2,Fails,Assertion Failed-Status Code:201,2018-09-19T20:13:29+05:30
CMC_03,CreateMasterCardCVC2,Fails,CreateMasterCardCVC2 paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T20:13:29+05:30
CVC_01,CreateVisaCVV2,Pass,Assertion Passed-Status Code:201 created,2018-09-19T20:13:30+05:30
CVC_02,CreateVisaCVV2,Pass,Assertion Passed-Status Code:201 created,2018-09-19T20:13:31+05:30
CVC_03,CreateVisaCVV2,Fails,CreateVisaCVV2 paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T20:13:31+05:30
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CMSC_01,106.00,Success
CMSC_02,200.0,Fails
CMSC_03,KLM76,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CMC_01,106.00,Success
CMC_02,200.0,Fails
CMC_03,KLM76,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CSU_01,106.00,Success
CSU_02,200,Fails
CSU_03,KLM76,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CV_01,0.00,uccess
CV_02,200,Fails
CV_03,KLM76,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dirName,fileName,Flag
CardBand,MaestroSecureCode,1
CardBand,MasterCard,1
CardBand,SoloUK,1
CardBand,Visa,1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
TestCaseID,API_Name,Result,Remarks,RunTime
CMSC_01,CreateMaestroSecureCode,Pass,Assertion Passed-Status Code:201 created,2018-09-18T12:43:08+05:30
CMSC_02,CreateMaestroSecureCode,Fails,Assertion Failed-Status Code:201,2018-09-18T12:43:08+05:30
CMSC_03,CreateMaestroSecureCode,Fails,CreateMaestroSecureCode paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-18T12:43:08+05:30
CMC_01,CreateMasterCard,Pass,Assertion Passed-Status Code:201 created,2018-09-18T12:43:09+05:30
CMC_02,CreateMasterCard,Fails,Assertion Failed-Status Code:201,2018-09-18T12:43:09+05:30
CMC_03,CreateMasterCard,Fails,CreateMasterCard paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-18T12:43:10+05:30
CSU_01,CreateSoloUK,Pass,Assertion Passed-Status Code:201 created,2018-09-18T12:43:11+05:30
CSU_02,CreateSoloUK,Fails,Assertion Failed-Status Code:201,2018-09-18T12:43:11+05:30
CSU_03,CreateSoloUK,Fails,CreateSoloUK paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-18T12:43:12+05:30
CV_01,CreateVisa,Pass,Assertion Passed-Status Code:201 created,2018-09-18T12:43:12+05:30
CV_02,CreateVisa,Fails,Assertion Failed-Status Code:201,2018-09-18T12:43:12+05:30
CV_03,CreateVisa,Fails,CreateVisa paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-18T12:43:13+05:30
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CCS_01,100.00,Success
CCS_02,200,Fails
CCS_03,LKI7,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CAEC_01,100.00,Success
CAEC_02,200.0,Fails
CAEC_03,MNBHJ6,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CAECNU_01,100.00,Success
CAECNU_02,200.0,Fails
CAECNU_03,LKOP59,Fails due to invalid amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dirName,fileName,Flag
CurrencySupport,AuthorizationOnly2ExponentCurrenciesNonUSD,1
CurrencySupport,AuthorizationOnly0ExponentCurrencies,1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TestCaseID,API_Name,Result,Remarks,RunTime
CAECNU_01,CreateAuthOnly2ExponentCurrenciesNU,Fails,CreateAuthOnly2ExponentCurrenciesNU paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T19:22:31+05:30
CAECNU_02,CreateAuthOnly2ExponentCurrenciesNU,Fails,CreateAuthOnly2ExponentCurrenciesNU paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T19:22:31+05:30
CAECNU_03,CreateAuthOnly2ExponentCurrenciesNU,Fails,CreateAuthOnly2ExponentCurrenciesNU paymentid is not created due to Reason: Declined - One or more fields in the request contains invalid data,2018-09-19T19:22:31+05:30
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testCaseId,totalamount,message
CAnP_01,100.00,Success
CAnP_02,200.0,Fails
CAnP_03,GHP34,Fails due to invalid amount
Loading