1

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?

Shad
  • 45
  • 1
  • 7

2 Answers2

1

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.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thanks. I got this working, but found gatling much more better to integrate with drone via gradle. Iam getting my tests done and able to email the reports as well. Ref: https://brokenrhythm.blog/gradle-gatling-springboot-automation – Shad Jan 30 '18 at 13:57
0

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: drone-noreply@XXXXX.com
    host: smtp.XXXX.com
    port: 25
    skip_verify: true
    subject: >
      {{ repo.owner }}/{{ repo.name }}: {{ build.status }}
    recipients: [ user@email.com ]
    attachment: path/to/workspace/gatling-result.tar.gz
Shad
  • 45
  • 1
  • 7