Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.
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
68 changes: 68 additions & 0 deletions functional_tests/ZBIO-5139.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Feature: CreditCard Application and Services

# Scenario for functional test case 1

Scenario: Successful Credit Card Application
Given The API base URL 'http://localhost:3000'
And A new user wants to apply for a credit card with 'Identification', 'income details', and 'contact information'
When I send a POST request to '/apply-credit-card' with 'Identification', 'income details', and 'contact information'
Then The response status should be 200
And The response should contain 'Application submitted successfully'

# Scenario for functional test case 2

Scenario: Unsuccessful Credit Card Application due to Invalid or Incomplete information
Given The API base URL 'http://localhost:3000'
And A new user with 'Incomplete or incorrect information' wants to apply for a credit card
When I send a POST request to '/apply-credit-card' with 'Incomplete or incorrect information'
Then The response status should be 400
And The response should contain 'Invalid or incomplete data supplied'

# Scenario for functional test case 3

Scenario: Charge waiver based on customer's history
Given The API base URL 'http://localhost:3000'
And A customer incurred an 'unexpected fee'
When I send PUT request to '/review-history' to review 'customer's history'
And I send a PUT request to '/waive-off-charges' based on the review
Then The response status should be 200
And The response should contain 'Balance updated successfully'

# Scenario for functional test case 4

Scenario: User Redeems Points
Given The API base URL 'http://localhost:3000'
And The user with 'accumulated reward points'
When I send a POST request to '/redeem-points' with 'accumulated reward points'
Then The response status should be 200
And The response should contain 'Points redeemed successfully'

# Scenario for functional test case 5

Scenario: Credit Limit Extension
Given The API base URL 'http://localhost:3000'
And The user 'has been using their credit card responsibly'
When I send a PUT request to '/credit-limit-extension'
Then The response status should be 200
And The response should contain 'Credit limit updated successfully'

# Scenario for functional test case 6

Scenario: Credit Limit Reduction
Given The API base URL 'http://localhost:3000'
And The 'changes in the user's financial situation or risk profile'
When I send a PUT request to '/reduce-credit-limit' with 'financial situation or risk profile'
Then The response status should be 200
And The response should contain 'Credit limit updated successfully'

# Scenario for functional test case 7

Scenario: Promotional Balance Transfers
Given The API base URL 'http://localhost:3000'
And The user selects 'promotional offer for balance transfer'
When I send a POST request to '/balance-transfer' with 'promotional offer'
Then The response status should be 200
And The response should contain 'Balance transfer successful'

# Scenarios for non-functional test cases are not typically handled in API testing as they test more of UI, Performance, Security, Reliability or maintainability related issues

74 changes: 74 additions & 0 deletions functional_tests/ZBIO-5139.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
Functional Test Cases:

1. Credit Card Application:
- Test Case 1:
- Input: Identification, income details, and contact information.
- Action: User applies for a new credit card.
- Expected Output: The system should validate the input data and successfully submit the credit card application.

- Test Case 2:
- Input: Incomplete or incorrect information.
- Action: User applies for a new credit card.
- Expected Output: The system should validate the input data and reject the credit card application displaying appropriate error messages.

2. Waiving Off Charges:
- Test Case 3:
- Input: Customer encounters an unexpected fee on their credit card statement.
- Action: The bank reviews the customer's history.
- Expected Output: Based on the history, the bank decides to waive off the charges one-time, and the updated balance should reflect on the credit card statement.

3. Redeeming Points:
- Test Case 4:
- Input: There are accumulated reward points in the user account.
- Action: User redeems points for various benefits.
- Expected Output: The system should subtract the redeemed points from the account and provide the user with the selected benefits.

4. Credit Limit Extension:
- Test Case 5:
- Input: User has been using their credit card responsibly.
- Action: The bank decides to increase their credit limit.
- Expected Output: The system should update the user's credit limit and notify the user.

5. Credit Limit Reduction:
- Test Case 6:
- Input: There are changes in the user's financial situation or risk profile.
- Action: The bank decides to reduce the credit limit on their credit card.
- Expected Output: The system should update the credit limit and notify the user.

6. Promotional Balance Transfers:
- Test Case 7:
- Input: Promotional offer for balance transfer.
- Action: User transfers high-interest balances from other credit cards.
- Expected Output: The system should successfully accept the transfer under promotional offer and update balances of involved credit cards.

Non-functional Test Cases:

1. Usability:
- Test Case 8:
- Action: User tries to use the online credit card applications.
- Expected Output: The UI should be user-friendly and provide clear instructions to complete all actions.

2. Performance:
- Test Case 9:
- Action: Multiple users apply for credit cards concurrently.
- Expected Output: The system should be able to handle multicore requests without any performance degradation.

3. Security:
- Test Case 10:
- Action: User submits personally identifiable information (PII) and financial data.
- Expected Output: Data should be transmitted and stored securely, following all required security compliance.

4. Reliability:
- Test Case 11:
- Action: User interacts with credit services on multiple occasions over the extended period.
- Expected Output: The system should always give consistent results.

5. Supportability:
- Test Case 12:
- Action: User needs help during usage.
- Expected Output: There should be enough help documents, FAQ, and support assistance available.

6. Maintainability:
- Test Case 13:
- Action: There are upgrades or changes in the system.
- Expected Output: The system should be easily maintainable without major service disruptions during updates.
106 changes: 106 additions & 0 deletions functional_tests/ZBIO-5139.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
openapi: "3.0.0"
info:
version: 1.0.0
title: CreditCard Application and Services API

servers:
- url: 'http://localhost:3000'

paths:

/apply-credit-card:
post:
summary: Apply for a credit card
requestBody:
description: Application details
required: true
content:
application/json:
schema:
type: object
properties:
identification:
type: string
income_details:
type: string
contact_information:
type: string
responses:
'200':
description: Application submitted successfully
'400':
description: Invalid or incomplete data supplied

/review-history:
put:
summary: Review customer's history to evaluate incurred fees
responses:
'200':
description: Review done

/waive-off-charges:
put:
summary: Waive off charges based on customer's history
responses:
'200':
description: Balance updated successfully

/redeem-points:
post:
summary: Redeem accumulated reward points
requestBody:
description: Redeem accumulated reward points
required: true
content:
application/json:
schema:
type: object
properties:
accumulated_reward_points:
type: number
responses:
'200':
description: Points redeemed successfully

/credit-limit-extension:
put:
summary: Extend the credit limit for users with good credit history
responses:
'200':
description: Credit limit updated successfully

/reduce-credit-limit:
put:
summary: Reduce the credit limit based on the user's financial situation or risk profile
requestBody:
description: Financial situation or risk profile details
required: true
content:
application/json:
schema:
type: object
properties:
financial_situation:
type: string
risk_profile:
type: string
responses:
'200':
description: Credit limit updated successfully

/balance-transfer:
post:
summary: Transfer balance based on promotional offer
requestBody:
description: Promotional offer details
required: true
content:
application/json:
schema:
type: object
properties:
promotional_offer:
type: string
responses:
'200':
description: Balance transfer successful