{"id":20420230,"url":"https://github.com/ghoshasish99/karate-api-tests","last_synced_at":"2026-05-27T20:32:35.146Z","repository":{"id":118153243,"uuid":"335464101","full_name":"ghoshasish99/Karate-API-Tests","owner":"ghoshasish99","description":"API testing with Karate","archived":false,"fork":false,"pushed_at":"2021-02-04T14:37:25.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T04:29:18.447Z","etag":null,"topics":["apitesting","cucumber","karate"],"latest_commit_sha":null,"homepage":"","language":"Gherkin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghoshasish99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-02-03T00:40:54.000Z","updated_at":"2021-07-02T07:39:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b739194-370b-4e30-90a8-d37e4bd0b66c","html_url":"https://github.com/ghoshasish99/Karate-API-Tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ghoshasish99/Karate-API-Tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghoshasish99%2FKarate-API-Tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghoshasish99%2FKarate-API-Tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghoshasish99%2FKarate-API-Tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghoshasish99%2FKarate-API-Tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghoshasish99","download_url":"https://codeload.github.com/ghoshasish99/Karate-API-Tests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghoshasish99%2FKarate-API-Tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33583394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["apitesting","cucumber","karate"],"created_at":"2024-11-15T06:42:06.604Z","updated_at":"2026-05-27T20:32:35.123Z","avatar_url":"https://github.com/ghoshasish99.png","language":"Gherkin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Testing with Karate\n \n ![Karate Test](https://github.com/ghoshasish99/karate-test/workflows/Karate%20Test/badge.svg)\n \n For a quickstart, use the Karate Maven archetype to create a skeleton project with one command.\n \n ```powershell\n mvn archetype:generate \\\n-DarchetypeGroupId=com.intuit.karate \\\n-DarchetypeArtifactId=karate-archetype \\\n-DarchetypeVersion=0.9.6 \\\n-DgroupId=\u003cyour_group_id\u003e \\\n-DartifactId=\u003cyour_project_name\u003e\n ```\nSample feature files : \n```gherkin\nScenario:  Fetch User\n    Given url 'https://reqres.in/''\n    And path 'api/users/2'\n    When method get\n    Then status 200\n```\nBut its best to define base URL in the `Background` section, like this :\n```gherkin\nBackground:\n    * url 'https://reqres.in/'\n```\nIt is important to note that Karate exposes the `status` and `response` to be used for various purposes.\nAssertions can be added in this way :\n```gherkin\n  And match response.data.first_name == 'Janet'\n  And match response.data.id == 2\n  And match response.data.avatar == \"#string\"\n```\nFor Data driven scenarios, one can use `Scenario Outline` instead of `Scenario` in this way :\n```gherkin\nScenario Outline:  Successful Registration\n    * def randomPwd = dataGenerator.getRandomPwd()\n    * def payload =\n    \"\"\"\n\t\t {\n        \"email\": \"\u003cemail\u003e\",\n        \"password\": \"\u003cpassword\u003e\"\n\t\t\t}\n    \"\"\" \n    Given path 'api/register'\n    And request payload\n    When method post\n    Then status 200\n    And match response.token == '#string'\n    \n    * def id = response.id\n    * print 'Created ID is ',id\n    * def token = response.token\n    * print 'Created token is ',token\n    \n    Examples:\n        | email                  | password     |\n        | eve.holt@reqres.in     | #(randomPwd) |\n        | tracey.ramos@reqres.in | #(randomPwd) |\n```\nFor Parallel execution using Junit 5, the Runner class should be like this :\n```java\nimport com.intuit.karate.Results;\nimport com.intuit.karate.Runner;\nimport static org.junit.jupiter.api.Assertions.*;\nimport org.junit.jupiter.api.Test;\n\nclass TestParallel {\n\n    @Test\n    void testParallel() {\n        Results results = Runner.parallel(getClass(),5);\n        assertEquals(0, results.getFailCount(), results.getErrorMessages());\n    }\n\n}\n```\nTo run the full test set :\n```powershell\nmvn test\n```\nTo run specific scenarios :\nTag the scenarios with tag of your choice, like so :\n```gherkin\n@Smoke  \n  Scenario:  Fetch User  \n    Given path 'api/users/2'\n    When method get\n    Then status 200\n```\nThen run these scenarios using : \n```powershell\nmvn test -Dkarate.options=\"--tags @Smoke\"\n```\nTo run scenarios other than the tagged ones :\n```powershell\nmvn test -Dkarate.options=\"--tags ~@Smoke\"\n```\nFor more information on Karate please refer [here.](https://github.com/intuit/karate)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghoshasish99%2Fkarate-api-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghoshasish99%2Fkarate-api-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghoshasish99%2Fkarate-api-tests/lists"}