{"id":24360596,"url":"https://github.com/cmccarthyirl/spring-karate-test-harness","last_synced_at":"2025-07-30T16:35:19.639Z","repository":{"id":139902366,"uuid":"306689706","full_name":"cmccarthyIrl/spring-karate-test-harness","owner":"cmccarthyIrl","description":"This project uses Spring, Karate and Java, to provide a basic test harness ","archived":false,"fork":false,"pushed_at":"2024-08-30T11:55:02.000Z","size":203,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T08:12:08.565Z","etag":null,"topics":["cucumber","cucumber-html-reports","desktop-automation","java","junit","jvm","karate","karate-framework","master-pom","parallel","robotframework","spring","test-harness"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmccarthyIrl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-23T16:28:21.000Z","updated_at":"2024-10-27T23:16:02.000Z","dependencies_parsed_at":"2024-03-03T14:43:07.084Z","dependency_job_id":null,"html_url":"https://github.com/cmccarthyIrl/spring-karate-test-harness","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-karate-test-harness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-karate-test-harness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-karate-test-harness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-karate-test-harness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmccarthyIrl","download_url":"https://codeload.github.com/cmccarthyIrl/spring-karate-test-harness/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190489,"owners_count":21062280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cucumber","cucumber-html-reports","desktop-automation","java","junit","jvm","karate","karate-framework","master-pom","parallel","robotframework","spring","test-harness"],"created_at":"2025-01-18T21:31:51.756Z","updated_at":"2025-04-10T08:59:04.427Z","avatar_url":"https://github.com/cmccarthyIrl.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Karate Test Framework\n[![Karate Tests - SpringBoot APP](https://github.com/cmccarthyIrl/spring-karate-test-harness/actions/workflows/test.yml/badge.svg)](https://github.com/cmccarthyIrl/spring-karate-test-harness/actions/workflows/test.yml)\n## Overview\n\nThe Hero Battle Application is a Spring Boot project designed to manage and simulate battles between heroes. At its core, it provides a comprehensive RESTful API for handling hero data and battle results. A key feature of this application is its robust karate test framework, which ensures the reliability and accuracy of the API by automating and streamlining the testing process. This framework supports various testing scenarios, including creating, updating, retrieving, and deleting heroes and battle results, making it an essential tool for validating the application’s functionality.\n## Table of Contents\n\n- [Getting Started](#getting-started)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Hero Endpoints](#hero-endpoints)\n  - [Battle Endpoints](#battle-endpoints)\n  - [Results Endpoints](#results-endpoints)\n- [Testing](#testing)\n- [Configuration](#configuration)\n- [License](#license)\n\n## Getting Started\n\nThese instructions will help you get a copy of the project up and running on your local machine.\n\n### Prerequisites\n\n- JDK 17\n- Maven\n- Spring Boot\n- An IDE (like IntelliJ IDEA, Eclipse, or VSCode) (optional but recommended)\n\n### Installation\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/cmccarthyIrl/spring-karate-test-harness.git\n   cd spring-karate-test-harness\n   ```\n\n2. **Build the project**\n\n   Use Maven to build the project:\n\n   ```bash\n   mvn clean install\n   ```\n\n3. **Run the application**\n\n   You can run the application using Maven:\n\n   ```bash\n   mvn spring-boot:run\n   ```\n\n   Or by running the main class directly from your IDE.\n\n## Usage\n\nThe application exposes several RESTful endpoints. Below are the available endpoints and their usage.\n\n### Hero Endpoints\n\n- **List All Heroes**\n\n  ```http\n  GET /hero\n  ```\n\n  Returns a list of all heroes.\n\n- **Get Hero by ID**\n\n  ```http\n  GET /hero/{id}\n  ```\n\n  Retrieves details of a hero by their ID.\n\n- **Create or Update Hero**\n\n  ```http\n  POST /hero\n  ```\n\n  Request body should include the hero details in JSON format. Creates a new hero or updates an existing hero.\n\n  Example Request Body:\n\n  ```json\n  {\n    \"id\": 5,\n    \"name\": \"New Hero\",\n    \"age\": 30,\n    \"weapon\": \"Magic Wand\",\n    \"specialPower\": \"Teleportation\"\n  }\n  ```\n\n- **Delete Hero by ID**\n\n  ```http\n  DELETE /hero/{id}\n  ```\n\n  Deletes a hero by their ID.\n\n### Battle Endpoints\n\n- **Simulate a Battle**\n\n  ```http\n  POST /battle\n  ```\n\n  Simulates a battle between two heroes. Request body should include IDs of the heroes involved.\n\n  Example Request Body:\n\n  ```json\n  {\n    \"firstHeroToFight\": 1,\n    \"secondHeroToFight\": 2\n  }\n  ```\n\n  Returns a battle report with a unique battle ID.\n\n### Results Endpoints\n\n- **Get All Results**\n\n  ```http\n  GET /results\n  ```\n\n  Retrieves a list of all battle results.\n\n- **Get Result by ID**\n\n  ```http\n  POST /results\n  ```\n\n  Request body should include the result ID to retrieve specific battle results.\n\n  Example Request Body:\n\n  ```json\n  {\n    \"resultId\": 123\n  }\n  ```\n\n- **Delete All Results**\n\n  ```http\n  DELETE /results\n  ```\n\n  Clears all battle results from the system.\n\n## Testing\n\nTo run the tests, use Maven:\n\nNote that the `mvn test` command only runs test classes that follow the `*Test.java` naming convention.\n\nYou can run a single test or a suite or tests like so :\n\n```bash\nmvn test -Dtest=HeroKarateTest\n```\n\nNote that the `mvn clean install` command runs all test Classes that follow the `*Test.java` naming convention\n\n```bash\nmvn clean install\n```\n\nMake sure to check and ensure that your tests are configured correctly and all dependencies are resolved.\n\n## Configuration\n\nThe application uses Spring Boot's auto-configuration and embedded server setup. You can configure application settings in `src/main/resources/application.properties` or `application.yml`.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmccarthyirl%2Fspring-karate-test-harness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmccarthyirl%2Fspring-karate-test-harness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmccarthyirl%2Fspring-karate-test-harness/lists"}