feat(testCucumberDeleteUser): add tests cucumber delete user#76
Merged
Conversation
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Cucumber-based integration test coverage for the DELETE /random-users/{id} endpoint within the existing Cucumber test suite (src/test/java/feature + src/test/resources/features).
Changes:
- Introduces
delete_user.featurewith scenarios for deleting an existing user and attempting to delete a non-existent user. - Adds new Cucumber step definitions to issue DELETE requests (by explicit ID or by previously created ID).
- Extends the shared integration test base with an
executeDelete(...)helper usingTestRestTemplate.exchange.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/test/resources/features/delete_user.feature | Adds new DELETE endpoint scenarios and status code assertions. |
| src/test/java/feature/StepDefinition.java | Adds @When steps to call DELETE endpoints (including deleting the created user). |
| src/test/java/feature/SpringIntegrationTest.java | Adds executeDelete helper and imports HttpMethod. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
profotoce59
approved these changes
Apr 21, 2026
MayuriXx
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





This pull request adds integration test support for the DELETE user endpoint, enabling automated testing of user deletion scenarios. The changes include new step definitions, test utility methods, and a feature file with scenarios for deleting users.
Integration test support for DELETE user endpoint:
delete_user.featurecovering scenarios for deleting a user by ID, including both successful deletion and deletion of a non-existent user.StepDefinition.javato handle DELETE requests for specific users and the most recently created user.executeDeletehelper method toSpringIntegrationTest.javato facilitate sending DELETE HTTP requests in tests.HttpMethodto support the new DELETE request method.