jdbc-gatling


License

License

Categories

Categories

Gatling Application Testing & Monitoring
GroupId

GroupId

com.github.cuipengfei
ArtifactId

ArtifactId

jdbc-gatling_2.12
Last Version

Last Version

2.3.5
Release Date

Release Date

Type

Type

jar
Description

Description

jdbc-gatling
jdbc-gatling
Project URL

Project URL

https://github.com/cuipengfei/gatling-jdbc
Project Organization

Project Organization

com.github.cuipengfei
Source Code Management

Source Code Management

https://github.com/cuipengfei/gatling-jdbc

Download jdbc-gatling_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.cuipengfei/jdbc-gatling_2.12/ -->
<dependency>
    <groupId>com.github.cuipengfei</groupId>
    <artifactId>jdbc-gatling_2.12</artifactId>
    <version>2.3.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.cuipengfei/jdbc-gatling_2.12/
implementation 'com.github.cuipengfei:jdbc-gatling_2.12:2.3.5'
// https://jarcasting.com/artifacts/com.github.cuipengfei/jdbc-gatling_2.12/
implementation ("com.github.cuipengfei:jdbc-gatling_2.12:2.3.5")
'com.github.cuipengfei:jdbc-gatling_2.12:jar:2.3.5'
<dependency org="com.github.cuipengfei" name="jdbc-gatling_2.12" rev="2.3.5">
  <artifact name="jdbc-gatling_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.cuipengfei', module='jdbc-gatling_2.12', version='2.3.5')
)
libraryDependencies += "com.github.cuipengfei" % "jdbc-gatling_2.12" % "2.3.5"
[com.github.cuipengfei/jdbc-gatling_2.12 "2.3.5"]

Dependencies

compile (6)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.12
io.gatling.highcharts : gatling-charts-highcharts jar 3.4.1
io.gatling : gatling-test-framework jar 3.4.1
org.scalikejdbc : scalikejdbc_2.12 jar 3.5.0
com.h2database : h2 jar 1.4.200
ch.qos.logback : logback-classic jar 1.2.3

test (5)

Group / Artifact Type Version
mysql : mysql-connector-java jar 8.0.22
org.postgresql : postgresql jar 42.2.18
org.scalatest : scalatest_2.12 jar 3.0.9
org.testcontainers : postgresql jar 1.15.0-rc2
org.testcontainers : mysql jar 1.15.0-rc2

Project Modules

There are no modules declared in this project.

Gatling JDBC Extension

JDBC support for Gatling

Build Status Maven Central Maven Central

The JDBC extension for Gatling was originally created to accompany a blog post that shows how to extend Gatling. Currently, five SQL operations are supported. See below for the usage.

Attention

In order to avoid conflicts with io.gatling:gatling-jdbc the artifact name has been changed with version 2.0.1. Instead of gatling-jdbc it is now called jdbc-gatling (see issue #8). Apart from this, nothing changes. All package names etc. stayed the same.

Also, by forking it from it's original position the group id and the packages have changed! The correct import is now com.github.cuipengfei.... and the group id changed to com.github.cuipengfei.

Usage

libraryDependencies += "com.github.cuipengfei" %% "gatling-jdbc" % "version"

This fork added support for update operations.

For usage examples, please refer to the simulation examples in this repo.

Final

Covering all SQL operations is a lot of work and some special commands might not be required for performance tests. Please keep in mind that the state of this Gatling extension can be considered experimental. Feel free to leave comments and create pull requests.

Publishing

Firstly, you gotta have in your home .sbt/1.0/sonatype.sbt configured to contain your username and password for Sonatype. Secondly, open the sbt shell an perform the following steps:

  1. set pgpSecretRing := file("/home/<user>/.sbt/gpg/secring.asc") or where ever it is
  2. release

Executing the intergration tests

If you have to run Docker on your machine as sudo, then to execute the integration tests, sbt has to be started as sudo, too. Only sudo sbt gatling:test will then be allowed to start the container of the databases.

Acknowledgements

I'd like to thank my former employer codecentric for providing me the time and space to get started on this project and transform it to a publishable library.

Versions

Version
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1