Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
54d3bb8
update plugin name
Apr 1, 2025
33743d1
add liscense
Apr 1, 2025
23608a3
new plugin
Apr 1, 2025
85688de
need check why failed
Apr 1, 2025
45cc392
Merge pull request #43 from jaksonlin/with_ai
jaksonlin Apr 9, 2025
7ecacb6
Merge pull request #44 from jaksonlin/with_ai
jaksonlin Apr 9, 2025
d58cac4
Merge branch 'with_ai' into 'main'
Apr 9, 2025
f7c5f41
Merge pull request #45 from jaksonlin/with_ai
jaksonlin Apr 15, 2025
4ea561b
Merge pull request #46 from jaksonlin/with_ai
jaksonlin Apr 16, 2025
ffe0853
Merge pull request #47 from jaksonlin/with_ai
jaksonlin Apr 16, 2025
0017f3d
Merge branch 'main' into 'add_assert_check'
Apr 16, 2025
ecf8282
Merge branch 'add_assert_check' into 'main'
Apr 16, 2025
4ab8d2a
Merge branch 'with_ai' into 'main'
Apr 16, 2025
8d08b54
Merge pull request #48 from jaksonlin/with_ai
jaksonlin Apr 16, 2025
0cf2375
refact dir and ns
Apr 27, 2025
74532c5
Merge pull request #50 from jaksonlin/test-craft
jaksonlin Apr 27, 2025
72b4005
update version
Apr 28, 2025
5ea684e
Merge pull request #51 from jaksonlin/test-craft
jaksonlin Apr 28, 2025
fec9bea
update to plugin 2.0
Apr 28, 2025
ed1bcb7
backward to jvm11
Apr 30, 2025
0ded4b0
update support back to 1.8
Apr 30, 2025
a637b76
update readme
Apr 30, 2025
797c87d
Merge pull request #52 from jaksonlin/test-craft
jaksonlin Apr 30, 2025
cbda31a
add utf-8 encoding config
Apr 30, 2025
7737686
update folder scan for invalid testcases
Apr 30, 2025
52bcc99
refact layout for v3
Apr 30, 2025
aed63e9
Merge pull request #53 from jaksonlin/test-craft
jaksonlin Apr 30, 2025
c6c2168
refact system layout, not tested
May 5, 2025
23cdba3
refact event bus
May 5, 2025
b127381
bugfix servcie matching
May 5, 2025
2242474
bugfix runhistorymanager init incorrect
May 5, 2025
13738f1
bugfix copied as markdown
May 5, 2025
4c20742
update i18n service
May 5, 2025
a65aefe
fix i18n action text
May 5, 2025
27d50f5
Merge pull request #54 from jaksonlin/test-craft
jaksonlin May 5, 2025
6d4425b
will hang
May 6, 2025
b0ed021
fix annotation generation stuck
May 6, 2025
8434a28
update version
May 6, 2025
7384561
update message
May 6, 2025
0794c69
refact layout
May 7, 2025
fa43765
Merge pull request #56 from jaksonlin/test-craft
jaksonlin May 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<depends>com.intellij.modules.json</depends>
</idea-plugin><!-- Keep a Changelog guide -> https://keepachangelog.com -->

# pitest-intellij Changelog
# TestCraft Pro Changelog


## [Unreleased]
### Added
Expand Down Expand Up @@ -44,3 +45,32 @@
- i18n enhancement
- bugfixes for no mutation can provide suggestion

## 1.0.8 - 2025-04-28
### Project Launch
- Complete rebranding and expansion of functionality
- Migration from MIT to Apache 2.0 License
- New test management features

### Added
- Enhanced test case management system
- Annotation validation and generation
- Assertion statement verification
- Support for both Gradle and Maven projects
- Configurable test quality rules

### Carried Forward
- All PITest mutation testing capabilities
- Results visualization and navigation
- Editor integration features

### Functionality Changed
- Run pitest in the test file's source root as the process working directory
- Dump pitest context into report directory for issue debug
- Enhance output information for issue debug

