diff --git a/build.gradle b/build.gradle index e697c31..216e1dc 100644 --- a/build.gradle +++ b/build.gradle @@ -5,13 +5,11 @@ apply plugin: 'signing' group = 'com.github.kulya' archivesBaseName = 'jmeter-gradle-plugin' /** - * Currently support JMeter version 2.6, 2.7, 2.8, 2.9, 2.10 + * Currently supports JMeter versions 2.9, 2.10, 2.11, 2.12, 2.13 */ -ext.jmeterVersion = "2.10" +ext.jmeterVersion = "2.13" version = "1.3.3-$jmeterVersion-SNAPSHOT" - - sourceCompatibility=JavaVersion.VERSION_1_6 targetCompatibility=JavaVersion.VERSION_1_6 @@ -25,31 +23,66 @@ repositories { } task wrapper(type: Wrapper) { - gradleVersion = '1.10' + gradleVersion = '2.3' +} + +configurations { + //workaround for jmeter defect 57555 (https://bz.apache.org/bugzilla/show_bug.cgi?id=57555) + if (jmeterVersion == '2.12'){ + compile.exclude group: 'excalibur-fortress' + } + //workaround for jmeter defect 57748 (https://bz.apache.org/bugzilla/show_bug.cgi?id=57748) + if (jmeterVersion == '2.13'){ + compile.exclude group: 'commons-math3' + compile.exclude group: 'commons-pool2' + } } dependencies { + + //common to all supported versions compile gradleApi(), - localGroovy(), - "org.apache.ant:ant:1.8.4", - "org.apache.jmeter:ApacheJMeter_http:${jmeterVersion}", + localGroovy(), + "org.apache.ant:ant:1.8.4", + "org.beanshell:bsh-core:2.0b4", + "org.apache.jmeter:ApacheJMeter_http:${jmeterVersion}", "org.apache.jmeter:ApacheJMeter_junit:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter_java:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter_report:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter_jdbc:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter_tcp:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter_mail:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter_ldap:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter_ftp:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter_functions:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter_monitors:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter_jms:${jmeterVersion}", - "org.apache.jmeter:ApacheJMeter:${jmeterVersion}", - "org.beanshell:bsh-core:2.0b4" + "org.apache.jmeter:ApacheJMeter_java:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_jdbc:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_tcp:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_mail:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_ldap:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_ftp:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_functions:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_monitors:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_jms:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_components:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_config:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_core:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_junit:${jmeterVersion}" + + + //version specific dependencies if (jmeterVersion > '2.7') { compile "org.apache.jmeter:ApacheJMeter_native:${jmeterVersion}" } - + if (jmeterVersion > '2.9'){ + compile "org.apache.jmeter:ApacheJMeter_mongodb:${jmeterVersion}" + } + if (jmeterVersion < '2.13'){ + compile "org.apache.jmeter:ApacheJMeter_report:${jmeterVersion}" + } + if (jmeterVersion > '2.9'){ + compile "org.apache.jmeter:ApacheJMeter_components:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_config:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_junit-test:${jmeterVersion}", + "org.apache.jmeter:ApacheJMeter_mongodb:${jmeterVersion}" + } + if (jmeterVersion == '2.13'){ + compile "org.apache.commons:commons-math3:3.4.1", + "org.apache.commons:commons-pool2:2.3" + } testCompile "junit:junit:4.11" } diff --git a/src/main/groovy/com/github/kulya/gradle/plugins/jmeter/worker/JMeterRunner.groovy b/src/main/groovy/com/github/kulya/gradle/plugins/jmeter/worker/JMeterRunner.groovy index 26f4e12..72a6796 100644 --- a/src/main/groovy/com/github/kulya/gradle/plugins/jmeter/worker/JMeterRunner.groovy +++ b/src/main/groovy/com/github/kulya/gradle/plugins/jmeter/worker/JMeterRunner.groovy @@ -10,13 +10,13 @@ class JMeterRunner { private final static Logger LOGGER = Logging.getLogger(JMeterRunner.class) void executeJmeterCommand(JmeterSpecs specs, String workingDirectory) { - ProcessBuilder processBuilder = new ProcessBuilder(createArgumentList(specs, workingDirectory)) + ProcessBuilder processBuilder = new ProcessBuilder(createArgumentList(specs, workingDirectory)).inheritIO() processBuilder.redirectErrorStream(true) processBuilder.directory(new File(workingDirectory)) Process p = processBuilder.start() int processResult = p.waitFor() if (processResult != 0) { - throw new GradleException("Something goes wrong when we execute jmeter test.... Please see jmeter logs for more information") + throw new GradleException("Something went wrong during jmeter test execution, Please see jmeter logs for more information") } } diff --git a/src/main/resources/saveservice.properties b/src/main/resources/saveservice.properties index e487e89..43c4e6f 100644 --- a/src/main/resources/saveservice.properties +++ b/src/main/resources/saveservice.properties @@ -1,5 +1,5 @@ #--------------------------------------------------------- -# SAVESERVICE PROPERTIES +# SAVESERVICE PROPERTIES - JMETER INTERNAL USE ONLY #--------------------------------------------------------- ## Licensed to the Apache Software Foundation (ASF) under one or more @@ -17,6 +17,11 @@ ## See the License for the specific language governing permissions and ## limitations under the License. +# This file is used to define how XStream (de-)serializes classnames +# in JMX test plan files. + +# FOR JMETER INTERNAL USE ONLY + #--------------------------------------------------------- # N.B. To ensure backward compatibility, please do NOT change or delete any entries @@ -30,7 +35,7 @@ # to reduce the likelihood of duplicates # # version number of this file (automatically generated by SVN) -_file_version=$Revision: 1519088 $ +_file_version=$Revision: 1656252 $ # # Conversion version (for JMX output files) # Must be updated if the file has been changed since the previous release @@ -46,8 +51,10 @@ _file_version=$Revision: 1519088 $ # 2.3 = 2.7 # 2.4 = 2.9 # 2.5 = 2.10 -# -_version=2.5 +# 2.6 = 2.11 +# 2.7 = 2.12 +# 2.8 = 2.13 +_version=2.8 # # # Character set encoding used to read and write JMeter XML files and CSV results @@ -72,8 +79,8 @@ AssertionVisualizer=org.apache.jmeter.visualizers.AssertionVisualizer AuthManager=org.apache.jmeter.protocol.http.control.AuthManager Authorization=org.apache.jmeter.protocol.http.control.Authorization AuthPanel=org.apache.jmeter.protocol.http.gui.AuthPanel -BarChart=org.apache.jmeter.testelement.BarChart -BarChartGui=org.apache.jmeter.report.gui.BarChartGui +BackendListener=org.apache.jmeter.visualizers.backend.BackendListener +BackendListenerGui=org.apache.jmeter.visualizers.backend.BackendListenerGui BeanShellAssertion=org.apache.jmeter.assertions.BeanShellAssertion BeanShellAssertionGui=org.apache.jmeter.assertions.gui.BeanShellAssertionGui BeanShellListener=org.apache.jmeter.visualizers.BeanShellListener @@ -101,11 +108,15 @@ Cookie=org.apache.jmeter.protocol.http.control.Cookie CookieManager=org.apache.jmeter.protocol.http.control.CookieManager CookiePanel=org.apache.jmeter.protocol.http.gui.CookiePanel CounterConfig=org.apache.jmeter.modifiers.CounterConfig +CriticalSectionController=org.apache.jmeter.control.CriticalSectionController +CriticalSectionControllerGui=org.apache.jmeter.control.gui.CriticalSectionControllerGui CounterConfigGui=org.apache.jmeter.modifiers.gui.CounterConfigGui CSVDataSet=org.apache.jmeter.config.CSVDataSet DebugPostProcessor=org.apache.jmeter.extractor.DebugPostProcessor DebugSampler=org.apache.jmeter.sampler.DebugSampler DistributionGraphVisualizer=org.apache.jmeter.visualizers.DistributionGraphVisualizer +DNSCacheManager=org.apache.jmeter.protocol.http.control.DNSCacheManager +DNSCachePanel=org.apache.jmeter.protocol.http.gui.DNSCachePanel DurationAssertion=org.apache.jmeter.assertions.DurationAssertion DurationAssertionGui=org.apache.jmeter.assertions.gui.DurationAssertionGui # Should really have been defined as floatProp to agree with other properties @@ -126,8 +137,6 @@ HeaderManager=org.apache.jmeter.protocol.http.control.HeaderManager HeaderPanel=org.apache.jmeter.protocol.http.gui.HeaderPanel HTMLAssertion=org.apache.jmeter.assertions.HTMLAssertion HTMLAssertionGui=org.apache.jmeter.assertions.gui.HTMLAssertionGui -HTMLReportWriter=org.apache.jmeter.report.writers.HTMLReportWriter -HTMLReportWriterGui=org.apache.jmeter.report.writers.gui.HTMLReportWriterGui HTTPArgument=org.apache.jmeter.protocol.http.util.HTTPArgument HTTPArgumentsPanel=org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel HTTPFileArg=org.apache.jmeter.protocol.http.util.HTTPFileArg @@ -167,6 +176,8 @@ JDBCPreProcessor=org.apache.jmeter.protocol.jdbc.processor.JDBCPreProcessor JDBCSampler=org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler # Renamed to JMSSamplerGui; keep original entry for backwards compatibility JMSConfigGui=org.apache.jmeter.protocol.jms.control.gui.JMSConfigGui +JMSProperties=org.apache.jmeter.protocol.jms.sampler.JMSProperties +JMSProperty=org.apache.jmeter.protocol.jms.sampler.JMSProperty JMSPublisherGui=org.apache.jmeter.protocol.jms.control.gui.JMSPublisherGui JMSSampler=org.apache.jmeter.protocol.jms.sampler.JMSSampler JMSSamplerGui=org.apache.jmeter.protocol.jms.control.gui.JMSSamplerGui @@ -191,8 +202,6 @@ LDAPExtSampler=org.apache.jmeter.protocol.ldap.sampler.LDAPExtSampler LdapExtTestSamplerGui=org.apache.jmeter.protocol.ldap.control.gui.LdapExtTestSamplerGui LDAPSampler=org.apache.jmeter.protocol.ldap.sampler.LDAPSampler LdapTestSamplerGui=org.apache.jmeter.protocol.ldap.control.gui.LdapTestSamplerGui -LineChart=org.apache.jmeter.testelement.LineChart -LineGraphGui=org.apache.jmeter.report.gui.LineGraphGui LogicControllerGui=org.apache.jmeter.control.gui.LogicControllerGui LoginConfig=org.apache.jmeter.config.LoginConfig LoginConfigGui=org.apache.jmeter.config.gui.LoginConfigGui @@ -240,10 +249,6 @@ RemoteListenerWrapper=org.apache.jmeter.samplers.RemoteListenerWrapper RemoteSampleListenerWrapper=org.apache.jmeter.samplers.RemoteSampleListenerWrapper RemoteTestListenerWrapper=org.apache.jmeter.samplers.RemoteTestListenerWrapper RemoteThreadsListenerWrapper=org.apache.jmeter.threads.RemoteThreadsListenerWrapper -ReportGui=org.apache.jmeter.control.gui.ReportGui -ReportPage=org.apache.jmeter.testelement.ReportPage -ReportPageGui=org.apache.jmeter.report.gui.ReportPageGui -ReportPlan=org.apache.jmeter.testelement.ReportPlan ResponseAssertion=org.apache.jmeter.assertions.ResponseAssertion RespTimeGraphVisualizer=org.apache.jmeter.visualizers.RespTimeGraphVisualizer ResultAction=org.apache.jmeter.reporters.ResultAction @@ -279,8 +284,6 @@ SwitchControllerGui=org.apache.jmeter.control.gui.SwitchControllerGui SyncTimer=org.apache.jmeter.timers.SyncTimer SystemSampler=org.apache.jmeter.protocol.system.SystemSampler SystemSamplerGui=org.apache.jmeter.protocol.system.gui.SystemSamplerGui -Table=org.apache.jmeter.testelement.Table -TableGui=org.apache.jmeter.report.gui.TableGui TableVisualizer=org.apache.jmeter.visualizers.TableVisualizer TCPConfigGui=org.apache.jmeter.protocol.tcp.config.gui.TCPConfigGui TCPSampler=org.apache.jmeter.protocol.tcp.sampler.TCPSampler @@ -375,4 +378,4 @@ _org.apache.jmeter.save.converters.TestResultWrapperConverter=collection _org.apache.jmeter.save.ScriptWrapperConverter=mapping # # Remember to update the _version entry -# +# \ No newline at end of file