I have a Jmeter script which follows the following steps 1. registers user 2. Reads email using Mail Reader Sampler which has following script
StringBuilder aggregateResult = new StringBuilder()
prev.getSubResults().each {
aggregateResult.append(it.getResponseDataAsString())
it.getSubResults().each {
aggregateResult.append(it.getResponseDataAsString())
it.getSubResults().each {
aggregateResult.append(it.getResponseDataAsString())
}
}
}
prev.setResponseData(aggregateResult.toString().getBytes())
- Then extracts a particular link based on regexp.
As of now, it reads either the latest email or all the unread emails in the server. Can someone please help me to modify the above script to read the message based on the user email created at step 1? Emails are created like test+1@gmail.com, test+2@gmail.com and so on.