[feature request] Support for `#notpresent` keyword
See original GitHub issueUse case: I’m writing tests for Spring Boot Repository. It supports “projections” so user can request different detalization, e.g.
- “default” projection: Fields A,B,C
- “more-data” projection: Fields A,B,C and array D (it is loaded from separate table)
- “complete-data” projection: Fields A,B,C and arrays D,E,F,G (each is loaded from separate table)
I cannot check contains/!contains with single JSON so right now my tests look like
Scenario "default"
<request>
then match response contains
"""
{
A : '#string',
B : '#string' ,
C : '#string'
}
"""
and match response !contains
"""
{
D : '#array',
E : '#array',
F : '#array',
G : '#array'
}
"""
Scenario "more-data"
<request>
then match response contains
"""
{
A : '#string',
B : '#string' ,
C : '#string',
D : '#array'
}
"""
and match response !contains
"""
{
E : '#array',
F : '#array',
G : '#array'
}
"""
Scenario "complete-data"
<request>
then match response contains
"""
{
A : '#string',
B : '#string' ,
C : '#string',
D : '#array',
E : '#array',
F : '#array',
G : '#array'
}
"""
With new keyword added my scenarios will be cleaner and easier to read
Scenario "default"
<request>
then match response contains
"""
{
A : '#string',
B : '#string' ,
C : '#string'
D : '#undefined',
E : '#undefined',
F : '#undefined,
G : '#undefined'
}
"""
Scenario "more-data"
<request>
then match response contains
"""
{
A : '#string',
B : '#string' ,
C : '#string',
D : '#array',
E : '#undefined',
F : '#undefined,
G : '#undefined'
}
"""
Scenario "complete-data"
<request>
then match response contains
"""
{
A : '#string',
B : '#string' ,
C : '#string',
D : '#array',
E : '#array',
F : '#array',
G : '#array'
}
"""
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (10 by maintainers)
Top Results From Across the Web
[feature request] Support for #notpresent keyword #270 - GitHub
Use case: I'm writing tests for Spring Boot Repository. It supports "projections" so user can request different detalization, e.g. "default" ...
Read more >How to say no to product feature requests - Canny Blog
Figuring out how to say “no” to a customer is never easy. It's especially hard to say no to product feature requests. Many...
Read more >Karate | Test Automation Made Simple.
Karate is the only open-source tool to combine API test-automation, mocks, performance-testing and even UI automation into a single, unified framework.
Read more >`.gitlab-ci.yml` keyword reference - GitLab Docs
A public URL accessible by an HTTP/HTTPS GET request: Authentication with the remote URL is not supported. The YAML file must have the...
Read more >Feature suggestions & requests - Skylum Community
Help us understand what you need most - share your detailed use cases and upvote other users' suggestions to inform the Skylum Product...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree, Karate tests output/protocol not how this output could be interpreted by consumer
@Shaileshz204 use stack overflow for questions like this please: https://stackoverflow.com/a/71522605/143475