Comments (3)
Hi @patown, that's a very useful scenario which I haven't thought of. I guess you want logonRule
to be invoked on all the subclasses, and then every subclass has a specific simulation too.
The current hoverfly-java doesn't support it, but it's doable, as hoverfly already has a REST API for combining simulations (https://docs.hoverfly.io/en/latest/pages/reference/api/api.html#post-api-v2-simulation), that leaves us to make some tweaks in the library to support it.
It's not going to have multiple hoverfly rules though, one hoverfly per test is recommended to avoid conflicts in proxy config. So something like this:
Public class TestBase() {
@ClassRule
public static HoverflyRule baseRule = HoverflyRule.inCaptureOrSimulationMode("logon.json");
}
public class TestA extends TestBase {
// Setup
baseRule.captureOrSimulate("TestA.json", ImportMode.APPEND);
}
public class TestB extends TestBase {
// Setup
baseRule.captureOrSimulate("TestB.json", ImportMode.APPEND);
}
from hoverfly-java.
from hoverfly-java.
How can we do this in Junit5 ?
baseRule.captureOrSimulate("TestA.json", ImportMode.APPEND);
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
- 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.