-
Notifications
You must be signed in to change notification settings - Fork 27
[Release] Changelog update - v0.4.1
#495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
github-actions
wants to merge
137
commits into
main
Choose a base branch
from
changelog-update-v0.4.1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…x/Resolve-marketplace-issues Resolve marketplace issues V2
…er-filepath-quoting Quote compilers' filepaths with "" for Windows
…suite-junit-version Using JUnit 4 for EvoSuit
This version introduces several Llama models.
* Removing headless from development branch * ktlint fixes * Returning code changed for market validation
* Enable K2 mode in UI tests for runIde task. * Add support for K2 compatibility in plugin.xml * Remove disabling K2 mode instructions from plugin's descriptions and README
* Update Kotlin Version to 2.1.0 * Update IJ supporting range + version which is used for UI testing * Resolve issue with UI test in the new platform
* Add support for Google AI as an LLM * Provide the (disabled) tests for the Google AI LLM access To run the tests you need to retrieve an API key from Google's AI Platform, set it to the apiKey variable and remove the @disabled annotation from the test class. * Use environment variable GOOGLE_API_KEY to run tests * Fix ktlint issues * Fix wrong platform name for Google AI * Add missing settings storage for Google AI * Remove the models prefix for Google AI Every model retrieved from the API is prefixed by `models/` which does not add any value to the user, thus we remove it. * Weaken assertions that might fail in legitimate cases
* Sample test-code candidates based on current open file * Save state of non-reasonable tests * Fix ktlint issues * Extract example files into JSON resource * Refactor the LLM sample selection for (hopefully) better testability * Provide tests for a selection of method * Refactor: Move constant values inside LLMSampleSelector to companion object * Refactor: Remove unnecessary casts in LLMSampleSelectorTest.kt * Fix ktlint issues * Do not execute sample collection on EDT * ktlint added this trailing comma Co-authored-by: Danylo Biliaiev <[email protected]>
* minimal attempt to run kex from testspark with harcoded settings Needs debugging and testing * load kex-runner jar from github (build.gradle.kts toplevel) * setup code for kex properties * KexErrorManager based on LLMErrorManager * KexProcessManager based on EvoSuiteProcessManager * Basic UI element (button for running kex) * kex works only for the class codeType (todo funciton and line if possible) * read resource files kex.policy and modules.info * generate Report and series of simplifications for MVP use a provided kex path for now instead of downloading jar and adding dependency use ProcessBuilder (jdk) instead of OSProcessHandler (IJ sdk) use kex.py instead of building java command directly generate Report objects by reading generated java classes * download kex as github release if it doesn't exist * delete commented code Deleted stuff: running Kex through through OSProcessHandler (IJ sdk) running Kex with kex.py downloading kex from github in build.gradle.kts * use javaparser to merge @before and @after generated methods * compiling tests successfully by adding helper method to TestGenData.otherInfo * fold anything but @test annotated code, but unfortunately only on UI updates * remove python dependency by running kex jar directly * use project's java and add version check * empty implementation of settings classes for kex * allow setting kex arguments from kex settings page * kex test generation for 'method' code type arguably overkill solution of modify PsiMethodWrapper class added parameter names, types and return tyepes explicitly updated implementation for java and kotlin * fold all but @test methods regardless of declaration order * remove settings for unsupported kex features * folding works even if junit isn't in classpath * use the the subprocess manager from IJ framework * empty kex path download to .cache and LOCALAPPDATA in windows * fix lint. remove wildcard imports * from IJ api, provide correct build directory to kex For multimodule projects using TestSpark the correct module's build directory path is passed based on the location of code for which tests are generated * set maxTests displayed and minimizeTestSuite options * fix code fold to only happen once at the start not every ui update * error handling for errors in kex process manager also fixed a bug with the way options were passed to kex subprocess made them a list of strings instead of a single big space separated string * fix lint * provide signatures with FQNs to kex for java This also includes a simple string based mapping to jvm types through type erasure * refactor. extract functons, add comments, remove redundancies * fix lint * every option in kex cmd is preceeded by --option * use kotlin.time.Duration instead of Int * refactor error handling code, check for non-zero exit code * make generated code manipulation more robust It no longer depends on the order of the methods generated * only check if the correct verison of kex exists * make download url a property and version a user setting * support jdk version 8. no --add-opens * bump up kex version to 0.0.10 * allow kex test generation for classes not in a package * null safety while folding helper code * Merge branch 'development' into edwin1729/improvement/kex-integration * disallow kex and line code type being chosen simultaneously * update description tab and README.md with kex * fix lint * fix run coverage by making method name same as class name This is expected by TestSpark. Relevant file TestProcess.kt:createXmlFromJacoco:109 * undo mistaken removal of addLanguageTextFieldListener before code folding * Add empty LLM response handling (#342) Show a warning if LLM returns a response that cannot be parsed into a test case (e.g., an explanation of this test case rather than a modification). * Restrict TestSpark action to suitable code types and fix generation for a line (#344) * fix update function * create availableForGeneration * ktlint * feat: add javadoc for `JavaPsiHelper.availableForGeneration` * feat: check for nullness of a PSI file in `TestSparkAction.update` * feat: update javadocs in `PsiComponents.kt` * feat: check for a class or method/func in `KotlinPsiHelper.availableForGeneration` * feat: add TODO to `ToolUtils` about a potential bug The bug is reflected in the issue #375. * feat: make `PsiHelper.getSurroundingLineNumber` return 1-based line numbers Before, the `KotlinPsiHelper` returned a 0-based line number which caused an issue with line-based test generation. The generated prompt contained a line above the selected one. * feat: implement line-based test generation with CUT as a context When there is no surrounding method about the selected line, we use the CUT as a context for this line. The CUT must always be present. Otherwise, the generation action should have been disabled for this line. * refactor: apply ktlint * feat: add `See` in TODO * feat: add TODO and surround $NAME in backticks in `linePrompt` template * feat: collect class constructor signatures in `PsiClassWrapper` * feat: remove backticks from `linePrompt` * feat: fill line-based test generation with additional context The line-based test generation that has a method as a context of the line now also accepts constructors of the containing class. * refactor: use `firstOrNull` for `cut` extraction * refactor: apply ktlint * fix: add required parameter to `ClassRepresentation` in tests * publish: core module version `4.0.0` The major version increased due to the change of the public API of `PromptGenerator.generatePromptForLine` method. --------- Co-authored-by: Vladislav Artiukhov <[email protected]> * Data class for execution results * Minor refactoring * apply ktlint * fix getJavaVersion * add KexSettingsService to plugin.xml * fix DefaultKexSettingsState * fix KexSettingsState * fix Bundles * Force junit4 for EvoSuite tests * JUnit version forcing * fix getExceptionData * fix tools * fix managers * fix TestCasePanelBuilder.kt * fix TestProcessor.kt * remove unused import * fix ktlint * fix ktlint * remove TestSparkStarter.kt * Add support for language applicability checks in Tool * Add support for language applicability checks in Llm * Add support for language applicability checks in Kex * Add support for language applicability checks in EvoSuite * Filter test generation buttons by language compatibility * Refactor imports for SupportedLanguage in EvoSuite and Llm * Set progress indicator text during Kex test generation --------- Co-authored-by: Edwin Fernando <[email protected]> Co-authored-by: Edwin Fernando <[email protected]> Co-authored-by: Edwin Fernando <[email protected]> Co-authored-by: Vladislav Artiukhov <[email protected]> Co-authored-by: Iurii Zaitsev <[email protected]> Co-authored-by: Hello-zoka <[email protected]>
* IJ versions range * Fix deprecated API usage in KotlinPsiClassWrapper.kt
* Update release notes and plugin description for the marketplace * Update pluginVersion to 0.4.0
In #416, we've added support also for Google's AI platform. Back then I forgot to also update the README accordingly.
* Move class-level fields in TestSparkAction to actionPerformed Because this may lead to resource leaks. Closes #242 * Remove redundant qualifier names in TestSparkAction.kt * Extract the TestSparkActionWindow class into a separate file Extract the TestSparkActionWindow class into a separate file for better modularity and maintainability. This separation improves code readability and simplifies the structure of TestSparkAction by isolating UI logic. It will also reduce potential git conflicts. * Add intelliJPlatform folder to gitignore * Remove the irrelevant TODO in TestSparkActionWindow.kt If the psiHelper is not available, we'll get a NullPointerException automatically, so we don't need to throw anything manually. It's the responsibility of the caller class to make sure that the window is shown only when the dataContext returns some data and a psiHelper instance can be retrieved. * Refactor TestCompilerFactory to resolve issue #324 Use the provided javaSDKHomePath or derive it from the project's instance. If can't derive throw an exception. * Resolve ktlint issues
…logic across analyzers
…hance testability functionality
…etListOfTestingImports logic to base class
…423-evo-suite-error-message-fix [#423] EvoSuite error messages clarification
Replaces the deprecated ::set-output syntax with the modern $GITHUB_OUTPUT approach to ensure compatibility with GitHub Actions updates. This change avoids potential warnings or errors in workflow execution.
…-output [GH Actions] Update deprecated set-output command in GitHub Actions
* Update test generators to choose an annotation name according to the JUnit version * Fix parsing to support RunWith annotation for JUnit 5 * `runWith` variable renaming to `annotation` to highlight the possibility of storing 2 annotation types * removed unused variable * fix ktlint * Smart annotation choosing for Java/KotlinDisplayUtils * Fix ktlint
* remove redundant factory classes and replace with companion objects for improved simplicity * organize and cleanup imports across multiple files for consistency and readability * organize imports in TestAnalyzer for better readability and consistency * refactor: replace TestAnalyzerFactory with TestAnalyzer companion object in LLMSampleSelector
…#480) * Add utility function to create temporary files Introduced `makeTmpFile` method to generate temporary files with specified content and prefix. The file is automatically deleted on JVM exit, ensuring no leftover artifacts. This helps streamline temporary file management in various use cases. * Refactor classpath handling to use temporary files. Replaced inline classpath string creation with temporary files containing classpath information. This improves readability and simplifies command-line arguments for test processing and compilers. * Wrap javaRunner paths in quotes for command execution Enclosing javaRunner.absolutePath in quotes ensures proper handling of file paths with spaces or special characters during command execution. This prevents potential execution errors and improves robustness in path handling. * Refactor command logging placement in CommandLineRunner Moved the logging statement for commands to ensure consistent behavior across different operating systems. This improves code clarity and aligns the logging logic with its respective execution path. * Wrap classpath file references in quotes. * Refactor Java compiler path handling for cross-platform support * escape classpath list inside quotation marks * replace \ by / in classpaths to avoid character escape and be compatible with Linux, macos, and windows
Previously, the code included anonymous classes in the subclass search results. This change introduces a filter to exclude `PsiAnonymousClass` instances, ensuring only named classes are wrapped and returned. This improves the accuracy and relevance of the `searchSubclasses` method.
Extend subclass processing logic to include `KtLightClass` alongside `KtUltraLightClass`. This ensures broader compatibility with Kotlin PSI classes during class inheritor searches.
- TestSpark now has three test-gen strategies - It is maintained by STR team - Add license hint
* release: bump version to 0.4.1, update plugin change notes and build compatibility * fix: adjust change notes formatting in plugin.xml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current pull request contains patched
CHANGELOG.mdfile for thev0.4.1version.