feat: init files

This commit is contained in:
2025-06-17 22:58:08 +08:00
parent 3c77faf93e
commit 6b090a93c9
10 changed files with 385 additions and 0 deletions

45
features/crud.feature Normal file
View File

@ -0,0 +1,45 @@
Feature: CRUD Operations on Records
Scenario Outline: Create a record with name "<name>", age <age>, and email "<email>"
Given the API is runing
When I create a record with name "<name>", age <age>, email "<email>"
Then the response status should be 201
And the response should contain an id
Examples:
| name | age | email |
| John Smith | 30 | john@example.com |
| Jane Doe | 25 | jane@example.com |
Scenario Outline: Get the record by ID after creation with name "<name>", age <age>, email "<email>"
Given the API is running
And I have a created record with name "<name>", age <age>, email "<email>"
When I get the record by ID
Then the response status should be 200
And the response should contain the correct data for name "<name>", age <age>, email "<email>"
Examples:
| name | age | email |
| Temp_Name | 25 | temp@example.com |
Scenario Outline: Update the record with name "<oldName>", age <oldAge>, email "<oldEmail>" to name "<newName>", age <newAge>, email "<newEmail>"
Given the API is running
And I have a created record with name "<oldName>", age <oldAge>, email "<oldEmail>"
When I update the record with name "<newName>", age <newAge>, email "<newEmail>"
Then the response status should be 200
And the response should contain updated true
Examples:
| oldName | oldAge | oldEmail | newName | newAge | newEmail |
| Temp_Name | 25 | temp@example.com | Jane Smith | 28 | jane@example.com |
Scenario Outline: Delete the record with name "<name>", age <age>, email "<email>"
Given the API is running
And I have a created record with name "<name>", age <age>, email "<email>"
When I delete the record by ID
Then the response status should be 200
And the response should contain deleted true
Examples:
| name | age | email |
| Temp_Name | 25 | temp@example.com |