Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 2.73 KB

dev_docs.md

File metadata and controls

50 lines (30 loc) · 2.73 KB

Developer Documentation

Environment setup

JDK

Install Java JDK 11 and configure the project to use that JDK if not automatically configured.

Also configure the JAVA_HOME environment variable on your system, this is needed for executing integration tests.

Functional tests

Integration tests build mostly on JUnit3-based platform test classes. For assertions, either the IntelliJ platform's underlying logic is used, or AssertJ where applicable.

Just Kitting base test classes:

Load 3rd-party libs

JDK

Java file based tests require either a mock or a real JDK to be available. This project is configured to always use a real JDK via com.picimako.justkitting.JustKittingTestBase.getJdkHome(), so that no modification of the idea.home.path system property is necessary for running tests locally. And, using the JAVA_HOME based JDK also works on GitHub Actions.

Other libs

In order for tests to recognize code from other libraries, those libraries have to be added to the classpath too. You can use the various load*() methods of com.picimako.justkitting.ThirdPartyLibraryLoader.

These libraries are located in the lib directory under the project root.

NOTE: Since at least some jars coming from the IntelliJ platform, they are allowed to be added to this repository, only if they come from the community sources and aren't related to Fleet nor Marketplace.

There is an alternative called MavenDependencyUtil that can simplify this logic but based on previous experience it has some issues on CI which may need to be investigated.

Other resources: IntelliJ Platform Plugin SDK - How to test a JVM language? for MavenDependencyUtil

testData

The src/test/testData folder is used to store test data. They can be configured as project roots when setting the test data path in functional tests.

CI/CD

Qodana and changelog patching is disabled in GitHub Actions to cut build time, and unnecessary rounds of patching the changelog, since the CI build runs on a personal GitHub account without subscription to Actions.