Skip to content

Commit

Permalink
Merge pull request #55 from JetBrains-Research/remove-genie
Browse files Browse the repository at this point in the history
Switch Genie to Spark
  • Loading branch information
arksap2002 authored Aug 14, 2023
2 parents 4ad62cc + 5755e9f commit 6b519b4
Show file tree
Hide file tree
Showing 112 changed files with 787 additions and 787 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Keep a Changelog guide -> https://keepachangelog.com -->

# TestGenie Changelog
# TestSpark Changelog

## [Unreleased]

Expand Down
34 changes: 17 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# TestGenie
# TestSpark

## Description

In this document you can find the overall structure of TestGenie plugin. The classes are listed and their purpose is described. This section is intended for developers and contributors to TestGenie plugin.
In this document you can find the overall structure of TestSpark plugin. The classes are listed and their purpose is described. This section is intended for developers and contributors to TestSpark plugin.

## Plugin Configuration File

The plugin configuration file is `plugin.xml` which can be found in `src/main/resources/META-INF` directory. All declarations (such as actions, services, listeners) are present in this file.

## Classes

All the classes can be found in `src/main/kotlin/org/jetbrains/research/testgenie` directory.
All the classes can be found in `src/main/kotlin/org/jetbrains/research/testspark` directory.

### Actions

Expand Down Expand Up @@ -73,22 +73,22 @@ All the service classes can be found in `services` directory.
- `CoverageVisualisationService` visualises the coverage in the gutter and the editor (by colouring), injects the coverage data into the *"Coverage visualisation"* tool window tab.
- `ErrorService`service class for handling error occurrences.
- `QuickAccessParametersService` allows to load and get the state of the parameters in the *"Parameters"* tool window panel.
- `RunnerService` is used to limit TestGenie to generate tests only once at a time.
- `RunnerService` is used to limit TestSpark to generate tests only once at a time.
- `SettingsApplicationService` stores the application-level settings persistently. It uses `SettingsApplicationState` class for that.
- `SettingsProjectService` stores the project-level settings persistently. It uses `SettingsProjectState` class for that.
- `StaticInvalidationService` invalidates the cache statically.
- `TestCaseCachingService` contains the data structure for caching the generated test cases and is responsible for adding, retrieving and removing (invalidating) the generated tests.
- `TestCaseDisplayService` displays the tests generated by EvoSuite, in the *"Generated tests"* tool window panel.
- `TestGenieTelemetryService` sends usage information to Intelligent Collaboration Tools Lab at JetBrains Research if the user has opted in.
- `TestSparkTelemetryService` sends usage information to Intelligent Collaboration Tools Lab at JetBrains Research if the user has opted in.

### Settings

All the classes related to TestGenie `Settings/Preferences` page can be found in `settings` directory.
All the classes related to TestSpark `Settings/Preferences` page can be found in `settings` directory.

- `SettingsApplicationState` is responsible for storing the values of the EvoSuite Settings entries.
- `SettingsEvoSuiteComponent` displays and captures the changes to the values of the entries in the EvoSuite page of the Settings dialog.
- `SettingsEvoSuiteConfigurable` allows to configure some EvoSuite settings via the EvoSuite page in the Settings dialog, observes the changes and manages the UI and state.
- `SettingsPluginComponent` displays and captures the changes to the values of the entries in the TestGenie main page of the Settings dialog.
- `SettingsPluginComponent` displays and captures the changes to the values of the entries in the TestSpark main page of the Settings dialog.
- `SettingsPluginConfigurable` allows to configure some Plugin settings via the Plugin page in the Settings dialog, observes the changes and manages the UI and state.
- `SettingsProjectState` is responsible for storing the values of the Plugin Settings entries.

Expand Down Expand Up @@ -121,32 +121,32 @@ All the classes related to TestGenie `Settings/Preferences` page can be found in
- `ToolUtils` utils for working with tools
### Tool Window

All the classes related to TestGenie Tool Window (on the right side) can be found in `toolwindow` directory.
All the classes related to TestSpark Tool Window (on the right side) can be found in `toolwindow` directory.

- `QuickAccessParameters` stores the main panel and the UI of the "Parameters" tool window tab.
- `QuickAccessParametersState` is responsible for persisting the values of the parameters in the "Parameters" tool window tab.
- `TestGenieToolWindowFactory` creates the tabs and the UI of the TestGenie tool window.
- `TestSparkToolWindowFactory` creates the tabs and the UI of the TestSpark tool window.

### Bundles

- `TestGenieBundle` is used to load EvoSuite messages in the code (from `messages.TestGenie` file in the `recourses` directory).
- `TestGenieDefaultsBundle` is used to load the default values of the parameters in the code (from `defaults/TestGenie.properties` file in the `resources` directory).
- `TestGenieLabelsBundle` is used to load the text of various UI labels in the code (from `defaults/Labels.properties` file in the `recourses` directory).
- `TestGenieToolTipsBundle` is used to load the text of various tooltips in the code (from `defaults/Tooltips.properties` file in the `resources` directory).
- `TestSparkBundle` is used to load EvoSuite messages in the code (from `messages.TestSpark` file in the `recourses` directory).
- `TestSparkDefaultsBundle` is used to load the default values of the parameters in the code (from `defaults/TestSpark.properties` file in the `resources` directory).
- `TestSparkLabelsBundle` is used to load the text of various UI labels in the code (from `defaults/Labels.properties` file in the `recourses` directory).
- `TestSparkToolTipsBundle` is used to load the text of various tooltips in the code (from `defaults/Tooltips.properties` file in the `resources` directory).

### Translations
The vast majority of labels, tooltip-texts and messages are saved in their own `.properties` files. This is practical if you wish to translate the plugin to a different language - changing these files should translate most of the plugin elements. The only omitted texts are those which require certain properties set to them (e.g. IntelliJ's `.preferredSize`). Those have to be translated in the code. There also exists a `.properties` file for default TestGenie configurations. It is not related to linguistics, but useful if you wish to change default values of the plugin.
The vast majority of labels, tooltip-texts and messages are saved in their own `.properties` files. This is practical if you wish to translate the plugin to a different language - changing these files should translate most of the plugin elements. The only omitted texts are those which require certain properties set to them (e.g. IntelliJ's `.preferredSize`). Those have to be translated in the code. There also exists a `.properties` file for default TestSpark configurations. It is not related to linguistics, but useful if you wish to change default values of the plugin.

## Tests

The tests for TestGenie can be found in `src/test` directory.
The tests for TestSpark can be found in `src/test` directory.

- `resources` directory contains dummy projects used for testing the plugin.
- `kotlin/org/jetbrains/research/testgenie` directory contains the actual tests.
- `kotlin/org/jetbrains/research/testspark` directory contains the actual tests.
- `helpers` directory contains tests for the method descriptor helper (`MethodDescriptorHelperTest`).
- `runner` directory contains tests for the settings arguments that are used when running EvoSuite (`SettingsArgumentTest`).
- `services` directory contains tests for the coverage visualisation and caching service classes (`CoverageVisualisationServiceTest`, `TestCaseCachingServicePropertyBasedTest`, `TestCaseCachingServiceTest`).
- `settings` directory contains unit tests for plugin and EvoSuite settings (`SettingsEvoSuiteConfigurableTest`, `SettingsPluginConfigurableTest`, `TestGenieSettingsStateTest`).
- `settings` directory contains unit tests for plugin and EvoSuite settings (`SettingsEvoSuiteConfigurableTest`, `SettingsPluginConfigurableTest`, `TestSparkSettingsStateTest`).
- `toolwindow` directory contains unit tests for tool window tabs (`QuickAccessParametersStateTest`).
- `uiTest` directory contains the UI tests.
- `customfixtures` directory contains the custom fixtures that had to be created for testing.
Expand Down
Loading

0 comments on commit 6b519b4

Please sign in to comment.