Initial commit
This commit is contained in:
90
skills/skill-adapter/assets/example_api_spec.json
Normal file
90
skills/skill-adapter/assets/example_api_spec.json
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"_comment": "Example API specification for load testing with k6, Gatling, or Artillery.",
|
||||
"api_name": "Example API",
|
||||
"description": "A simple API endpoint for demonstrating load testing configurations.",
|
||||
"endpoints": [
|
||||
{
|
||||
"name": "Get User",
|
||||
"method": "GET",
|
||||
"url": "https://example.com/api/users/123",
|
||||
"_comment": "Example URL. Replace with your actual API endpoint.",
|
||||
"headers": {
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your_api_key>"
|
||||
},
|
||||
"body": null,
|
||||
"expected_status_code": 200,
|
||||
"assertions": [
|
||||
{
|
||||
"type": "json_path",
|
||||
"path": "$.id",
|
||||
"operator": "eq",
|
||||
"value": 123,
|
||||
"_comment": "Verify user ID is 123."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Create User",
|
||||
"method": "POST",
|
||||
"url": "https://example.com/api/users",
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"body": {
|
||||
"name": "John Doe",
|
||||
"email": "john.doe@example.com"
|
||||
},
|
||||
"expected_status_code": 201,
|
||||
"assertions": [
|
||||
{
|
||||
"type": "json_path",
|
||||
"path": "$.name",
|
||||
"operator": "eq",
|
||||
"value": "John Doe",
|
||||
"_comment": "Verify user name is John Doe."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Update User",
|
||||
"method": "PUT",
|
||||
"url": "https://example.com/api/users/123",
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"body": {
|
||||
"name": "Jane Doe",
|
||||
"email": "jane.doe@example.com"
|
||||
},
|
||||
"expected_status_code": 200,
|
||||
"assertions": [
|
||||
{
|
||||
"type": "json_path",
|
||||
"path": "$.name",
|
||||
"operator": "eq",
|
||||
"value": "Jane Doe",
|
||||
"_comment": "Verify user name is Jane Doe."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Delete User",
|
||||
"method": "DELETE",
|
||||
"url": "https://example.com/api/users/123",
|
||||
"headers": {},
|
||||
"body": null,
|
||||
"expected_status_code": 204,
|
||||
"assertions": []
|
||||
}
|
||||
],
|
||||
"load_profile": {
|
||||
"tool": "k6",
|
||||
"_comment": "Can be k6, gatling, or artillery",
|
||||
"options": {
|
||||
"vus": 10,
|
||||
"duration": "10s",
|
||||
"_comment": "k6 options, see k6 documentation for details"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user