Igor
Igor

Reputation: 7

Response assertion for the current date

I have the following response: -rw-r----- 1 www-data www-data 38269320 May 12 03:13 17003156.xml

And I want to create the response assertion that will check that there is current month and current date in the response (May 12). If I am using ${__time(MMM d,)} function for that, I am getting the following assertion error:

Assertion failure message: Test failed: text expected to contain /maijs 12

How is possible to set names of the months in English (like May) ?

If I am using ${__time(MMM d,)} function for that, I am getting name of the month in custom language.

Upvotes: 0

Views: 86

Answers (1)

Dmitri T
Dmitri T

Reputation: 168092

__time() function will return month name in your current locale.

The options are in:

More information on Groovy scripting in JMeter: Apache Groovy: What Is Groovy Used For?

Upvotes: 0

Related Questions