Comments (4)
I think this looks good, but I don't think globMatcher
should be inferred. I think behind the scenes we should have something like:
requestMatchers.globMatcher("/api/*")
requestMatchers.exactMatcher("/api")
Then in the DSL, the argument can only take:
public void foo(final Matcher matcher)
public void foo(final String string) // Creates a exactMatcher internally
We also need to make sure to limit what's possible for each part of a request. So making it impossible to pass a jsonPath
matcher into the path
part of a request.
from hoverfly-java.
Hey @tommysitu,
This is a nice proposal. Regarding number 7
, Hoverfly works opposite to this. The absence of these fields means they are no checked. If you wanted to match a request with an empty body, you would need to specify the body, rather than leaving it out.
from hoverfly-java.
@benjih I was thinking if I write the following DSL:
service("www.test.com")
.get("/api/foo)
.willReturn(success())
I would expect it to match a simple get request with no body or query params.
If my code has a bug which sends unexpected query parameters, then my test should fail. It means that I shouldn't need to have .queryParams(empty())
explicitly. It's the default settings.
If I want to match the requests with any query parameters, then I will set queryParams(any())
in the DSL.
This is not how Hoverfly works, but I think it works better in the DSL.
from hoverfly-java.
Released as v0.6.0
from hoverfly-java.
Related Issues (20)
- Hoverfly has not become healthy in 10 seconds while running on an environment connected to a VPN HOT 13
- Awaitility untilAsserted does not work HOT 2
- Supporting using different json files in Class/SubClass HOT 3
- Update hoverfly to latest (1.3.1 as of now) instead of the currently bundled 1.1.5 HOT 3
- [0.14.0] Working directory doesn't seem to be relative to workspace directory HOT 16
- Allow Java API access to the DiffView objects from HoverflyClient.getDiffs()
- JSON files should have newline character at the end of the file HOT 2
- Xpath Function is not working HOT 1
- provide leIncrementalCapture feature in hoverfly-java-junit5
- Hoverfly 0.14.1 will not run after upgrading to org.springframework.boot 2.5.5 appears to be issue with "com.fasterxml.jackson.dataformat" HOT 4
- Request for Webflux WebClient not captured HOT 6
- Hoverfly doesnt import multiple simulation files. HOT 1
- Upgrade okhttp due to CVE 2021-0341 HOT 2
- no configuration method for listen-on-host functionality HOT 4
- Wrong binary selected on arch64 machine
- Certificate issue in simulating HTTPS Api HOT 1
- Array and jwt matchers fail with invalid memory address or nil pointer dereference HOT 9
- importing hoverfly breaks the spring webflux/spring cloud gateway project HOT 3
- Form RequestFieldMatcher can not be constructed from Simulation HOT 10
- Multiple mapping with anyBody depends on orders declaration HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hoverfly-java.