This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. 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...
Type:
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
25599 查看