https://github.com/osandadeshan/rest-assured-code-generator
A lightweight Next.js application that enables users to generate RestAssured code by providing the required parameters.
https://github.com/osandadeshan/rest-assured-code-generator
code-generation codegen codegenerator css hacktoberfest html nextjs nodejs rest-api restassured typescript
Last synced: 7 months ago
JSON representation
A lightweight Next.js application that enables users to generate RestAssured code by providing the required parameters.
- Host: GitHub
- URL: https://github.com/osandadeshan/rest-assured-code-generator
- Owner: osandadeshan
- License: mit
- Created: 2024-10-20T14:48:27.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-10-24T10:25:02.000Z (12 months ago)
- Last Synced: 2024-10-25T00:05:00.818Z (11 months ago)
- Topics: code-generation, codegen, codegenerator, css, hacktoberfest, html, nextjs, nodejs, rest-api, restassured, typescript
- Language: TypeScript
- Homepage: https://rest-assured-code-generator.vercel.app
- Size: 9.52 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# REST Assured Code Generator






## Overview
The **REST Assured Code Generator** is a simple Next.js application designed to streamline the process of generating REST Assured test code. By inputting the necessary parameters, users can quickly obtain a code snippet that can be used to test APIs. This single-page application focuses on simplicity and efficiency, making it easier for users to create test cases without unnecessary complexity.

## Features
- **Input Fields**:
- **Base URL**: Text box for entering the base URL of the API.
- **API Endpoint**: Text box for entering the specific API endpoint.
- **Query Parameters**: Two text boxes (key and value) with a "+" button to add more parameters as needed.
- **Path Parameters**: Text box for entering path parameters with a "+" button to add additional parameters.
- **Headers**: Similar to query parameters, allows for key-value pairs with the option to add more.
- **Request Body**: A dropdown to choose between JSON and form-data formats, along with an appropriate text area for input.
- **Expected Status Code**: A searchable dropdown listing all possible HTTP status codes.- **User Interface**:
- The left side of the application contains all input fields for user convenience.
- The right side displays the generated REST Assured code snippet along with a "Copy Code" button.- **Code Generation**:
- On clicking the "Generate Code" button, the application compiles all the input data into a well-structured REST Assured test code.
## Getting Started
### Prerequisites
- Node.js (version 14 or later)
- npm (version 5.6 or later)### Installation
1. Clone the repository:
```bash
git clone https://github.com/osandadeshan/rest-assured-code-generator.git
cd rest-assured-code-generator
```2. Install the dependencies:
```bash
npm install
```3. Start the development server:
```bash
npm run dev
```4. Open your web browser and navigate to `http://localhost:3000` to view the application.
## Usage
1. Enter the **Base URL** and **API Endpoint** in the provided text boxes.
2. Add **Query Parameters** and **Path Parameters** using the "+" buttons.
3. Enter any necessary **Headers**.
4. Select the appropriate **Request Body Type (JSON or form-data)** and provide the body content if required.
5. Enter the **Expected Status Code**.
6. Click the **Generate Code** button to create the REST Assured test code.
7. Use the **Copy Code** button to easily copy the generated code to your clipboard for further use.## Technologies Used
- Next.js
- React
- TypeScript
- CSS (for styling)## Deployment
The application is deployed on [Vercel](https://vercel.com/). You can try it out [here](https://rest-assured-code-generator.vercel.app/).
## License
This project is licensed under the MIT License. You are free to use, modify, and distribute this software under the terms of the license.
[MIT License](https://opensource.org/licenses/MIT)
## Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.## Acknowledgements
- Inspired by the need for efficient API testing and automation.
- Thanks to the open-source community for their valuable tools and resources.