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
60 changes: 60 additions & 0 deletions functional_tests/ZBIO-5139.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Feature: Testing API for Banking Services
Scenario: Testing HTTP POST method for submitting credit card application online
Given the API base URL '/credit-card-application'
When I send a POST request to '/submit-online' with valid customer information
Then the response status should be 201
And the response should contain 'Application submitted successfully, confirmation notification sent'

Scenario: Testing HTTP POST method for submitting credit card application through a bank branch
Given the API base URL '/credit-card-application'
When I send a POST request to '/submit-branch' with customer data
Then the response status should be 201
And the response should contain 'Application submitted successfully, customer informed'

Scenario: Testing HTTP POST method for lodging a customer's unexpected fee complaint
Given the API base URL '/charges-complaint'
When I send a POST request to '/file-complaint' with fee complaint detail
Then the response status should be 201
And the response should contain 'Complaint lodged successfully'

Scenario: Testing HTTP PUT method for processing customer's unexpected fee waiver
Given the API base URL '/charges-complaint'
When I send a PUT request to '/process-waiver' with complaint reference ID
Then the response status should be 200
And the response should contain 'Charges waived off, customer informed'

Scenario: Testing HTTP POST method for adding reward points to a customer's account
Given the API base URL '/reward-points'
When I send a POST request to '/add-points' with transaction data
Then the response status should be 201
And the response should contain 'Rewards points added successfully'

Scenario: Testing HTTP PUT method for redeeming a customer's reward points
Given the API base URL '/reward-points'
When a PUT request is sent to '/redeem-points' with reward selection data
Then the response status should be 200
And the response should contain 'Rewards redeemed successfully, points updated'

Scenario: Testing HTTP PUT method for increasing a customer's credit limit
Given the API base URL '/credit-limit'
When a PUT request is sent to '/increase-limit' with customer ID
Then the response status should be 200
And the response should contain 'Credit limit increased successfully, customer informed'

Scenario: Testing HTTP PUT method for reducing a customer's credit limit
Given the API base URL '/credit-limit'
When a PUT request is sent to '/decrease-limit' with customer ID
Then the response status should be 200
And the response should contain 'Credit limit reduced successfully, customer informed'

Scenario: Testing HTTP POST method for sending promotional balance transfer offer to a customer
Given the API base URL '/promo-balance-transfer'
When a POST request is sent to '/send-offer' with customer ID
Then the response status should be 201
And the response should contain 'Promotional offer sent to customer'

Scenario: Testing HTTP PUT method for processing a customer's decision to opt for promotional balance transfer offer
Given the API base URL '/promo-balance-transfer'
When a PUT request is sent to '/process-transfer' with transfer data
Then the response status should be 200
And the response should contain 'Balance transferred successfully, account updated'
64 changes: 64 additions & 0 deletions functional_tests/ZBIO-5139.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Functional Test Cases:

1. Credit Card Application:
- Test Case 1: Customer applies for the credit card online
- Input: Valid customer information to fill application form
- Expected Output: Application submitted successfully and confirmation notification received
- Test Case 2: Customer applies through a bank branch
- Input: Bank branch applies with the customer's data on their behalf
- Expected Output: Application submitted successfully and informed to customer

2. Waiving off charges:
- Test Case 1: Customer encounters an unexpected fee
- Input: Customer reports an unexpected fee
- Expected Output: A fee complaint report is lodged
- Test Case 2: Bank processes waiver for the unexpected fee
- Input: Fee complaint report from the customer
- Expected Output: Charges are waived off and the customer is informed

3. Redeeming points:
- Test Case 1: Customer accumulates reward points
- Input: Customer makes transactions using credit card
- Expected Output: Reward points for transactions are added to customer's account
- Test Case 2: Customer redeems reward points
- Input: Customer chooses to redeem reward points for a reward
- Expected Output: Desired reward is given to customer and the respective points are subtracted from the account

4. Credit Limit Adjustment:
- Test Case 1: Bank increases the credit limit based on creditworthiness
- Input: Creditworthiness analysis of a customer
- Expected Output: Credit limit is increased and the customer is informed
- Test Case 2: Bank reduces the credit limit due to changes in the financial situation
- Input: Financial risk analysis of a customer
- Expected Output: Credit limit is reduced and the customer is informed

5. Promotional Balance Transfers
- Test Case 1: Customer gets a balance transfer offer
- Input: Bank decision to offer promotional balance transfer
- Expected Output: The customer is informed about the promotional offer
- Test Case 2: Customer decides to opt for the promotional balance transfer offer
- Input: Customer's decision to transfer high-interest balance
- Expected Output: Balance transferred successfully and updating in customer account

Non-functional Test Cases:

1. Usability:
- Customers are able to easily navigate and use all the provided services

2. Performance:
- Test the speed and response time of services

3. Security:
- Customer information provided during the application process, transactions, and other operations is securely handled and stored

4. Compatibility:
- Services and operations are compatible and easily accessible across different platforms, browsers, and devices

5. Scalability:
- System should handle the increasing load when multiple users access services simultaneously

6. Accessibility:
- Services are accessible 24/7

7. Fault Tolerance:
- In case of any error or issue, the system should generate a relevant error message and recover without disturbing the user's workflow
152 changes: 152 additions & 0 deletions functional_tests/ZBIO-5139.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
openapi: 3.0.0
info:
title: API for Banking Services
description: This is the API that provides different banking service scenarios.
version: 1.0.0
servers:
- url: http://api.example.com/{path}
variables:
path:
default: v1
paths:
/credit-card-application/submit-online:
post:
summary: Submitting online credit card application
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApplication'
responses:
'201':
description: Application submitted successfully, confirmation notification sent
/credit-card-application/submit-branch:
post:
summary: Submitting branch credit card application
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApplication'
responses:
'201':
description: Application submitted successfully, customer informed
/charges-complaint/file-complaint:
post:
summary: Filing a charges complaint
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ComplaintDetails'
responses:
'201':
description: Complaint lodged successfully
/charges-complaint/process-waiver:
put:
summary: Processing waiver
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ComplaintReferenceID'
responses:
'200':
description: Charges waived off, customer informed
/reward-points/add-points:
post:
summary: Adding reward points
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionData'
responses:
'201':
description: Rewards points added successfully
/reward-points/redeem-points:
put:
summary: Redeeming reward points
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RewardSelectionData'
responses:
'200':
description: Rewards redeemed successfully, points updated
/credit-limit/increase-limit:
put:
summary: Increasing credit limit
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerID'
responses:
'200':
description: Credit limit increased successfully, customer informed
/credit-limit/decrease-limit:
put:
summary: Decreasing credit limit
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerID'
responses:
'200':
description: Credit limit reduced successfully, customer informed
/promo-balance-transfer/send-offer:
post:
summary: Sending promotional balance transfer offer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerID'
responses:
'201':
description: Promotional offer sent to customer
/promo-balance-transfer/process-transfer:
put:
summary: Processing promotional balance transfer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TransferData'
responses:
'200':
description: Balance transferred successfully, account updated

components:
schemas:
CustomerApplication:
type: object
properties:
//required customer data details
ComplaintDetails:
type: object
properties:
//required complaint details
ComplaintReferenceID:
type: object
properties:
//required complaint reference ID details
TransactionData:
type: object
properties:
//required transaction data details
RewardSelectionData:
type: object
properties:
//required reward selection data details
CustomerID:
type: object
properties:
//required customer ID details
TransferData:
type: object
properties:
//required transfer details
23 changes: 23 additions & 0 deletions spring-boot-openapi-generator/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
21 changes: 21 additions & 0 deletions spring-boot-openapi-generator/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.openapi-generator-ignore
README.md
pom.xml
src/main/java/org/openapitools/OpenApiGeneratorApplication.java
src/main/java/org/openapitools/RFC3339DateFormat.java
src/main/java/org/openapitools/api/ApiUtil.java
src/main/java/org/openapitools/api/ChargesComplaintApi.java
src/main/java/org/openapitools/api/ChargesComplaintApiController.java
src/main/java/org/openapitools/api/CreditCardApplicationApi.java
src/main/java/org/openapitools/api/CreditCardApplicationApiController.java
src/main/java/org/openapitools/api/CreditLimitApi.java
src/main/java/org/openapitools/api/CreditLimitApiController.java
src/main/java/org/openapitools/api/PromoBalanceTransferApi.java
src/main/java/org/openapitools/api/PromoBalanceTransferApiController.java
src/main/java/org/openapitools/api/RewardPointsApi.java
src/main/java/org/openapitools/api/RewardPointsApiController.java
src/main/java/org/openapitools/configuration/HomeController.java
src/main/java/org/openapitools/configuration/SpringDocConfiguration.java
src/main/resources/application.properties
src/main/resources/openapi.yaml
src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java
1 change: 1 addition & 0 deletions spring-boot-openapi-generator/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.4.0
21 changes: 21 additions & 0 deletions spring-boot-openapi-generator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# OpenAPI generated server

Spring Boot Server

## Overview
This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub.
This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework.


The underlying library integrating OpenAPI to Spring Boot is [springdoc](https://springdoc.org).
Springdoc will generate an OpenAPI v3 specification based on the generated Controller and Model classes.
The specification is available to download using the following url:
http://localhost:8080/v3/api-docs/

Start your server as a simple java application

You can view the api documentation in swagger-ui by pointing to
http://localhost:8080/swagger-ui.html

Change default port value in application.properties
Loading