Lifecycle and Isolation
How a stub server is started, where it sits relative to the suite that needs it, and what is wiped between tests. Leaked stub state is a top cause of flaky suites.
on this pageshowhide
explore
- Hosting Shapes13 questions
- Standalone and Container5 questions
- Embedded Instances4 questions
- Shared CI Instances4 questions
- Fresh State per Test13 questions
- Teardown and Reset4 questions
- Admin Control Surface5 questions
- Ports and Parallel Workers4 questions
- Vendor-Operated Stand-Ins6 questions
- Payment and Partner Sandboxes3 questions
- Hosted Mock Services3 questions
questions
page 2 of 2When does WireMock standalone read the stub files under its root directory?
level: middleimportance: nice to knowfreq 46%
basics
~20 sThe read happens as the process starts: WireMock standalone builds its stub set from mappings and __files under the root directory. A file written afterwards is not served until a restart. Changing a running server is an admin API call.
How do you ship a WireMock stub set as a versioned artifact instead of a mounted directory?
level: seniorimportance: nice to knowfreq 36%
basics
~20 sPackage mappings and __files under one prefix inside a jar and put it on WireMock's launcher classpath. Start standalone with --load-resources-from-classpath naming that prefix. The set then travels as a versioned, published artifact rather than a bind mount.
showing 31–32 of 32