Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Debugging integration tests

dickon edited this pageMar 17, 2023 ·6 revisions

Debugging integration tests using jdb

To debug integration tests with jdb:

  1. Locate and run both theclean andintegrationTest tasks:

    gradle

  2. Edit theintegrationTest configuration to run theclean task before launch. SelectModify options thenBefore Launch, then hit '+" then selectRun gradle task. Append-D-runjdb=5005 to the run line:

    config1

  3. Create a "Remote JVM Debug" configuration, ensuring the port matches the one usedpreviously, i.e.5005

    jvmdbg

  4. Run theintegrationTest task.

    Once it starts, it pauses and waits.

5 Run theRemote JVM Debug task to connect.

You can now debug into the integration test.

For step 5 you may alternatively use the "Attach debugger" tooltip in IntelliJ

Screen Shot 2022-07-21 at 15 13 42

Debugging integration tests with Postgres

To debug a set of integration tests with Postgres:

  1. Locate theintegrationTest that you intend to run in Intellij.

  2. RunintegrationTest to create the run/debug configuration.

  3. Run the Docker postgres image in a console:

    docker run --rm --name test-instance -e POSTGRES_PASSWORD=password -p 5432:5432 postgres
  4. In your Intellij run/debug configuration add-PpostgresPort=5432 (Note: not-D):

    integration-test-postgres

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp