Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I connect to a db after my scenario is run? #14

Open
Badjangas opened this issue Apr 14, 2023 · 1 comment
Open

How can I connect to a db after my scenario is run? #14

Badjangas opened this issue Apr 14, 2023 · 1 comment

Comments

@Badjangas
Copy link

Hi there 👋 I'm trying to connect to my organisation's db and perform a query after my scenario is run. Unfortunately I can't past my code here but essentially this is what I have:

  • my scenario
  • and an after hook that, naturally, is run after the completion of the scenario.
    I want to connect to the db inside this after hook, here's an example below

kmkm

However I always get this error message

kjdskjd

In my gradle build script I have this dependency `io.quarkus:quarkus-jdbc-postgresql`, so I should have the driver. This leads me to conclude that quarkus doesn run to execute gatling (which makes sense) and therefore RIP driver :( do u know a way to do this? Thanks nonetheless
@rbraeunlich
Copy link
Contributor

Hi @Badjangas,
issues should be opened here. Nevertheless, you should try to use ScalikeJDBC to make such a connection, since it's already included in the library: http://scalikejdbc.org/
Add the usual Postgres driver to your dependencies and then create a ConnectionPool in your after()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants