Reputation: 2580
From the docs:
To read the body content from a file, place the file under the __files directory. By default this is expected to be under src/test/resources when running from the JUnit rule. When running standalone it will be under the current directory in which the server was started. To make your stub use the file, simply call bodyFile() on the response builder with the file’s path relative to __files:
Is it possible to change it? Why would WireMock insist on this specific directory?
Upvotes: 5
Views: 10597
Reputation: 7164
WireMock insists on that specific directory because it has to have some specific directory.
If you want to change it, you can do so. Check out the File Locations
section under the configuration documentation.
Upvotes: 8