JetBrains / package-search-intellij-plugin

Package Search is an IntelliJ plugin that allows you to search for packages from the editor.
https://package-search.jetbrains.com/
Apache License 2.0
18 stars 2 forks source link

Implement Automated Testing with Starter: Command Integration and Result Verification #109

Closed fscarponi closed 8 months ago

fscarponi commented 9 months ago

Update plugin build to target the 241-EAP of IJ, allowing to integrate test in github actions

Integrate base e2e test by integrating performancePlugin into Package Search Add PKGSCommandProvider has been implemented

The testing system was implemented through the integration of Starter, defining a specific command to create an output to verify against the mock file that the test expects.

How it works: The test requires the project on which to perform the test (in test/resources/projects/projectName.zip) and a json file with the expected result (in test/resources/assertions/projectName.json). For example, in the inserted test, the identities of the issued modules are extracted.

Starter then launches the IDE that executes the command to perform the dump and saves the result in the output directory (specified in the envVar).

Once the result is obtained, the test proceeds by asserting whether the result is as expected.