Hi Erez,
I created a gradle project long a go that walked through JMX tests..
and had Jenkins run the Gradle project.
A similar thing could be done with Maven - but as you will see below. This is
VERY simple and effective.
apply plugin: 'jmeter'
<>
<>
<>/*
<> * We expect a property for the environment -
<> *
<> * $ ./gradlew -Penvironment=T1 jmeterRun
<> *
<> * Supported is T1, T2 and T3
<> * An equivalent file is loaded as the JMeter Properties file:
<> *
<> * src/test/jmeter/common/T1-environment.properties
<> *
<> */
<>
<>task wrapper(type: Wrapper) {
<> gradleVersion = '1.12'
<>}
<>
<>buildscript {
<> repositories {
<> mavenCentral()
<> }
<> dependencies {
<> classpath "com.github.kulya:jmeter-gradle-plugin:1.3.2-2.9"
<> classpath 'org.codehaus.groovy:groovy-all:2.2.2'
<> classpath "net.sourceforge.jtds:jtds:1.3.1” // for database
connectivity
<> }
<>}
<>
<>
<>jmeterRun.configure {
<>
<> jmeterPropertyFile =
file(file("src/test/jmeter/common/${environment}-environment.properties").absolutePath)
<>
<> reportPostfix = "-${environment}-jmeterRun-report.html"
<>
<> // if you omit jmeterTestFiles, the plugin will run ALL JMX Files. but we
don't want that
<> jmeterTestFiles = [
<> // file("src/test/jmeter/systemx/SYS.X.DoSomePerfTest.jmx")
<> file("src/test/jmeter/systemy/SYS.Y.SimulateWidgetMovement.jmx"),
<> file("src/test/jmeter/systemy/SYS.Y.E2EFullIntegTest.jmx"),
<> file("src/test/jmeter/systemy/SYS.Y.MaxConnectLimit.jmx")
<> ]
<>
<>}
> On 21 May 2015, at 14:13, Erez Naim <[email protected]> wrote:
>
> Hey all guys and Jmeter Gurus!
>
> I am wonder if someone here succeeded in setting Jenkins work together with
> Jmeter and if so how did you do that, I've installed successfully Jenkins and
> Maven as well as creating pom.xml file but somehow I cannot integrate it
> together I have read a guide how to integrate it
> But I got the following error:
>
> A problem occurred while processing the request. Please check our bug tracker
> <https://issues.jenkins-ci.org/> to see if a similar problem has already been
> reported. If it is already reported, please vote and put a comment on it to
> let us gauge the impact of the problem. If you think this is a new issue,
> please file a new issue. When you file an issue, make sure to add the entire
> stack trace, along with the version of Jenkins and relevant plugins. The
> users list <http://jenkins-ci.org/content/mailing-lists> might be also useful
> in understanding what has happened.
>
> Stack trace
>
> javax.servlet.ServletException: java.lang.RuntimeException: Failed to
> instantiate class hudson.plugins.performance.PerformancePublisher from
> {"parsers":{"glob":"**/*.jtl","kind":"hudson.plugins.performance.JMeterParser$DescriptorImpl"},"modeOfThreshold":"true","errorUnstableThreshold":"","errorFailedThreshold":"","errorUnstableResponseTimeThreshold":"","relativeUnstableThresholdNegative":"2","relativeUnstableThresholdPositive":"5","relativeFailedThresholdNegative":"2","relativeFailedThresholdPositive":"5","compareBuildPrevious":"false","nthBuildNumber":"","comparisonType":"ART","modePerformancePerTestCase":true,"modeThroughput":false,"stapler-class":"hudson.plugins.performance.PerformancePublisher","$class":"hudson.plugins.performance.PerformancePublisher"}
> at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
> at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
> at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
> at
> org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
> at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
> at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
> at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
> at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
> at
> hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:123)
> at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:114)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
> at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
> at
> hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
> at
> hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
> at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
> at
> org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
> at
> hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
> at
> org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> at org.eclipse.jetty.server.Server.handle(Server.java:370)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:701)
> Caused by: java.lang.RuntimeException: Failed to instantiate class
> hudson.plugins.performance.PerformancePublisher from
> {"parsers":{"glob":"**/*.jtl","kind":"hudson.plugins.performance.JMeterParser$DescriptorImpl"},"modeOfThreshold":"true","errorUnstableThreshold":"","errorFailedThreshold":"","errorUnstableResponseTimeThreshold":"","relativeUnstableThresholdNegative":"2","relativeUnstableThresholdPositive":"5","relativeFailedThresholdNegative":"2","relativeFailedThresholdPositive":"5","compareBuildPrevious":"false","nthBuildNumber":"","comparisonType":"ART","modePerformancePerTestCase":true,"modeThroughput":false,"stapler-class":"hudson.plugins.performance.PerformancePublisher","$class":"hudson.plugins.performance.PerformancePublisher"}
> at hudson.model.Descriptor.newInstance(Descriptor.java:579)
> at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:929)
> at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:903)
> at hudson.util.DescribableList.rebuildHetero(DescribableList.java:208)
> at hudson.model.Project.submit(Project.java:236)
> at hudson.model.Job.doConfigSubmit(Job.java:1206)
> at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:788)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:622)
> at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
> at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
> at
> org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
> at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
> at
> org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
> at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
> anybody bump into this problem?
>
> Do you what to do ? I am going nuts since there is no way for me to set it
> up… any help would be appreciated!
>
> Thanks!
>
> Erez Naim | QA Lead |
> <http://www.linkedin.com/profile/view?id=34323263>
> <http://www.theneura.com/vCards/gilad.vcf>
> <http://twitter.com/#!/giladmeiri/>
>
>
>
> EL AL 2 Street | Herzliya
> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>
> website <http://www.theneura.com/> | blog <http://www.startupbitz.com/> |
> twitter <https://twitter.com/intent/user?screen_name=theneura> | map
> <http://goo.gl/maps/ZRkg5>