Integration Tests - Documentation topics on: integration tests,testing,.

This documentation is a static copy for this version. For current documentation, see:

Integration Tests

dotCMS provides Integration testing to test more than one component and how they function together. For instance, how one part of the system interacts with another dependent part of the system, or how the database interacts with your data abstraction layer. dotCMS also provides Functional Testing, and Unit Testing.

Required Integration Testing Property Modifications

You need to modify the following properties to point to the right local location pathing:

Required Modifications to the File:<tomcat8>/webapps/ROOT/dotsecure/esdata<tomcat8>/webapps/ROOT/dotsecure/esdata/work

Required Modifications to the File:


Database Configuration

The datasource properties can be specified in the dotCMS/src/integration-test/resources/ file

Requirements before Running Integration Tests

The dotCMS server must be started, at least once, before running Integration tests. Integration tests need a working database (schema created), and valid dotsecure, assets and WEB-INF folders. If you have already started dotCMS (distro or source), then you already have these folders created, so you are ready to use this documentation. However, if you haven’t downloaded and started dotCMS, please refer to the following documentation links on how to install and startup dotCMS: -distributed release version -source code

How to Run Integration Tests in Eclipse

After configuring and starting your dotCMS server at least once, note the Integration test package - src/integration-test/java. Run the entire test suite package, or any of the targeted integration tests by right-clicking the package/test, then selecting “Run As”, and choosing “JUnit Test.“

How to Run Integration Tests in intelliJ

To run integration tests from intelliJ, locate the /src/integration-test package as shown below. Right-click on the entire integration test suite, or choose a targeted integration test, then choose the Run '{chosen test}' option.

After running an integration test, the intelliJ event log will display test result data.

Running Integration Tests using Gradle

./gradlew integrationTest – runs all tests

The db type can be specified as an environment variable or as a gradle parameter (defaults to ‘postgres’) Environment variable: export databaseType=mysql

Gradle parameter: ./gradlew integrationTest --tests *VersionableAPITest -PdatabaseType=mysql

For more filtering options, see