Most of the build tasks are run using gradle, which is generally what your IDE should be able to import for doing development. This has only been imported with IDEA, which works, so YMMV if you use anything else like Eclipse.
The only tests right now are system tests developed in the functional_tests
subproject. To run, you'll need:
The tests themselves use TestNG, but assume the above services are running.
You can use the following gradle tasks to set up your environment. These gradle commands should set up a keystore for you using the keytool
command. They also set up temporary working configurations which you might find useful.
This command really only needs to be run once:
% cd functional_tests
% ./gradlew initPerforce
From there, a p4d should be running at localhost:1666
.
You can restart the p4d instance via:
% cd functional_tests
% ./gradlew startPerforce
In general though, the other services will do this automatically.
If you want, you can execute a p4oauth service in the background:
% ./gradlew assemble
% cd functional_tests
% ./gradlew startP4Oauth
This runs P4OAuth using the p4oauth.jar
that should be built in the build/libs
folder of the project.
A test client server is used by tests that access the local p4d and list files (to just ensure we can in fact do something with the login token). Like p4oauth, you'll have to first assemble the test server.
% cd functional_tests
% ./gradlew :test_server:assemble
% ./gradlew startTestServer