.contextFactory(classOf[org.apache.activemq.jndi.ActiveMQInitialContextFactory].getName)
.listenerCount(1)
.usePersistentDeliveryMode
val scn = scenario("JMS DSL test").repeat(0) {
exec(
jms("req reply testing").reqreply
.queue("queueName")
.replyQueue("responseQueue")
.textMessage("hello from gatling jms dsl")
.property("test_header", "test_value")
.check(simpleCheck(checkBodyTextCorrect)))
}
setUp(scn.inject(rampUsersPerSec(10) to 1000 during (10 seconds)))
.protocols(jmsConfig)
def checkBodyTextCorrect(m: Message) = {
m match {
case tm: TextMessage => tm.getText == "HELLO FROM GATLING JMS DSL"
case _ => false
}
}
}
logs:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building gatling-maven-plugin-demo 2.1.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- gatling-maven-plugin:2.1.1:execute (default-cli) @ gatling-maven-plugin-demo ---
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/x/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/x/.m2/repository/org/apache/activemq/activemq-all/5.8.0/activemq-all-5.8.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See
http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
12:15:52,000 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
12:15:52,000 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/C:/opt/scala_workspace/gatling-maven-plugin-demo/target/test-classes/logback-test.xml]
12:15:52,001 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback-test.xml] occurs multiple times on the classpath.
12:15:52,001 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback-test.xml] occurs at [file:/C:/opt/scala_workspace/gatling-maven-plugin-demo/target/test-classes/logback-test.xml]
12:15:52,001 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback-test.xml] occurs at [file:/C:/opt/scala_workspace/gatling-maven-plugin-demo/src/test/resources/logback-test.xml]
12:15:52,090 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
12:15:52,102 |-INFO in ch.qos.logback.classic.joran.action.LoggerContextListenerAction - Adding LoggerContextListener of type [ch.qos.logback.classic.jul.LevelChangePropagator] to the object stack
12:15:52,128 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@37fcdbc5 - Propagating DEBUG level on Logger[ROOT] onto the JUL framework
12:15:52,128 |-INFO in ch.qos.logback.classic.joran.action.LoggerContextListenerAction - Starting LoggerContextListener
12:15:52,128 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
12:15:52,131 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
12:15:52,140 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
12:15:52,197 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN
12:15:52,197 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@37fcdbc5 - Propagating WARN level on Logger[ROOT] onto the JUL framework
12:15:52,197 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE] to Logger[ROOT]
12:15:52,198 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
12:15:52,200 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@39c07f3a - Registering current configuration as safe fallback point
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
Simulation computerdatabase.JMS10k started...
================================================================================
2014-12-29 12:15:54 0s elapsed
---- JMS DSL test --------------------------------------------------------------
[ ] 0%
waiting: 5050 / active: 0 / done:0
---- Requests ------------------------------------------------------------------
> Global (OK=0 KO=0 )
================================================================================
================================================================================
2014-12-29 12:15:59 5s elapsed
---- JMS DSL test --------------------------------------------------------------
[################# ] 23%
waiting: 3860 / active: 0 / done:1190
---- Requests ------------------------------------------------------------------
> Global (OK=0 KO=0 )
================================================================================
================================================================================
2014-12-29 12:16:04 10s elapsed
---- JMS DSL test --------------------------------------------------------------
[###################################################################### ] 95%
waiting: 243 / active: 0 / done:4807
---- Requests ------------------------------------------------------------------
> Global (OK=0 KO=0 )
================================================================================
================================================================================
2014-12-29 12:16:04 10s elapsed
---- JMS DSL test --------------------------------------------------------------
[##########################################################################]100%
waiting: 0 / active: 0 / done:5050
---- Requests ------------------------------------------------------------------
> Global (OK=0 KO=0 )
================================================================================
Simulation finished
12:16:04.294 [ERROR] i.g.j.JmsReqReplyAction - java.lang.InterruptedException
Parsing log file(s)...
Parsing log file(s) done
Generating reports...
java.lang.reflect.InvocationTargetException
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:601)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.UnsupportedOperationException: There were no requests sent during the simulation, reports won't be generated
at io.gatling.charts.report.ReportsGenerator$.generateFor(ReportsGenerator.scala:45)
at io.gatling.app.Gatling.generateReports(Gatling.scala:192)
at io.gatling.app.Gatling.start(Gatling.scala:82)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:59)
at io.gatling.app.Gatling$.main(Gatling.scala:44)
at io.gatling.app.Gatling.main(Gatling.scala)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.154 s
[INFO] Finished at: 2014-12-29T12:16:05+01:00
[INFO] Final Memory: 7M/240M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:2.1.1:execute (default-cli) on project gatling-maven-plugin-demo: Gatling failed. Process exited with an error: -1 (Exit value: -1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionExceptionon the simulation.log:
computerdatabase.JMS10k jms10k RUN 1419852022093 2.0
JMS DSL test 2483206286430220603-0 USER START 1419852022188 0
JMS DSL test 2483206286430220603-0 USER END 1419852022188 1419852022210
(...)
JMS DSL test 2483206286430220603-5048 USER START 1419852032401 0
JMS DSL test 2483206286430220603-5048 USER END 1419852032401 1419852032401
JMS DSL test 2483206286430220603-5049 USER START 1419852032401 0
JMS DSL test 2483206286430220603-5049 USER END 1419852032401 1419852032401
Thank you.