From 692b4435aa0312ee1dec7a1f1b5c535794b57ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E6=88=9F?= Date: Wed, 2 Feb 2022 19:40:53 +0800 Subject: [PATCH] release v0.7.4 --- README.md | 4 +++- README_EN.md | 10 ++++------ demo/android-demo/app/build.gradle | 2 +- demo/java-demo/build.gradle | 4 ++-- demo/java-demo/pom.xml | 2 +- demo/kotlin-demo/build.gradle.kts | 4 ++-- demo/kotlin-demo/pom.xml | 2 +- demo/spock-demo/build.gradle | 4 ++-- demo/spock-demo/pom.xml | 2 +- docs/en-us/doc/release-note.md | 3 +++ docs/en-us/doc/setup.md | 6 +++--- docs/en-us/doc/use-intellij-plugin.md | 2 ++ docs/en-us/sidebar.md | 1 + docs/zh-cn/doc/release-note.md | 3 +++ docs/zh-cn/doc/setup.md | 8 +++++--- docs/zh-cn/doc/use-intellij-plugin.md | 2 ++ docs/zh-cn/sidebar.md | 1 + testable-agent/pom.xml | 2 +- testable-all/pom.xml | 2 +- testable-core/pom.xml | 2 +- testable-maven-plugin/pom.xml | 2 +- testable-parent/pom.xml | 4 ++-- testable-processor/pom.xml | 2 +- 23 files changed, 44 insertions(+), 30 deletions(-) create mode 100644 docs/en-us/doc/use-intellij-plugin.md create mode 100644 docs/zh-cn/doc/use-intellij-plugin.md diff --git a/README.md b/README.md index 9f24a1f..23f19af 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,9 @@ |-- tool ➜ 项目开发过程中的工具脚本 |-- demo | |-- java-demo ➜ Java语言的示例代码 -| `-- kotlin-demo ➜ Kotlin语言的示例代码 +| |-- kotlin-demo ➜ Kotlin语言的示例代码 +| |-- android-demo ➜ Android项目的示例代码 +| `-- spock-demo ➜ Spock测试框架的示例代码 `-- docs ➜ 项目使用文档 ``` diff --git a/README_EN.md b/README_EN.md index 56cefc9..a74981a 100644 --- a/README_EN.md +++ b/README_EN.md @@ -9,11 +9,7 @@ Usage Document: https://alibaba.github.io/testable-mock/#/en-us/ ## Roadmap -`TestableMock` is still under heavy development, the following version plans may be adjusted during the iteration - -- `v0.6` it's the current version, refer to the [issue](https://github.com/alibaba/testable-mock/issues) list for the work in progress -- `v0.7` better anti-refactoring support of mocking, allow quick mock all method in specified class -- `v1.0` all functions are stable, a brand-new start +`TestableMock` is still under heavy development, if you get sucked somehow, just go ahead raise an [issue](https://github.com/alibaba/testable-mock/issues) for it. ## Directory Structure @@ -27,7 +23,9 @@ Usage Document: https://alibaba.github.io/testable-mock/#/en-us/ |-- tool ➜ Scripts for project maintain |-- demo | |-- java-demo ➜ Java code example -| `-- kotlin-demo ➜ Kotlin code example +| |-- kotlin-demo ➜ Kotlin code example +| |-- android-demo ➜ Android app code example +| `-- spock-demo ➜ Spock framwork code example `-- docs ➜ Source code of usage document ``` diff --git a/demo/android-demo/app/build.gradle b/demo/android-demo/app/build.gradle index 8696fdd..b9db515 100644 --- a/demo/android-demo/app/build.gradle +++ b/demo/android-demo/app/build.gradle @@ -49,7 +49,7 @@ dependencies { testImplementation 'androidx.test:runner:1.4.0-alpha05' testImplementation 'junit:junit:4.+' testImplementation 'org.robolectric:robolectric:4.5.1' - testImplementation 'com.alibaba.testable:testable-all:0.7.3' + testImplementation 'com.alibaba.testable:testable-all:0.7.4' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } \ No newline at end of file diff --git a/demo/java-demo/build.gradle b/demo/java-demo/build.gradle index 575d8c2..884cc01 100644 --- a/demo/java-demo/build.gradle +++ b/demo/java-demo/build.gradle @@ -13,8 +13,8 @@ repositories { dependencies { testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') - testImplementation('com.alibaba.testable:testable-all:0.7.3') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.3') + testImplementation('com.alibaba.testable:testable-all:0.7.4') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.4') } tasks.withType(JavaCompile) { diff --git a/demo/java-demo/pom.xml b/demo/java-demo/pom.xml index 0608863..6e1f1c0 100644 --- a/demo/java-demo/pom.xml +++ b/demo/java-demo/pom.xml @@ -12,7 +12,7 @@ 1.8 1.8 5.6.2 - 0.7.3 + 0.7.4 diff --git a/demo/kotlin-demo/build.gradle.kts b/demo/kotlin-demo/build.gradle.kts index ac30216..b8e2205 100644 --- a/demo/kotlin-demo/build.gradle.kts +++ b/demo/kotlin-demo/build.gradle.kts @@ -17,8 +17,8 @@ dependencies { implementation("org.jetbrains.kotlin:kotlin-reflect") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") testImplementation("org.junit.jupiter:junit-jupiter:5.6.2") - testImplementation("com.alibaba.testable:testable-all:0.7.3") - testAnnotationProcessor("com.alibaba.testable:testable-processor:0.7.3") + testImplementation("com.alibaba.testable:testable-all:0.7.4") + testAnnotationProcessor("com.alibaba.testable:testable-processor:0.7.4") } tasks.withType { diff --git a/demo/kotlin-demo/pom.xml b/demo/kotlin-demo/pom.xml index f5e54e6..d463c3a 100644 --- a/demo/kotlin-demo/pom.xml +++ b/demo/kotlin-demo/pom.xml @@ -14,7 +14,7 @@ 1.8 1.8 5.6.2 - 0.7.3 + 0.7.4 diff --git a/demo/spock-demo/build.gradle b/demo/spock-demo/build.gradle index 2c932dc..e908fc7 100644 --- a/demo/spock-demo/build.gradle +++ b/demo/spock-demo/build.gradle @@ -14,8 +14,8 @@ repositories { dependencies { testImplementation 'org.codehaus.groovy:groovy-all:3.0.7' testImplementation 'org.spockframework:spock-core:2.0-M5-groovy-3.0' - testImplementation('com.alibaba.testable:testable-all:0.7.3') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.3') + testImplementation('com.alibaba.testable:testable-all:0.7.4') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.4') } tasks.withType(JavaCompile) { diff --git a/demo/spock-demo/pom.xml b/demo/spock-demo/pom.xml index e814203..57d4134 100644 --- a/demo/spock-demo/pom.xml +++ b/demo/spock-demo/pom.xml @@ -12,7 +12,7 @@ 1.8 1.8 1.8 - 0.7.3 + 0.7.4 diff --git a/docs/en-us/doc/release-note.md b/docs/en-us/doc/release-note.md index 05b4113..a3364bc 100644 --- a/docs/en-us/doc/release-note.md +++ b/docs/en-us/doc/release-note.md @@ -1,5 +1,8 @@ # Release Note +## 0.7.4 +- fix an `OmniConstructor.newInstance()` fail issue caused by `java.net.URL` class cannot be instrumented + ## 0.7.3 - fix an issue cause mock failed with referring to method defined in interface diff --git a/docs/en-us/doc/setup.md b/docs/en-us/doc/setup.md index 2d40170..1175aca 100644 --- a/docs/en-us/doc/setup.md +++ b/docs/en-us/doc/setup.md @@ -16,7 +16,7 @@ It is recommended to add a `property` field that identifies the TestableMock ver ```xml - 0.7.3 + 0.7.4 ``` @@ -63,8 +63,8 @@ Add dependence of `TestableMock` in `build.gradle` file: ```groovy dependencies { - testImplementation('com.alibaba.testable:testable-all:0.7.3') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.3') + testImplementation('com.alibaba.testable:testable-all:0.7.4') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.4') } ``` diff --git a/docs/en-us/doc/use-intellij-plugin.md b/docs/en-us/doc/use-intellij-plugin.md new file mode 100644 index 0000000..4f154a9 --- /dev/null +++ b/docs/en-us/doc/use-intellij-plugin.md @@ -0,0 +1,2 @@ +Use IntelliJ Plugin +--- diff --git a/docs/en-us/sidebar.md b/docs/en-us/sidebar.md index 51b5927..712287e 100644 --- a/docs/en-us/sidebar.md +++ b/docs/en-us/sidebar.md @@ -11,6 +11,7 @@ - [Reusing Mock Methods](en-us/doc/mock-method-reusing.md) - [Use MockWith Annotation](en-us/doc/use-mock-with.md) - [Use Package Mapping](en-us/doc/use-package-mapping.md) + - [Use IntelliJ Plugin](en-us/doc/use-intellij-plugin.md) - [Frequently Asked Questions](en-us/doc/frequently-asked-questions.md) - [Mock Invocation In Thread Pool](zh-cn/doc/with-thread-pool.md) - [Use TestableMock In IDE](en-us/doc/use-in-ide.md) diff --git a/docs/zh-cn/doc/release-note.md b/docs/zh-cn/doc/release-note.md index adb43ea..9caf6ea 100644 --- a/docs/zh-cn/doc/release-note.md +++ b/docs/zh-cn/doc/release-note.md @@ -1,5 +1,8 @@ # Release Note +## 0.7.4 +- 修复`java.net.URL`类无法被instrument导致使用`OmniConstructor`构造报错的问题(issue-261) + ## 0.7.3 - 修复接口方法引用导致Mock报错的问题(issue-254) diff --git a/docs/zh-cn/doc/setup.md b/docs/zh-cn/doc/setup.md index 4a1fda8..3446bb1 100644 --- a/docs/zh-cn/doc/setup.md +++ b/docs/zh-cn/doc/setup.md @@ -16,7 +16,7 @@ ```xml - 0.7.3 + 0.7.4 ``` @@ -63,8 +63,8 @@ ```groovy dependencies { - testImplementation('com.alibaba.testable:testable-all:0.7.3') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.3') + testImplementation('com.alibaba.testable:testable-all:0.7.4') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.4') } ``` @@ -110,4 +110,6 @@ test { > sourceCompatibility = '6' // 或7/8/9/... > ``` > +> **注意**:由于`Spock`采用基于字符串解析的特殊执行方式,`TestableTool`工具类在`Spock`框架中无法使用。 +> > 完整代码可参考`demo/spock-demo`示例项目。 diff --git a/docs/zh-cn/doc/use-intellij-plugin.md b/docs/zh-cn/doc/use-intellij-plugin.md new file mode 100644 index 0000000..c1bc9a3 --- /dev/null +++ b/docs/zh-cn/doc/use-intellij-plugin.md @@ -0,0 +1,2 @@ +使用IntelliJ插件 +--- diff --git a/docs/zh-cn/sidebar.md b/docs/zh-cn/sidebar.md index bb47d0e..b973ab3 100644 --- a/docs/zh-cn/sidebar.md +++ b/docs/zh-cn/sidebar.md @@ -11,6 +11,7 @@ - [复用Mock类与方法](zh-cn/doc/mock-method-reusing.md) - [使用MockWith注解](zh-cn/doc/use-mock-with.md) - [使用包路径映射](zh-cn/doc/use-package-mapping.md) + - [使用IntelliJ插件](zh-cn/doc/use-intellij-plugin.md) - [常见使用问题](zh-cn/doc/frequently-asked-questions.md) - [Mock线程池内的调用](zh-cn/doc/with-thread-pool.md) - [在IDE运行单元测试](zh-cn/doc/use-in-ide.md) diff --git a/testable-agent/pom.xml b/testable-agent/pom.xml index 3c6eacd..1cb3f46 100755 --- a/testable-agent/pom.xml +++ b/testable-agent/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.7.3 + 0.7.4 ../testable-parent testable-agent diff --git a/testable-all/pom.xml b/testable-all/pom.xml index e7a7127..c2eceb3 100644 --- a/testable-all/pom.xml +++ b/testable-all/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.7.3 + 0.7.4 ../testable-parent testable-all diff --git a/testable-core/pom.xml b/testable-core/pom.xml index 5074e48..9f02a1f 100644 --- a/testable-core/pom.xml +++ b/testable-core/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.7.3 + 0.7.4 ../testable-parent testable-core diff --git a/testable-maven-plugin/pom.xml b/testable-maven-plugin/pom.xml index 712f396..ba996b7 100644 --- a/testable-maven-plugin/pom.xml +++ b/testable-maven-plugin/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.7.3 + 0.7.4 ../testable-parent testable-maven-plugin diff --git a/testable-parent/pom.xml b/testable-parent/pom.xml index d7373ce..52f3aff 100644 --- a/testable-parent/pom.xml +++ b/testable-parent/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.alibaba.testable testable-parent - 0.7.3 + 0.7.4 pom testable-parent Unit test enhancement toolkit @@ -42,7 +42,7 @@ 1.6 1.6.8 3.6.0 - 0.7.3 + 0.7.4 diff --git a/testable-processor/pom.xml b/testable-processor/pom.xml index a03dd7e..39c5a45 100644 --- a/testable-processor/pom.xml +++ b/testable-processor/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.7.3 + 0.7.4 ../testable-parent testable-processor