Brandon Trautmann
09/06/2023, 4:13 PMmappings/
). Is this expected? Are we just making an incorrect assumption that a new instance should be able to pick up existing mappings?Tom
09/06/2023, 4:15 PMBrandon Trautmann
09/06/2023, 4:17 PM<http://localhost:57247/__admin/recordings/start>
with a body of:
{
"targetBaseUrl": "<https://our.domain>",
"captureHeaders": {
"test-id": {}
},
"persist": true
}
and stopping it via a POST
request to <http://localhost:57247/__admin/recordings/stop>
The mappings directory does have mappings in it (14 total)3.0.0
(downloaded on Friday last week)NeverStarted
status back from recordings/status
even though we’ve previously recorded (on a different instance start). I figure that’s expected, but wanted to call it out in case it’s not!__files
directory
Edit: I do see one now that I started the instance again, but it’s empty even after shutting down. mappings/
is still non-empty though.Tom
09/06/2023, 4:59 PMmappings
and __files
(which must be siblings of each other).
If you don’t explicitly set this via root-dir
it’ll be whatever directory you ran the JAR file from.Brandon Trautmann
09/06/2023, 4:59 PMroot-dir
option, neither work 😞wiremock/
wiremock/jar
wiremock/mappings/
wiremock/__files/
Tom
09/06/2023, 5:00 PMBrandon Trautmann
09/06/2023, 5:01 PMroot-dir
with a fully qualified path and with relative (.
) but when using the former, it actually creates directories corresponding to the fully qualified path from the directory where the jar is 🙃Tom
09/06/2023, 6:13 PMwiremock
folder, then run:
java -jar jar/wiremock-standalone-3.0.0.jar
does this still not work?Brandon Trautmann
09/06/2023, 6:14 PMjar
I meant that’s the actual standalane jar (not i directory)mappings/
and __files
wiremock/standalone.jar
wiremock/root/
wiremock/root/mappings
wiremock/root/__files
and passing root
as root-dir
, but no luck there either. I tested that because I noticed the restrictions around loading resources from root of the classpath when trying to bundle stubs with the jar, so figured maybe the mappings and stuff couldn’t be a sibling of the jar itselfTom
09/06/2023, 8:33 PMBrandon Trautmann
09/06/2023, 8:58 PMcurl
or similar and not run the Flutter app):
1. The jar and mappings
are in server/
directory
2. We’re running on port 57247
3. The endpoint that has a recording is <http://localhost:57247/todos/1>
(which is what the app is hitting when you tap the button)POST
request I mentioned earlier and the following body:
{
"targetBaseUrl": "<https://jsonplaceholder.typicode.com>",
"captureHeaders": {
"maestro-test-id": {}
},
"persist": true
}
That captureHeaders
block is being used in our app but is not technically needed for the repro app. I just left it there in case it matters.Tom
09/06/2023, 9:04 PMBrandon Trautmann
09/06/2023, 9:13 PMmv todos_1-4d6cf6d4-9172-4027-b00d-5673e990b0e1 todos_1-4d6cf6d4-9172-4027-b00d-5673e990b0e1.json
fixes the issue!Tom
09/06/2023, 9:23 PMBrandon Trautmann
09/07/2023, 10:09 AM