I'm running a test in Jmeter. that test sends in the end the status of the test - "success" or "fail". I've created a 'user defined variable' that is named 'subject' and assigned it with value 'success'. within the http requests I've put 'BeanShell Assertion' that assigns the 'subject' variable with 'failure' if the test failed:
if( (ResponseCode != null) && (ResponseCode.equals ("200") == false))
{
//Failure=true;
vars.put("subject","failure");
}
now, in the SMTP sampler I'm sending ${subject} as the subject of the mail.
the sampler doesn't recognise the variable (it is empty). any ideas?