Unit and Integration tests

Can I run the tests before sending a pull request or pushing commits to master??

The answer is yes!!

Run all the unit tests #

From the portal folder, type:

ant test-unit

(finishes in ~10 minutes)

Run all the integration tests #

From the portal folder, type:

ant test-integration

(finishes in ~30 minutes)

Run a single test #

Go into the folder that holds the test: portal-service, portal-impl, util-java...


ant test-class -Dtest.class="The name of the class (without qualifiers)"

Run tests from within your favorite IDE #

See this article. (Instructions focus on Eclipse but you should be able to adapt them to IntelliJ or any other IDE)

See also #

Liferay Testing Infrastructure - in-depth explanation of how to write unit and integration tests, and configure your environment to run them

0 Attachments
Average (1 Vote)
The average rating is 5.0 stars out of 5.