Jmeter Integration with Octopus

Hi All,

We are trying to integrate the JMeter test as part of the octopus release, we could not able to find any extension to call the Jmeter Test.

Can anyone suggest, how we can call the Jmeter test and publish the results?

Also how we can make the build Pass/Fail?

Many thanks in advance.

1 Like

Greetings RChandriker, thanks for reaching out :slight_smile: Until today, I’d not heard of JMeter, lol! While there doesn’t appear to be any step templates that work with this specific technology, I did find http://performancewebautoamtionother.blogspot.com/2015/12/powershell-execute-jmeter-tests-nongui.html which shows how to call it using PowerShell. You could try something like this from a Run a Script task. Let me know if this will not work for you.

Hello @Shawn_Sesna,

Thanks for the update, definitely I will try to integrate using PowerShell and update you back.

Thanks,
Raju Chandriker

I’ve integrated Jmeter test into our deployment process, and execute the .jmx file from powershell on the Octopus Server. We specify the test results get passed in a .csv file in the command line arguments as well.

Once the test are done, we parse the .csv in a subsequent step, and filter out the test that failed using Powershell. If the test that fail are greater than 0, the script returns 1 and the deployment fails.

Hope this helps.

Thanks @Mark_Bradley!

Thanks @Mark_Bradley.

We are trying other approach as we are using bamboo - octopus for build and deployment.

In bamboo I will use the plugin of JMeter to trigger the test and call this build in the octopus whenever we required.

Hoping to see some positive results :):grinning:

Thought I would check in to see if you’d made some progress?

Hi @Shawn_Sesna,

Hope you are doing good :slight_smile:

Yes, we can trigger the test from octopus using PowerShell script, but the challenge here is how can we make a performance test as pass/fail automatically.

How to emulate manual analysis for performance test results to decide whether code can move to production or not ??

Could you please suggest me on this.

Thanks,
Raju Chandriker

When you trigger it from PowerShell is there something that is returned that you can test whether to fail the deployment or not?

Hi @Shawn_Sesna,

Yes, you are right Powershell will return the test status as pass even when transactions are breaching the SLA (Service level agreement).
How we can make decision-based on the test results comparing response time, error rate as well as the health of the server ??

Thanks,
Raju Chandriker

Within JMeter, is there a way to specify the maximum length of time a test has to complete?

Yes, we can configure the duration of the test.

Thank you for providing that information :slight_smile: If I’m understanding correctly, your saying that the test is still passing even if it exceeds the maximum time limit?

No @Shawn_Sesna, it’s not the problem with test duration.

I am thinking of how we can analyze the test results and make the decision automatically.

@Mark_Bradley gave his solution where the results are passed to a CSV file in the command line arguments. Once the tests are completed, they parse the CSV file to filter out failing tests, if the number of tests that haved are greater than 0 the deployment fails. Using https://octopus.com/docs/deployment-examples/custom-scripts/error-handling you can see what type of method works best for you as to how to fail the deployment.

  • use a throw statement
  • use the Write-Error
  • use the Fail-Step

Thank you @Shawn_Sesna for the input :slight_smile:

I will try to incorporate these error handling options and let’s see the output :slight_smile:

Thanks for your support @Shawn_Sesna

Glad to help :slight_smile:

Hi RChandriker,
We are also trying the same, need to integrate JMETER into Octopus.
Can you suggest, what is initial setup/path/installation needed on which machines?

Regards,
Pradeep Tiwari

Hey there Pradeep! Are asking about the setup of Octopus or JMeter?

I have both Octopus and JMETER installed on different server/boxes.
Just wanted to know how can I run my JMETER performance testing scripts from Octopus.

BR,
Pradeep Tiwari