Shad
Shad

Reputation: 45

Drone.io and jmeter integration

I am using drone.io for my CI/CD pipeline. I want to use jmeter/gatling as part of this for response assertion. Currently, drone.io is not providing a plugin for the same.

I was thinking of integrating a jmeter run by creating a bash plugin and triggering a run against the environment. Is this the right solution? Is the jdk base image good enough to run jmeter script in the container?

Upvotes: 1

Views: 636

Answers (2)

Shad
Shad

Reputation: 45

Used Gatling with Gradle - http://brokenrhythm.blog/gradle-gatling-springboot-automation

And here's the sample drone.yml file

#Pipeline file for project
pipeline:
  load-test:
    commands:
      - "./gradlew testLoad"
    image: "java:8"

  zipping:
    image: ubuntu
    when:
      status: [ failure,success ]
    commands:
      - "cp -r path/to/workspace/build/gatling-results/* /test-results"
      - "tar -czf gatling-result.tar.gz /test-results/*"

  email:
    when:
      status: [ failure,success ] #replace with [failure,changed] as we dont want to fill inbox with attachments
    image: drillster/drone-email
    from: [email protected]
    host: smtp.XXXX.com
    port: 25
    skip_verify: true
    subject: >
      {{ repo.owner }}/{{ repo.name }}: {{ build.status }}
    recipients: [ [email protected] ]
    attachment: path/to/workspace/gatling-result.tar.gz

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168162

As long as JDK is supported by JMeter (for example JMeter 3.3 requires Java 8 and doesn't support Java 9) you should be good to go.

Apart from command-line execution you can also consider JMeter Ant Task or JMeter Maven Plugin which are capable of generating HTML-based load test reports.

Upvotes: 1

Related Questions