Tinkoff / gatling-amqp-plugin

Plugin for support performance testing with AMQP in Gatling (3.7.x)
Apache License 2.0
33 stars 20 forks source link

Got the following errors when I used PublishExample.scala #37

Open klai05 opened 2 years ago

klai05 commented 2 years ago

Hi Community,

I have tried to use different Scala SDK versions. Is it because Protocol.scala is not in this path anymore but instead at io.gatling.core.protocol.Protocol?

Please kindly help me.

Thank you,

Compiling with Zinc Scala compiler. Prepared Zinc Scala inputs: 0.12 secs Compiling 28 Scala sources to /home/kevin/IdeaProjects/GatlingPerfFramework/build/classes/scala/gatling ... [Error] /home/kevin/IdeaProjects/GatlingPerfFramework/src/gatling/simulations/setup/VLS/RabbitMQ_amqpClient.scala:18: Symbol 'type io.gatling.core.config.Protocol' is missing from the classpath. This symbol is required by 'class io.gatling.amqp.config.AmqpProtocol'. Make sure that type Protocol is in your classpath and check for conflicting dependencies with -Ylog-classpath. A full rebuild may help if 'AmqpProtocol.class' was compiled against an incompatible version of io.gatling.core.config. [Error] /home/kevin/IdeaProjects/GatlingPerfFramework/src/gatling/simulations/setup/VLS/RabbitMQ_amqpClient.scala:34: overloaded method value protocols with alternatives: (ps: Iterable[io.gatling.core.protocol.Protocol])RabbitMQ_amqpClient.this.SetUp (ps: io.gatling.core.protocol.Protocol*)RabbitMQ_amqpClient.this.SetUp cannot be applied to (io.gatling.amqp.config.AmqpProtocol) two errors found

klai05 commented 2 years ago

######## Below is the full stacktrace.

Task :compileGatlingScala FAILED

FAILURE: Build failed with an exception.

red-bashmak commented 2 years ago

This plugin has only been tested on sbt and with scala compiler 2.13. And we recommend use this with sbt. You may use our template for create repo with performance tests

klai05 commented 2 years ago

Hello, I have tried using SBT instead of gradle. I used scala 2.13. There is still an error. Please see attached screenshoot. AMQP_Plugin_Error

red-bashmak commented 2 years ago

It's already better than before))) You need write all imports like shown below.

import io.gatling.core.Predef._
import io.gatling.core.structure.ScenarioBuilder
import ru.tinkoff.gatling.amqp.Predef._
import ru.tinkoff.gatling.amqp.examples.Utils._
import ru.tinkoff.gatling.amqp.protocol.AmqpProtocolBuilder

And possible activate implicit conversion in scala compiler with flag -language:implicitConversions or with this import

import scala.language.implicitConversions