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)

Hi,

I was looking to run my Web Tests using JMeter and landed up here. I can see all the example projects are for API tests only. Has anyone ever tried this for Web Test?

I am getting below exception when I tried it for simple web test on “https://katalon-demo-cura.herokuapp.com”.

Exception -
java.nio.file.NoSuchFileException: /var/folders/21/wb8dlv592gx3yjgmqx2z66gc0000gn/T/Katalon/Test Cases/JMeter/20200804_115716/requests
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
at java.nio.file.FileTreeIterator.(FileTreeIterator.java:72)
at java.nio.file.Files.find(Files.java:3687)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.java:46)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:91)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
at com.katalon.jmeter.KatalonSampler.sample(KatalonSampler.groovy:90)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Thread.java:748)

Thanks.

1 Like

I have the same issue trying to generate an integration on jmeter in katalon,

Blockquote
20-09-04 15:23:36.817 INFO c.k.katalon.core.main.TestCaseExecutor - END CALL Test Cases/specific tests/jmeter_test
2020-09-04 15:23:36.817 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
java.nio.file.NoSuchFileException: C:\Users\DEVELO~1\AppData\Local\Temp\Katalon\Test Cases\specific tests\jmeter_integration\20200904_152301\requests
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
at sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:193)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
at java.nio.file.FileTreeIterator.(FileTreeIterator.java:72)
at java.nio.file.Files.find(Files.java:3687)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.java:46)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:91)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
at com.katalon.jmeter.KatalonSampler.sample(KatalonSampler.groovy:90)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Thread.java:748)
2020-09-04 15:23:36.980 ERROR o.a.jmeter.protocol.java.test.JavaTest - Main Thread Group 1-1@282308c3- testFailed: {}
java.nio.file.NoSuchFileException: C:\Users\DEVELO~1\AppData\Local\Temp\Katalon\Test Cases\specific tests\jmeter_integration\20200904_152301\requests

Blockquote

Hi a couple of simple but important questions,

  1. at the top of the page it says “Discontinued support of this plugin in version 7.0.0”, so it only the plug-in that is not supported, what about the manual method?

  2. Also, is the Plug-in Supported in any version after 7.0.0?

thanks
Ian

@duyluong
@Shin

any response?