## 1.0.9 - 2025-04-30
- bugfix, backward compatibility to JDK1.8 support to run in older IntelliJ IDEA version
- upload to pitest-gradle also, for pitest-gradle user, please uninstall pitest-gradle plugin and reinstall the new one manged in [testcraft](https://plugins.jetbrains.com/plugin/27221-testcraft-pro).

## 1.0.10 - 2025-05-06
- bugfix, git command execution in a separate thread to avoid UI blocking
29 changes: 29 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Migration Guide: pitest-gradle to TestCraft Pro

## Overview
This document guides users migrating from pitest-gradle to TestCraft Pro.

## Changes
1. **Package Name Changes**
- Old: `com.github.jaksonlin.pitestintellij`
- New: `com.github.jaksonlin.testcraftpro`

2. **Configuration Updates**
- Plugin settings are now under "TestCraft Pro" in IDE settings
- Additional configuration options for new features

3. **Feature Enhancements**
- All existing PITest features remain available
- New features are automatically available after installation

## Migration Steps
1. Uninstall pitest-gradle plugin
2. Install TestCraft Pro from JetBrains Marketplace
3. Reconfigure any custom settings in the new interface

## Backwards Compatibility
- All existing PITest configurations will continue to work
- Existing mutation test results remain compatible

## Support
For migration assistance, please open an issue in the new repository.
13 changes: 13 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
TestCraft Pro
Copyright 2024 Jakson Lin

This product includes software developed by:
- The Apache Software Foundation (http://www.apache.org/)
- JetBrains s.r.o. (IntelliJ Platform)
- JavaParser (https://javaparser.org)
- FasterXML, LLC (Jackson Project)
- JUnit Team (JUnit Library)

This product is a derivative work that evolved from pitest-gradle.
The original pitest-gradle was licensed under MIT and has been rewritten
and relicensed as TestCraft Pro under Apache License 2.0.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# TestCraft

<!-- Plugin description -->
TestCraft is a comprehensive testing assistant plugin for IntelliJ IDEA that enhances your testing workflow with mutation testing, test case management, and AI-powered test analysis. Originally focused on PITest integration, TestCraft has evolved to provide a complete suite of testing tools.
TestCraft is the evolution of the [pitest-gradle](https://plugins.jetbrains.com/plugin/25546-pitest-gradle) plugin, expanding its capabilities beyond Gradle-based PITest mutation testing. While the original plugin focused on running PITest mutation testing for Java Gradle projects, TestCraft now offers a comprehensive testing suite that includes:

- PITest mutation testing support for both Gradle and Maven projects
- Advanced test case management features
- AI-powered test analysis capabilities

The plugin has been renamed to TestCraft to better represent its expanded functionality and modern testing features. Current version: 1.0.8 (continuing from the last pitest-gradle version).

<!-- Plugin description end -->

## Migration from pitest-gradle

- uninstall pitest-gradle
- install TestCraft plugin

## Features

### Mutation Testing
Expand Down
163 changes: 102 additions & 61 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,45 +1,52 @@
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.TestFrameworkType

plugins {
id("java") // Java support
alias(libs.plugins.kotlin) // Kotlin support
alias(libs.plugins.gradleIntelliJPlugin) // IntelliJ Platform Gradle Plugin
alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
alias(libs.plugins.qodana) // Gradle Qodana Plugin
alias(libs.plugins.kover) // Gradle Kover Plugin
alias(libs.plugins.serialize) // Gradle Serializer Plugin
}

// utf-8
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}

group = providers.gradleProperty("pluginGroup").get()
version = providers.gradleProperty("pluginVersion").get()

// Set the JVM language level used to build the project.
kotlin {
jvmToolchain(17)
jvmToolchain(21)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21)) // Use JDK 21
}
sourceCompatibility = JavaVersion.VERSION_1_8 // Generate bytecode for Java 8
targetCompatibility = JavaVersion.VERSION_1_8
}

