Open
Conversation
gauravsrai
commented
Dec 14, 2022
- Implementation done for Api test on Fetch posts and comments for user id 1
- Implementation done for work flow test on creating and editing the same post
- Here I used json file to pass the details to edit the post
1.Changes are made in assignment 1 and 3
1. Separated JSON file based on Api request 2. Changes done based on the PR comments
mshahrukh2
reviewed
Dec 19, 2022
|
|
||
| @jsonPlaceHolder | ||
| Scenario: Fetch all the posts | ||
| * def userResponse = karate.call('classpath:com/znsio/templates/fetchingUserDetailsJsonPlaceHolder.feature@t_getPost', {userId:userid}).listOfPosts |
There was a problem hiding this comment.
userResponse name is incorrect. Its not reflecting what it contains.
| @jsonPlaceHolder | ||
| Scenario: Fetch all the posts | ||
| * def userResponse = karate.call('classpath:com/znsio/templates/fetchingUserDetailsJsonPlaceHolder.feature@t_getPost', {userId:userid}).listOfPosts | ||
| * print userResponse |
| * match userResponse.id == '#number' | ||
| * match userResponse.name == '#string' | ||
| * match userResponse.email == '#string' | ||
| * match userResponse.body == '#string' |
There was a problem hiding this comment.
For both Posts and Comments API tests are missing. Try out all valid and invalid scenarios to achieve good test coverage!.
| @@ -0,0 +1,50 @@ | |||
| Feature: Fetching user details | |||
There was a problem hiding this comment.
Feature description is not appropriate. It should reflect overall what is there in this template feature.
|
|
||
|
|
||
|
|
||
| #Reffference |
| * match userPosts.responseStatus == <status> | ||
| * match each userPosts.response[*] == <schema> | ||
| * match each userPosts.response[*].id == <id> | ||
| #increase test coverage (add id also in examples section) |
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.