Projects/AdvPaymentMngt/JUnit Test Script

From InfiniteERP Wiki
Revision as of 08:22, 16 December 2021 by Wikiadmin (talk | contribs) (Created page with "= Introduction = JUnit is a testing framework for the java programming language.We have developed the JUnit test cases for '''Advance Payables and Receivables''' module. = Li...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

JUnit is a testing framework for the java programming language.We have developed the JUnit test cases for Advance Payables and Receivables module.

List of Test Cases

We have developed the following test cases.

Payment Document Generation (Fully Paid)

This test case will help to test the payment document generation process using the add payment and execute payment events. This test case will do the following process:

  • Create a Sales Invoice.
  • Complete the Sales Invoice.
  • Receive payments against the invoice.
  • Process the payment.
  • Reactivate the payment.

Financial Account and Payment method needed for generating payment document. Creating Payment Method

Referenced data
  • Payment Method
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_PM_PAYMENT_01
Active True
Defaults Payment IN
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Manual M
Upon Receipt Use In Transit Payment Account INT
Upon Deposit Use Deposited Payment Account DEP
Upon Clearing Use Cleared Payment Account CLE
Defaults Payment OUT
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Manual M
Upon Payment Use In Transit Payment Account INT
Upon Withdrawal Use Withdrawn Payment Account WIT
Upon Clearing Use Cleared Payment Account CLE
  • Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_FINACC_PAYMENT_01
Active True
Currency EUR 102
Type Cash C
Default False
Business Partner McGiver Supplies
  • Payment Method in Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
Active True
Financial Account APRM_FINACC_PAYMENT_01
Payment Method APRM_PM_PAYMENT_01
Input Data
  • Sales Invoice Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Invoice
Business Partner McGiver Supplies
Price List General Sales
Payment Term Immediate
Payment Method APRM_PM_PAYMENT_01
  • Sales Invoice Line
Field Value Identifier
Product Hat
UOM Unit
Tax Vat 4%
Tax Amount 7.4
Line Net Amount 175.00
Invoice Quantity 5
Unit Price 35.00
List Price 37.00
Price Limit 0
Grand Total Amount 182.00
  • Completing the sales invoice

Procedure has been created for sales invoice completion. Using the procedure we can complete the sales invoice.

  • Receive Payment Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Receipt
Received from McGiver Supplies
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Status Awaiting Payment
Amount 182.00
Output Data
  • Payment Plan
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Expected Amount 182.00
Received Amount 182.00
Outstanding Amount 0
Number of Payments 1
  • Payment Plan Details
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Expected Amount 182.00
Paid Amount 182.00
  • Receive Payments Header
Field Value Identifier
Amount 182.00
Status Payment Received
  • Receive Payments Lines
Field Value Identifier
Invoice Amount 182.00
Expected 182.00
Paid Amount 182.00
Reactivating the Payment
  • Receive Payments Header
Field Value Identifier
Amount 0
Status Awaiting Payment
  • Receive Payment Line: no data
  • Payment Plan
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Expected Amount 182.00
Received Amount 0
Outstanding Amount 182.00
Number of Payments 0
  • Payment Details: no data

Payment Document Generation (Partially Paid)

This test case will help to test the payment document generation process using the add payment and execute payment events. This test case will do the following process:

  • Create a Sales Invoice.
  • Complete the Sales Invoice.
  • Receive payments against the invoice.
  • Process the payment.
  • Reactivate the payment.

Financial Account and Payment method needed for generating payment document. Creating Payment Method

Referenced data
  • Payment Method
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_PM_PAYMENT_01
Active True
Defaults Payment IN
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Manual M
Upon Receipt Use In Transit Payment Account INT
Upon Deposit Use Deposited Payment Account DEP
Upon Clearing Use Cleared Payment Account CLE
Defaults Payment OUT
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Manual M
Upon Payment Use In Transit Payment Account INT
Upon Withdrawal Use Withdrawn Payment Account WIT
Upon Clearing Use Cleared Payment Account CLE
  • Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_FINACC_PAYMENT_01
Active True
Currency EUR 102
Type Cash C
Default False
Business Partner McGiver Supplies
  • Payment Method in Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
Active True
Financial Account APRM_FINACC_PAYMENT_01
Payment Method APRM_PM_PAYMENT_01
Input Data
  • Sales Invoice Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Invoice
Business Partner McGiver Supplies
Price List General Sales
Payment Term Immediate
Payment Method APRM_PM_PAYMENT_01
  • Sales Invoice Line
Field Value Identifier
Product Hat
UOM Unit
Tax Vat 4%
Tax Amount 7.4
Line Net Amount 175.00
Invoice Quantity 5
Unit Price 35.00
List Price 37.00
Price Limit 0
Grand Total Amount 182.00
  • Completing the sales invoice

Procedure has been created for sales invoice completion. Using the procedure we can complete the sales invoice.

  • Receive Payment Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Receipt
Received from McGiver Supplies
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Status Awaiting Payment
Amount 0
Output Data
  • Payment Plan
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Expected Amount 182.00
Received Amount 91.00
Outstanding Amount 91.00
Number of Payments 1
  • Payment Plan Details
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Expected Amount 182.00
Received Amount 91.00
  • Receive Payments Header
Field Value Identifier
Amount 91.00
Status Payment Received
  • Receive Payments Lines
Field Value Identifier
Invoice Amount 182.00
Expected 182.00
Paid Amount 91.00
Reactivating the Payment
  • Receive Payments Header
Field Value Identifier
Amount 0
Status Awaiting Payment
  • Receive Payment Line: no data
  • Payment Plan
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Expected Amount 182.00
Received Amount 0
Outstanding Amount 182.00
Number of Payments 0
  • Payment Details: no data


Payment Document Generation (Write-Off)

This test case will help to test the payment document generation process using the add payment and execute payment events. This test case will do the following process:

  • Create a Sales Invoice.
  • Complete the Sales Invoice.
  • Receive payments against the invoice.
  • Process the payment.
  • Reactivate the payment.

Financial Account and Payment method needed for generating payment document. Creating Payment Method

Referenced data
  • Payment Method
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_PM_PAYMENT_01
Active True
Defaults Payment IN
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Manual M
Upon Receipt Use In Transit Payment Account INT
Upon Deposit Use Deposited Payment Account DEP
Upon Clearing Use Cleared Payment Account CLE
Defaults Payment OUT
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Manual M
Upon Payment Use In Transit Payment Account INT
Upon Withdrawal Use Withdrawn Payment Account WIT
Upon Clearing Use Cleared Payment Account CLE
  • Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_FINACC_PAYMENT_01
Active True
Currency EUR 102
Type Cash C
Default False
Business Partner McGiver Supplies
  • Payment Method in Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
Active True
Financial Account APRM_FINACC_PAYMENT_01
Payment Method APRM_PM_PAYMENT_01
Input Data
  • Sales Invoice Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Invoice
Business Partner McGiver Supplies
Price List General Sales
Payment Term Immediate
Payment Method APRM_PM_PAYMENT_01
  • Sales Invoice Line
Field Value Identifier
Product Hat
UOM Unit
Tax Vat 4%
Tax Amount 7.4
Line Net Amount 175.00
Invoice Quantity 5
Unit Price 35.00
List Price 37.00
Price Limit 0
Grand Total Amount 182.00
  • Completing the sales invoice

Procedure has been created for sales invoice completion. Using the procedure we can complete the sales invoice.

  • Receive Payment Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Receipt
Received from McGiver Supplies
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Status Awaiting Payment
Amount 0
Write-Off 0
Output Data
  • Payment Plan
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Expected Amount 182.00
Received Amount 182.00
Outstanding Amount 0
Number of Payments 1
  • Payment Plan Details
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Expected Amount 182.00
Received Amount 182.00
  • Receive Payments Header
Field Value Identifier
Amount 180.00
Write-Off Amount 2.00
Status Payment Received
  • Receive Payments Lines
Field Value Identifier
Invoice Amount 182.00
Expected 182.00
Received Amount 180.00
Reactivating the Payment
  • Receive Payments Header
Field Value Identifier
Amount 0
Status Awaiting Payment
  • Receive Payment Line: no data
  • Payment Plan
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Expected Amount 182.00
Received Amount 0
Outstanding Amount 182.00
Number of Payments 0
  • Payment Details: no data


Payment Document Generation (Refund)

This test case will help to test the payment document generation process using the add payment and execute payment events. This test case will do the following process:

  • Create a Sales Invoice.
  • Complete the Sales Invoice.
  • Receive payments against the invoice.
  • Process the payment.


Financial Account and Payment method needed for generating payment document. Creating Payment Method

Referenced data
  • Payment Method
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_PM_PAYMENT_01
Active True
Defaults Payment IN
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Manual M
Upon Receipt Use In Transit Payment Account INT
Upon Deposit Use Deposited Payment Account DEP
Upon Clearing Use Cleared Payment Account CLE
Defaults Payment OUT
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Manual M
Upon Payment Use In Transit Payment Account INT
Upon Withdrawal Use Withdrawn Payment Account WIT
Upon Clearing Use Cleared Payment Account CLE
  • Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_FINACC_PAYMENT_01
Active True
Currency EUR 102
Type Cash C
Default False
Business Partner McGiver Supplies
  • Payment Method in Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
Active True
Financial Account APRM_FINACC_PAYMENT_01
Payment Method APRM_PM_PAYMENT_01
Input Data
  • Sales Invoice Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Invoice
Business Partner McGiver Supplies
Price List General Sales
Payment Term Immediate
Payment Method APRM_PM_PAYMENT_01
  • Sales Invoice Line
Field Value Identifier
Product Hat
UOM Unit
Tax Vat 4%
Tax Amount 7.4
Line Net Amount 175.00
Invoice Quantity 5
Unit Price 35.00
List Price 37.00
Price Limit 0
Grand Total Amount 182.00
  • Completing the sales invoice

Procedure has been created for sales invoice completion. Using the procedure we can complete the sales invoice.

  • Receive Payment Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Receipt
Received from McGiver Supplies
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Status Awaiting Payment
Amount 182.00
Write-Off 0
Output Data
  • Payment Plan
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Expected Amount 182.00
Received Amount 182.00
Outstanding Amount 0
Number of Payments 1
  • Payment Plan Details
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Expected Amount 182.00
Received Amount 182.00

After Refunding the amount to the customer, it will create two documents in receive payments.

  • Receive Payments Header
Field Value Identifier
Amount 182.00
Write-Off Amount 0.00
Generated Credit 20.00
Used Credit 20.00
Status Payment Received
  • Receive Payments Lines
Field Value Identifier
Invoice Amount 182.00
Expected 182.00
Received Amount 182.00
  • Receive Payments Header
Field Value Identifier
Amount -20.00
Write-Off Amount 0.00
Generated Credit 0.00
Used Credit 20.00
Status Payment Received
  • Receive Payments Lines
Field Value Identifier
Invoice Amount 0.00
Expected 0.00
Received Amount -20.00

Payment Document Generation (Payment Proposal)

This test case will help to test the payment document generation process using the select expected payment and generate payment events. This test case will do the following process:

  • Create a Purchase Invoice.
  • Complete the Purchase Invoice.
  • Generate payments against the invoice.
  • Process the payment.

Financial Account and Payment method needed for generating payment document. Creating Payment Method

Referenced data
  • Payment Method
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_PM_PAYMENT_01
Active True
Defaults Payment IN
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Manual M
Upon Receipt Use In Transit Payment Account INT
Upon Deposit Use Deposited Payment Account DEP
Upon Clearing Use Cleared Payment Account CLE
Defaults Payment OUT
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Manual M
Upon Payment Use In Transit Payment Account INT
Upon Withdrawal Use Withdrawn Payment Account WIT
Upon Clearing Use Cleared Payment Account CLE
  • Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_FINACC_PAYMENT_01
Active True
Currency EUR 102
Type Cash C
Default False
Business Partner McGiver Supplies
  • Payment Method in Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
Active True
Financial Account APRM_FINACC_PAYMENT_01
Payment Method APRM_PM_PAYMENT_01
Input Data
  • Purchase Invoice Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Invoice
Business Partner McGiver Supplies
Price List General Sales
Payment Term Immediate
Payment Method APRM_PM_PAYMENT_01
  • Purchase Invoice Line
Field Value Identifier
Product Hat
UOM Unit
Tax Vat 4%
Tax Amount 7.4
Line Net Amount 175.00
Invoice Quantity 5
Unit Price 35.00
List Price 37.00
Price Limit 0
Grand Total Amount 182.00
  • Creating second invoice with different business partner
  • Purchase Invoice Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AP Invoice
Business Partner Turtle Logistics
Price List General Sales
Payment Term Immediate
Payment Method APRM_PM_PAYMENT_01
  • Purchase Invoice Line
Field Value Identifier
Product Hat
UOM Unit
Tax Vat 4%
Tax Amount 7.4
Line Net Amount 175.00
Invoice Quantity 5
Unit Price 35.00
List Price 37.00
Price Limit 0
Grand Total Amount 182.00
  • Completing the purchase invoice

Procedure has been created for purchase invoice completion. Using the procedure we can complete the purchase invoice.

  • Payment Proposal Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type Payment Proposal
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Status Awaiting Payment
Amount 0.00
  • Select Expected Payments

Select the created two invoice and give the expected payment amount and process the expected payments.

  • Payment Proposal Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type Payment Proposal
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Status Awaiting Payment
Amount 364.00
  • Generate Payments

Payment can be made using the generate payments.Make the payment using the generate payment process.

Output Data
  • Payment Proposal Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type Payment Proposal
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Amount 364.00
Status Payment Made
  • Payment Proposal Line with McGiver Business Partner
Field Value Identifier
Business Partner McGiver Supplies
Invoice Amount 182.00
Expected 182.00
Paid Amount 182.00
  • Payment Proposal Line with Turtle Logistics Partner
Field Value Identifier
Business Partner Turtle Logistics
Invoice Amount 182.00
Expected 182.00
Paid Amount 182.00
  • Payment Plan For First Invoice
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Expected Amount 182.00
Received Amount 182.00
Outstanding Amount 0
Number of Payments 1
  • Payment Plan Details For First Invoice
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Expected Amount 182.00
Paid Amount 182.00
  • Payment Plan For Second Invoice
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Expected Amount 182.00
Received Amount 182.00
Outstanding Amount 0
Number of Payments 1
  • Payment Plan Details For Second Invoice
Field Value Identifier
Payment Method APRM_PM_PAYMENT_01
Financial Account APRM_FINACC_PAYMENT_01
Expected Amount 182.00
Paid Amount 182.00

Payment Document Generation (Execution Process with Deferred)

This test case will help to test the payment document generation process using the add payment,execute payment and execution process events with deferred option. This test case will do the following process:

  • Create a Sales Invoice.
  • Complete the Sales Invoice.
  • Receive payments against the invoice.
  • Process the payment.
  • Reactivate the payment.

Financial Account and Payment method needed for generating payment document. Creating Payment Method

Referenced data
  • Payment Method
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_PM_PAYMENT_02
Active True
Defaults Payment IN
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Automatic A
Execution Process Simple Execution Process
Deferred True
Upon Receipt Use In Transit Payment Account INT
Upon Deposit Use Deposited Payment Account DEP
Upon Clearing Use Cleared Payment Account CLE
Defaults Payment OUT
Payment In Allowed True
Automatic Receipt False
Automatic Deposit False
Execution Type Automatic A
Execution Process Simple Execution Process
Deferred True
Upon Payment Use In Transit Payment Account INT
Upon Withdrawal Use Withdrawn Payment Account WIT
Upon Clearing Use Cleared Payment Account CLE
  • Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Name APRM_FINACC_PAYMENT_02
Active True
Currency EUR 102
Type Cash C
Default False
Business Partner McGiver Supplies
  • Payment Method in Financial Account
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
Active True
Financial Account APRM_FINACC_PAYMENT_02
Payment Method APRM_PM_PAYMENT_02
Input Data
  • Sales Invoice Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Invoice
Business Partner McGiver Supplies
Price List General Sales
Payment Term Immediate
Payment Method APRM_PM_PAYMENT_02
  • Sales Invoice Line
Field Value Identifier
Product Hat
UOM Unit
Tax Vat 4%
Tax Amount 7.4
Line Net Amount 175.00
Invoice Quantity 5
Unit Price 35.00
List Price 37.00
Price Limit 0
Grand Total Amount 182.00
  • Completing the sales invoice

Procedure has been created for sales invoice completion. Using the procedure we can complete the sales invoice.

  • Receive Payment Header
Field Value Identifier
Client SmallBazaar 1000000
Organization Main 1000000
User 100
Currency EUR 102
Document Type AR Receipt
Received from McGiver Supplies
Payment Method APRM_PM_PAYMENT_02
Financial Account APRM_FINACC_PAYMENT_02
Status Awaiting Payment
Amount 0
Write-Off 0
Output Data
  • Payment Plan
Field Value Identifier
Payment Method APRM_PM_PAYMENT_02
Expected Amount 182.00
Received Amount 182.00
Outstanding Amount 0
Number of Payments 1
  • Payment Plan Details
Field Value Identifier
Payment Method APRM_PM_PAYMENT_02
Financial Account APRM_FINACC_PAYMENT_02
Expected Amount 182.00
Received Amount 182.00
  • Receive Payments Header
Field Value Identifier
Amount 180.00
Write-Off Amount 0.00
Status Awaiting Execution
  • Receive Payments Lines
Field Value Identifier
Invoice Amount 182.00
Expected 182.00
Received Amount 180.00
Reactivating the Payment
  • Receive Payments Header
Field Value Identifier
Amount 0
Status Awaiting Payment
  • Receive Payment Line: no data
  • Payment Plan
Field Value Identifier
Payment Method APRM_PM_PAYMENT_02
Expected Amount 182.00
Received Amount 0
Outstanding Amount 182.00
Number of Payments 0
  • Payment Details: no data