// Configure project's dependencies
repositories {
mavenCentral()
maven { url = uri("https://www.jetbrains.com/intellij-repository/releases") }
maven { url = uri("https://cache-redirector.jetbrains.com/intellij-dependencies") }
}

intellij {
pluginName.set(providers.gradleProperty("pluginName"))
version.set(providers.gradleProperty("platformVersion"))
type.set(providers.gradleProperty("platformType"))

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins.set(providers.gradleProperty("platformBundledPlugins")
.map { it.split(',').map(String::trim).filter(String::isNotEmpty) }
)
// IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
intellijPlatform {
defaultRepositories()
}
}

// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
testImplementation(libs.junit)
testImplementation(libs.opentest4j)

// Add Gradle Tooling API dependency
implementation(fileTree("lib") { include("*.jar") })
implementation("com.github.javaparser:javaparser-core:3.24.2") // Add JavaParser dependency
Expand All @@ -48,43 +55,33 @@ dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:2.18.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2") // Use latest version
implementation("org.commonmark:commonmark:0.21.0")
}
implementation("org.apache.httpcomponents:httpclient:4.5.13")

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
groups.empty()
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
}
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))

// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin
qodana {
cachePath = provider { file(".qodana").canonicalPath }
reportPath = provider { file("build/reports/inspections").canonicalPath }
saveReport = true
showReport = System.getenv("QODANA_SHOW_REPORT")?.toBoolean() ?: false
}
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
koverReport {
defaults {
xml {
onCheck = true
}
}
}
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })

testFramework(TestFrameworkType.Platform)

bundledPlugin("com.intellij.modules.json")

tasks {
wrapper {
gradleVersion = providers.gradleProperty("gradleVersion").get()
}
}

patchPluginXml {
version.set(providers.gradleProperty("pluginVersion"))
sinceBuild.set(providers.gradleProperty("pluginSinceBuild"))
untilBuild.set(providers.gradleProperty("pluginUntilBuild"))
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
intellijPlatform {
pluginConfiguration {
name = providers.gradleProperty("pluginName")
version = providers.gradleProperty("pluginVersion")

// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"

Expand All @@ -108,34 +105,78 @@ tasks {
)
}
}
}

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
runIdeForUiTests {
systemProperty("robot-server.port", "8082")
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
systemProperty("jb.consents.confirmation.enabled", "false")
ideaVersion {
sinceBuild = providers.gradleProperty("pluginSinceBuild")
untilBuild = providers.gradleProperty("pluginUntilBuild")
}
}

signPlugin {
certificateChain = System.getenv("CERTIFICATE_CHAIN")
privateKey = System.getenv("PRIVATE_KEY")
password = System.getenv("PRIVATE_KEY_PASSWORD")
signing {
certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN")
privateKey = providers.environmentVariable("PRIVATE_KEY")
password = providers.environmentVariable("PRIVATE_KEY_PASSWORD")
}

publishPlugin {
dependsOn("patchChangelog")
token = System.getenv("PUBLISH_TOKEN")
publishing {
token = providers.environmentVariable("PUBLISH_TOKEN")
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
channels = providers.gradleProperty("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
}

// Force English locale for development and testing
pluginVerification {
ides {
recommended()
}
}
}

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
groups.empty()
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
}

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
kover {
reports {
total {
xml {
onCheck = true
}
}
}
}

tasks {
wrapper {
gradleVersion = providers.gradleProperty("gradleVersion").get()
}

publishPlugin {
dependsOn(patchChangelog)
}
}

intellijPlatformTesting {
runIde {
jvmArgs("-Duser.language=zh", "-Duser.country=CN")
register("runIdeForUiTests") {
task {
jvmArgumentProviders += CommandLineArgumentProvider {
listOf(
"-Drobot-server.port=8082",
"-Dide.mac.message.dialogs.as.sheets=false",
"-Djb.privacy.policy.text=<!--999.999-->",
"-Djb.consents.confirmation.enabled=false",
)
}
}

plugins {
robotServerPlugin()
}
}
}
}
Loading
Loading