Jmeter Integration with Octopus

(R Chandriker) #1

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.

(Shawn Sesna) #3

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 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.

(R Chandriker) #4

Hello @Shawn_Sesna,

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

Raju Chandriker

(Mark Bradley) #5

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.

(Shawn Sesna) #6

Thanks @Mark_Bradley!

(R Chandriker) #7

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:

(Shawn Sesna) #8

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

(R Chandriker) #9

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.

Raju Chandriker

(Shawn Sesna) #10

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

(R Chandriker) #11

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 ??

Raju Chandriker

(Shawn Sesna) #12

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

(R Chandriker) #13

Yes, we can configure the duration of the test.

(Shawn Sesna) #14

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?

(R Chandriker) #15

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.

(Shawn Sesna) #16

@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 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
(R Chandriker) #17

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

(Shawn Sesna) #18

Glad to help :slight_smile: