This document contains and explains the jMeter configuration used to test a SAP SMTP service.

  • The configuration of the service can be found here
  • The telnet test case here and
  • The jMeter test case here.

As the last blog describes a jMeter scenario, I am publishing here the example files used by jMeter. This should help everyone to create his/her own jMeter test.

Files

2 files are attached to this document:

  • Input.txt
  • SAP SMTP.jmx

Please not that you have to rename the file SAP SMTP.txt to SAP SMTP.jmx (thanks Jive) and to adjust the actual path of the SMTP sampler to make the test case work for you. After all, I am providing here an example, not a ready to use version.

Test plan

The test plan SAP SMTP.jmx consists of one thread group, one config element and one SMTP sampler. In JMeter it looks like this:

/wp-content/uploads/2013/11/jmeterconf1_324068.jpg

The test plan is parameterized. A file named input.txt contains the values for the parameters. The content of the file looks like:

Test Subject 1;lorem ipsum 1;

There are 3 columns, separated by ; Each column represents a value for a variable:

  • Test Subject 1: Subject line
  • Lorem ipsum: Message body
  • 94: number for attachment to be included in the email

The variables are defined in the jMeter test. To read the values of the input.txt file, a CSV Data Set Config element is added to the test case.

/wp-content/uploads/2013/11/jmeterconf2_350983.jpg

3 variables are defined:

  • Subject
  • Message
  • Number

The actual test case is defined in the SMTP sampler. This sampler contains the SAP SMTP server connection data:

  • Server
  • Port
  • Mail from
  • Mail to

These values are hard coded and have to be changed to match your actual environment.

/wp-content/uploads/2013/11/jmeterconf3_351017.jpg

The second configuration part of the test case is the actual message to be send and makes use of the previous defined parameters.

/wp-content/uploads/2013/11/jmeterconf4_351018.jpg

The subject line, the message body and the attachment are parameterized. That is where the input and variables are linked together. While the subject and message are fully defined by the parameter, the attachment expects a PDF file in the jMeter bin directory of the form message-${number}.pdf. You’ll have to make sure a PDF file with the name message-NN.pdf is there, while NN is a number like 01, 95, etc. The number value must match the entry in the input.txt file.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply