Closed yangzhaoxia closed 10 years ago
Actually if you want to use some external library for jmeter plugin you must put it to dependency. Can you please add jmeterplugins-standard.jar as gradle dependency and try to rerun jmeter editor task?
I tried as below, still can't see the components from JMeter-pugins.
apply plugin: 'jmeter'
apply plugin: 'eclipse'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "com.github.kulya:jmeter-gradle-plugin:1.3.2-2.9"
classpath "kg.apc:jmeter-plugins:1.1.3"
}
}
jmeterRun.configure {
jmeterTestFiles = [file("src/jmeter/main.jmx")]
jmeterPropertyFile = file("src/jmeter/properties/jmeter.properties")
enableReports = "true"
reportDir = file ("build/jmeter-report")
}
jmeterEditor.configure {
jmeterPropertyFile = file("src/jmeter/properties/jmeter.properties")
}
Close it, because jmeterPluginJars can help specify the plugins included in the classpath. buildscript { repositories { mavenCentral() } dependencies { ... classpath "kg.apc:jmeter-plugins:1.1.3" classpath "kg.apc:jmeter-plugins-standard:1.1.3" } }
jmeterEditor.configure { jmeterPluginJars = ["jmeter-plugins-1.1.3.jar","jmeter-plugins-standard-1.1.3.jar"] jmeterPropertyFile = file("build/jmeter/bin/jmeter.properties") }
@yangzhaoxia
Hi, I'm having a very similar issue. How did you get this working? From what I can see the jmeter plugins (version 1.1.3) don't work with JMeter 2.9.
Below is my build.gradle:
apply plugin: 'java'
apply plugin: 'jmeter'
sourceCompatibility = 1.5
version = '1.0'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
//This JMeter plugin source code build depends on JMeter2.9 version.
compile 'org.apache.jmeter:ApacheJMeter_core:2.11'
compile 'org.apache.jmeter:ApacheJMeter_components:2.11'
compile 'org.apache.jmeter:ApacheJMeter_http:2.11'
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.kulya:jmeter-gradle-plugin:1.3.2-2.9'
classpath "kg.apc:jmeter-plugins:1.1.3"
classpath "kg.apc:jmeter-plugins-standard:1.1.3"
classpath "kg.apc:jmeter-plugins-extras:1.1.3"
classpath "kg.apc:jmeter-plugins-extras-libs:1.1.3"
classpath 'kg.apc:jmeter-plugins-common:1.1.3'
}
}
jmeterRun.configure {
jmeterTestFiles = [file("src/test/jmeter/test1.jmx")]
jmeterPluginJars = ["jmeter-plugins-1.1.3.jar","jmeter-plugins-standard-1.1.3.jar","jmeter-plugins-common-1.1.3.jar",
"jmeter-plugins-extras-1.1.3.jar","jmeter-plugins-extras-libs-1.1.3.jar", "jmeter-plugins-hadoop-1.1.3.jar"]
jmeterIgnoreFailure = false
reportDir ="" file("build/jmeter-report)
jmeterPropertyFile = file("src/test/jmeter/jmeter.properties")
}
jmeterEditor.configure {
jmeterPluginJars = ["jmeter-plugins-1.1.3.jar","jmeter-plugins-standard-1.1.3.jar","jmeter-plugins-common-1.1.3.jar",
"jmeter-plugins-extras-1.1.3.jar","jmeter-plugins-extras-libs-1.1.3.jar", "jmeter-plugins-hadoop-1.1.3.jar"]
jmeterIgnoreError = true
jmeterPropertyFile = file("src/test/jmeter/jmeter.properties")
}
Yes, that doesn't work to me. But at least jmeter-plugins-1.1.3.jar","jmeter-plugins-standard-1.1.3.jar" could work with Jmeter 2.9. The other 3 plugin jars may have problem with Jmeter 2.9.
Btw, the mainline code of Jmeter plugin has been updated to Jmeter 2.10 by my team, but Kulya didn't deploy it to maven. I built it by myself then other jmeter plugins can be applied.
Zhaoxia
From: philipbannon notifications@github.com<mailto:notifications@github.com> Reply-To: kulya/jmeter-gradle-plugin reply@reply.github.com<mailto:reply@reply.github.com> Date: Wed, 20 Aug 2014 08:20:22 -0700 To: kulya/jmeter-gradle-plugin jmeter-gradle-plugin@noreply.github.com<mailto:jmeter-gradle-plugin@noreply.github.com> Cc: Zhaoxia Yang Zhaoxia.Yang@blackboard.com<mailto:Zhaoxia.Yang@blackboard.com> Subject: Re: [jmeter-gradle-plugin] The GUI run by jmeterEditor can't display components from JMeter Plugins (#28)
@yangzhaoxiahttps://github.com/yangzhaoxia
Hi, I'm having a very similar issue. How did you get this working? From what I can see the jmeter plugins (version 1.1.3) don't JMeter 2.9.
Below is my build.gradle:
apply plugin: 'java' apply plugin: 'jmeter'
sourceCompatibility = 1.5 version = '1.0'
repositories { mavenCentral() }
dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' //This JMeter plugin source code build depends on JMeter2.9 version. compile 'org.apache.jmeter:ApacheJMeter_core:2.11' compile 'org.apache.jmeter:ApacheJMeter_components:2.11' compile 'org.apache.jmeter:ApacheJMeter_http:2.11' }
buildscript { repositories { mavenCentral() } dependencies { classpath 'com.github.kulya:jmeter-gradle-plugin:1.3.2-2.9' classpath "kg.apc:jmeter-plugins:1.1.3" classpath "kg.apc:jmeter-plugins-standard:1.1.3" classpath "kg.apc:jmeter-plugins-extras:1.1.3" classpath "kg.apc:jmeter-plugins-extras-libs:1.1.3" classpath 'kg.apc:jmeter-plugins-common:1.1.3' } }
jmeterRun.configure { jmeterTestFiles = [file("src/test/jmeter/test1.jmx")] jmeterPluginJars = ["jmeter-plugins-1.1.3.jar","jmeter-plugins-standard-1.1.3.jar","jmeter-plugins-common-1.1.3.jar", "jmeter-plugins-extras-1.1.3.jar","jmeter-plugins-extras-libs-1.1.3.jar", "jmeter-plugins-hadoop-1.1.3.jar"] jmeterIgnoreFailure = false reportDir ="" file("build/jmeter-report) jmeterPropertyFile = file("src/test/jmeter/jmeter.properties") }
jmeterEditor.configure { jmeterPluginJars = ["jmeter-plugins-1.1.3.jar","jmeter-plugins-standard-1.1.3.jar","jmeter-plugins-common-1.1.3.jar", "jmeter-plugins-extras-1.1.3.jar","jmeter-plugins-extras-libs-1.1.3.jar", "jmeter-plugins-hadoop-1.1.3.jar"] jmeterIgnoreError = true jmeterPropertyFile = file("src/test/jmeter/jmeter.properties") }
— Reply to this email directly or view it on GitHubhttps://github.com/kulya/jmeter-gradle-plugin/issues/28#issuecomment-52793663.
This email and any attachments may contain confidential and proprietary information of Blackboard that is for the sole use of the intended recipient. If you are not the intended recipient, disclosure, copying, re-distribution or other use of any of this information is strictly prohibited. Please immediately notify the sender and delete this transmission if you received this email in error.
@yangzhaoxia Thanks for the response. Any idea when the JMeter 2.10 will be deployed to Maven?
I know I could build it myself but my project gets built by Bamboo CI server so I'm sure how to pull build 2.10 with each release.
Once again thanks for the response!
@philipbannon, I don't have idea. @kulya needs to be touched.
Ok no problem thanks for the response @yangzhaoxia
@kulya any idea when the latest version will be pushed to maven?
I am using 1.3.2-2.9 and I put the latest JMeter Plugins jar file JMeterPlugins-Standard.jar under build/jmeter/lib/ext. My JMeter test file includes some components from JMeterPlugins-Standard.jar saying DummySampler, and the test can be run by jmeterRun although there is 1 ClassNotFoundException exception occurred. I checked the result file, DummySampler did get executed.
The problem is when I run jmeterEditor, why I can't see any components from JMeterPlugins. Is this an known issue? Exceptions is not only 1 like jmeterRun, instead, a lot of ClassNotFoundException as below:
I do have the JMeterPlugins Jar file under lib/ext:
Is this a defect of gradle jmeter plugin?