Harinya
Harinya

Reputation: 191

Email Summary report after jmeter load test

I want to be able to email the summary report after the jmeter load test to '[email protected]'.

I'm running the jmeter load test from maven.

Any leads on this would be really helpful.

Thanks

Upvotes: 0

Views: 194

Answers (2)

Harinya
Harinya

Reputation: 191

I have added the maven-postman plugin to send an email.

<plugin>
            <groupId>ch.fortysix</groupId>
            <artifactId>maven-postman-plugin</artifactId>
            <version>0.1.6</version>
            <executions>
                <execution>
                    <id>send a mail</id>
                    <phase>package</phase>
                    <goals>
                        <goal>send-mail</goal>
                    </goals>
                    <inherited>false</inherited>
                    <configuration>
                        <from>[email protected]</from>
                        <subject>Load test Results</subject>
                        <failonerror>true</failonerror>
                        <mailhost>mail.abc.com</mailhost>
                        <receivers>
                            <receiver>[email protected]</receiver>
                        </receivers>
                        <fileSets>
                            <fileSet>
                                <directory>${basedir}/target/jmeter/results</directory>
                                <includes>
                                    <include>*.csv</include>
                                </includes>
                            </fileSet>
                        </fileSets>
                    </configuration>
                </execution>
            </executions>
        </plugin>

This worked for me.

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168157

  1. First of all you need to generate a summary report. I would recommend going for JMeterPluginsCMD Command Line Tool in conjunction with Maven Exec plugin, the command line would be something like:

    JMeterPluginsCMD.bat --generate-csv report.csv --input-jtl result.jtl --plugin-type SynthesisReport
    

    You can install JMeter Plugins Command Line Tool using JMeter Plugins Manager for ad-hoc usage or add it via JMeter Maven plugin like:

    <configuration>
        <jmeterExtensions>
            <artifact>kg.apc:jmeter-plugins-cmd:2.1</artifact>
        </jmeterExtensions>
    </configuration>
    
  2. Once done you should be able to send the generated report.csv using Maven Postaman Plugin

Upvotes: 1

Related Questions