JMeter Integration


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/jmeter-integration.html

I am writing these steps for anyone trying to figure out how this plugin work on windows only. Still trying to figure out how it will work on MacOS.

Enabling JMeter-Integration:

- Install Jmeter plugin https://store.katalon.com/product/139/JMeter-Integration
- Reload plugins in Katalon
- Download sample project from here https://github.com/katalon-studio-samples/jmeter-integration-plugin-sample
- Create a new project or in existing project repository copy Jemeter-Properties from Jemeter sample project in to Include folder of your own project include folder. 
- Copy "include-->scripts--> groovy--> com.katalon.jmeter" from Jemeter sample project in to "include--> scripts" folder of your own project project. 

Test Case:

- Create a new test case
- import com.katalon.jmeter.KatalonJMeterRunner
- create script as in example below
		// create an action
		def testAction = {
			WebUI.callTestCase(findTestCase('Test Cases/REST examples/Simple examples/api-2-search/Search issues/Search issues by jql'),[('issue_key') : ''], FailureHandling.STOP_ON_FAILURE);
		}

		def sampler = CustomKeywords.'com.katalon.jmeter.JMeterKeyword.createSampler'(testAction);

		def runner = new KatalonJMeterRunner();
		/*	User can change following values which are set in script KatalonJMeterRunner.groovy by calling these values in script 
			NUM_LOOPS = 1;
			NUM_THREADS = 2;
			RAMP_UP = 1;
			DURATION = 10000;
		*/
		//you can cahnge the thread numbers. Default is 2. 
		runner.NUM_THREADS=10
		//you can cahnge the Loop numbers. Default is 1. 
		runner.NUM_Loops=10
		runner.run(sampler);
		
- run test 
- Jmeter reports can be found in C:\Users\<user name>\AppData\Local\Temp\Katalon\Test Cases\JMeter\

@hina-amir i got error message like this

i dunno how to solve this problem. can u help me?

@thomas.cornelius yes I’ve noticed it too yesterday when moved our testing from windows machine to MacOS. Still trying to figure out what’s wrong here. Not sure if this plugin is MacOS compatible or not?

Can the author of this article please explain this step?
Run the following command to download Jmeter dependencies: `gradle katalonCopyDependencies

here’s the sample of build.gradle file.


I changed the
id "com.katalon.gradle-plugin" version "0.0.4" to id "com.katalon.gradle-plugin" version "0.0.7"

@thomas.cornelius I tried this plugin on MAC OS and it worked.
I just created a build.gradle file (See my comments in docs discussion) and run step#2 mentioned here https://docs.katalon.com/katalon-studio/docs/jmeter-integration.html#use-jmeter-integration-plugin

  • then I copied Jemeter-Properties from Jemeter sample project in to Include folder of your own project include folder.
  • Copy "include–>scripts–> groovy–> com folder from Jemeter sample project in to “include–> scripts” folder of your own project project.

When I received the same message as you shared I just double clicked on it and it opened a file. I’ve removed the top blank lines and saved it.
It worked for me after that. So it means it works for Mac OS it’s just the little different way than we expected this plugin will work.

@hina-amir i already change gradle.build file and removed the top blank lines like u do. But other error is appeared. can u give me a simple jmeter test project for Mac OS to download. i hope that can help me to understand. Thanks

@thomas.cornelius I’ve managed to run sample project available on git hub few times on Mac OS. But I noticed the random issues around global variable class.

Few other points to consider too before you finalize the performance test solution. After almost 3 days of RnD It didn’t ended up as a suitable option for us in current scenario
Here are the points:

  • The plugin is flaky on Mac OS
  • From windows OS the project runs like a charm but the thread limitation on windows machine is one of the factor to consider.
  • If we want to run via CMD we need katalon runtime engine which is with 30 days trail period and will cost you around $500+
    Even if we buy the Runtime engine subscription the errors in katalon is not making it worth. We’ll be moving forward with Jmeter for now.

Thanks for the helpful feedback - I saw the plugin and thought it might be useful for those sites that have complicated authentication steps to navigate. Any thoughts on that side please?
I must admit, from the documentation available it is unclear how this works but I suppose the sample project may make things clearer. JMeter already gives the ability to run a selenium script as part of execution. Cheers Dan

The example doesn’t work directly with the JMeter plugin. Supposedly, there are 2 ways to run it: with the JMeter plugin or following the Gradle steps. Is there any extra step to do if I choose the plugin way? Any documentation to follow? Because this page is not enough. Thanks in advance

1 Like

I have tried to run an stress test using Jmeter standalone and using katalon plugin (same value for NUM_LOOPS, NUM_tHREADS, RAMP_UP and DURATION). However, with JMeter standalone I arrive to the stress point and getting error values which are correct; but the same example in Katalon with JMeter plugin doesn’t work: it’s never stressed and the results are always “OK”, which is not possible as I’m using same server and it should b stressed with that quentitty of requests. I would like to know if is there any example of 2020 project which works correctly to check if I’m setting something wrong or can someone help me?

Other question: the RAMP_UP and DURATION variables are in miliseconds or seconds?

Thanks in advance

I have web application test case. i able to integrate with Jmeter but my problem is that when i increase the users to more than 10 only 2 users run and the remaining users can’t proceed.
Is there any way i can get ride off that as i need to run the script using 500+ users

Noticed the same … looks like Jmeter execution from Katalon is not generating any load while from Jmeter itself getting different results. it would be intersting to engage network engineer to see the traffic during the load test from Katalon , I guess zero :slight_smile:

I’m looking to use the plugin to execute our existing Katalon scripts to performance test web and Windows client apps. Currently there is just not enough documentation for us to warrant this as a feasible solution.

Will there be further documentation provided?
Is this fully supported by Katalon, or is it just a pet project someone tried?
It looks as though the plugin may have evolved, but the documentation here has been left behind because the steps to get it working are not the steps used in the examples.

Currently when I execute the plugin against the test against the Katalon-jmeter-sample project, I get these errors:

07-03-2020 01:17:53 PM Test Cases/REST examples/Simple examples/api-2-search/Search issues/Search issues by jql

Elapsed time: 2.057s

Test Cases/REST examples/Simple examples/api-2-search/Search issues/Search issues by jql FAILED.
Reason:
groovy.lang.MissingMethodException: No signature of method: org.assertj.core.api.ObjectAssert.hasSize() is applicable for argument types: (java.lang.Integer) values: [15]
Possible solutions: hashCode(), asList(), hashCode(), has(org.assertj.core.api.Condition), asType(java.lang.Class)
at Search issues by jql.run(Search issues by jql:15)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1593778671725.run(TempTestCase1593778671725.groovy:25)