Skip to content

roost-io/CreditCard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CreditCard Application

The CreditCard Application is a sample project designed to illustrate the process of using AI-powered tools for test generation, API specification creation, source code generation, and karate api test generation. This project was developed using various tools, including RoostGPT, an AI Test Generator, OpenAPI Generator, and GitHub CoPilot.

Development Process

The development process for this project followed the following steps:

  1. Functional Test Generation: RoostGPT was used to generate functional tests for the login functionality, resulting in a feature file (Gherkin scenarios) and an API specification file.

This was the user description in jira ticket.


    Credit Card Due Reminder: An automated notification is sent to the cardholder reminding them of their upcoming credit card payment due date, helping them to avoid late payment fees. This notification should include the last 4 digits of the credit card number for identification purposes.

    Overdue Balance Alert: If a cardholder misses their payment due date, an alert is sent to notify them of the overdue balance and the potential consequences of not making the payment promptly. This alert should include the last 4 digits of the credit card number.

    Collection Notification: When an account becomes significantly delinquent, the card issuer may escalate the collection process by sending formal collection notifications to the cardholder, detailing the amount owed and any additional charges. These notifications should include the last 4 digits of the credit card number.

    Payment Plan Proposal: In cases where a cardholder is unable to pay the full overdue balance at once, the card issuer may offer a payment plan proposal outlining a structured repayment schedule with reduced interest rates or fees. The proposal should include the last 4 digits of the credit card number.

    Collection Agency Involvement: If the cardholder fails to respond to previous notifications and reminders, the card issuer may involve a collection agency to recover the overdue balance, leading to increased collection efforts. The collection agency should be provided with the last 4 digits of the credit card number for identification purposes.

    Legal Action Initiation: In extreme cases of non-payment or default, the card issuer may have to take legal action against the cardholder. Any legal documentation should include the last 4 digits of the credit card number for identification purposes.Note: For security reasons, only the last 4 digits of the credit card number should be included in any communication or documentation related to the collection process. The full credit card number should never be shared or displayed in plain text.

The API spec and feature file is being stored in functional_tests folder in root level generated by RoostGPT.

  1. Source Code Generation: The API specification file was used with the OpenAPI Generator to generate the initial source code for the application. The command used was:

openapi-generator generate -i functional_tests/ZBIO-5213.yaml -g spring -o . --additional-properties=javaVersion=1.8

  1. Code Enhancement: GitHub CoPilot was utilized to resolve issues and add logic to the generated source code, enhancing its functionality.

  2. Karate API Test Generation: RoostGPT was employed to generate Karate API tests for the API specification file(functional_tests/ZBIO-5213.yaml) generated by the RoostGPT, ensuring api test scenarios.

This development lifecycle showcases the power of AI-powered tools in streamlining various stages of the software development process, from test generation to code generation and enhancement.

Getting Started

To get started with the CreditCard Application, follow these steps:

  1. Clone the repository:

git clone https://github.com/roost-io/CreditCard.git

  1. Build the project using maven:

mvn install or mvn compile

  1. Run the application:

mvn spring-boot:run

  1. Run Karate Tests:

Install Prism (https://github.com/stoplightio/prism) for mocking server -

npm install -g @stoplight/prism-cli

Start prism mock server -

prism mock functional_tests/ZBIO-5213.yaml

Export hosted API_HOST and AUTH_TOKEN -

export API_HOST=http://127.0.0.1:4010 
export AUTH_TOKEN=token

Run tests -

mvn test

Analyse test report -

target/karate-reports/karate-summary.html

  1. Explore the code, tests, and documentation to understand the implementation details and the AI-powered tools used in the development process.

Acknowledgments

We would like to acknowledge the following tools and resources used in the development of this project:

  • RoostGPT - An AI Test Generator used for functional test and api tests generation.
  • OpenAPI Generator - A tool used for generating source code from API specifications.
  • GitHub CoPilot - An AI-powered coding assistant used for code enhancement and issue resolution.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published