https://linen.dev logo
#help
Title
# help
r

Rohan Kudale

03/18/2024, 2:09 PM
Hi All, Can someone please help me out in Wiremock stub with XML responses. We are trying to add some Random string or current date in a XML Response which needs to be generated once the stub is hit i.e. no fixed value should be there. For example: test date_Current System date +2 daysdate_ __token_GenerateRandomString with length of 5-15 chars_/token /test
l

Lee Turner

03/18/2024, 6:54 PM
Hi, you will need to enable response templating and then use the random data and date/time helpers to add data to your xml response: • https://wiremock.org/docs/response-templating/#random-value-helperhttps://wiremock.org/docs/response-templating/#date-and-time-helpers
2 Views