You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Andrey Botalov <bo...@gmail.com> on 2012/10/15 13:10:12 UTC
How to test that correct email messages were sent?
I have a performance test after execution of which some email messages
are sent to user's email. I'd want to verify that correct messages were
sent. Buy correctness I mean that they have correct|To:|and
|Subject:|headers
I added Mail Reader Sampler at the end of the plan. At the time of its
execution I have variables
|mail_1_subject|,|mail_2_subject_1|,|mail_2_subject_2|,
...,|mail_2_subject_N|set where N is stored in another
variable|mail_2_N|. I'd want to verify that sub-sample emails have
correct subjects. Subsamples may be received in another order than those
variables are set so I should search those sub-samples for presence of
those subjects.
I thought that I should add some Regular Expression Extractors each of
which with regex like|Subject: ${mail_2_subject_X}|and negative
reference counter. But I know number of messages to be sent only at
execution time, not at writing JMX stage. So I can't add those Regular
Expression Extractors.
So how can verify that correct messages were sent?