git clone https://github.com/Evolveum/midpoint.git
Running tests with native PostgreSQL repository
This guide describes how to run tests with native PostgreSQL repository implementation.
Prerequisites
There are few prerequisites that need to be met before you can run tests with native PostgreSQL repository.
First and obvious one is to have PostgreSQL database installed and running. You need to have a database user with sufficient privileges to create database schema and tables. For more information about how to prepare database user and schema for native repository see Database preparation section.
Second prerequisite is to have Maven and Java 17+ installed.
Third one is to have Git installed.
Last one is getting the code. You can clone the repository from GitHub using the following command:
Running tests
Tests can be started from root project directory using the following maven command: mvn clean install -P sqale
sqale
profile will few more options to surefire/failsafe test plugins to run tests with native repository:
-
-Xmx4g
-
-Dtest.config.file=test-config-new-repo.xml
-
--add-exports java.management/sun.management=ALL-UNNAMED
-
-Duser.language=en
This profile also enables test suites related to native PostgreSQL repository implementation and disable few that are related to generic repository implementation.
If your test database, user or password is different from values defined in test-config-new-repo.xml you can override values defined in this file by setting additional system properties. For example:
-Dmidpoint.repository.jdbcUrl=jdbc:postgresql://localhost:5432/midpoint_test
-Dmidpoint.repository.jdbcPassword=midpoint_test
-Dmidpoint.repository.jdbcUsername=midpoint_test
-Dmidpoint.repository.database=postgres
"Quick" build with unit tests only and checkstyle (~30m):
mvn clean install -P -dist,sqale -DskipITs
"Quick" build with smaller/faster set of integration test (~1h20m):
mvn clean install -P -dist,sqale -DintegrationTestSuite=fast
For more information about various options for running tests see comments in parent pom.xml file in midpoint project on GitHub.