diff --git a/demo/android-demo/app/build.gradle b/demo/android-demo/app/build.gradle index 3f10d94..16432b7 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.7' + testImplementation 'com.alibaba.testable:testable-all:0.7.8' 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 83fab39..bed7618 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.7') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.7') + testImplementation('com.alibaba.testable:testable-all:0.7.8') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.8') } tasks.withType(JavaCompile) { diff --git a/demo/java-demo/pom.xml b/demo/java-demo/pom.xml index 098ead7..de4e8a5 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.7 + 0.7.8 diff --git a/demo/kotlin-demo/build.gradle.kts b/demo/kotlin-demo/build.gradle.kts index c49a758..5393678 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.7") - testAnnotationProcessor("com.alibaba.testable:testable-processor:0.7.7") + testImplementation("com.alibaba.testable:testable-all:0.7.8") + testAnnotationProcessor("com.alibaba.testable:testable-processor:0.7.8") } tasks.withType { diff --git a/demo/kotlin-demo/pom.xml b/demo/kotlin-demo/pom.xml index 5ca7ebc..76e5681 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.7 + 0.7.8 diff --git a/demo/spock-demo/build.gradle b/demo/spock-demo/build.gradle index f453c86..14adafd 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.7') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.7') + testImplementation('com.alibaba.testable:testable-all:0.7.8') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.8') } tasks.withType(JavaCompile) { diff --git a/demo/spock-demo/pom.xml b/demo/spock-demo/pom.xml index 63e10a5..077d8ca 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.7 + 0.7.8 diff --git a/docs/en-us/doc/omni-constructor.md b/docs/en-us/doc/omni-constructor.md index b2aff6a..975a155 100644 --- a/docs/en-us/doc/omni-constructor.md +++ b/docs/en-us/doc/omni-constructor.md @@ -35,9 +35,7 @@ Parent parent = OmniConstructor.newInstance(Parent.class); parent.getChild().getGrandChild().getContent(); ``` -> **Note 1**: In the current version, the member fields of type interface or abstract class will still be initialized to `null`, this problem will be fixed in the future. -> -> **Note 2**: Based on the light-weight principle, in the default mode, `OmniConstructor` will only uses the original constructor of the class to create objects. For POJO and most model layer objects, this mode has been able to meet the needs. +> **Note**: Based on the light-weight principle, in the default mode, `OmniConstructor` will only uses the original constructor of the class to create objects. For POJO and most model layer objects, this mode has been able to meet the needs. > But for more complex situations, such as when certain class have constructors throwing exceptions or contain other statements that hinder the normal execution of the construction, the object construction may fail. > In those situations, you can use the [Testable global configuration](en-us/doc/javaagent-args.md) `omni.constructor.enhance.enable = true` to enable bytecode enhancement mode of `OmniConstructor`, in this mode, any Java class can be constructed. diff --git a/docs/en-us/doc/release-note.md b/docs/en-us/doc/release-note.md index 3792cb8..d906ae3 100644 --- a/docs/en-us/doc/release-note.md +++ b/docs/en-us/doc/release-note.md @@ -1,10 +1,14 @@ # Release Note -## 0.7.7 +## 0.7.8 +- support use `OmniConstructor` class to create instance of interface type or abstract class +- provide a `CollectionUtil` class which contains many utility collection creation methods +- fix a compatibility issue with jdk 1.6 +## 0.7.7 - skip bytecode process for classes which not associated to any mock class, speed up test initialization - only generate substitution method for mocked method references -- fix compatibility issue with jdk 17 +- fix compatibility issues with jdk 17 ## 0.7.6 - define package mapping rule according to order in config, to avoid a short path overwrite longer ones diff --git a/docs/en-us/doc/setup.md b/docs/en-us/doc/setup.md index 15db14a..8119c7e 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.7 + 0.7.8 ``` @@ -63,8 +63,8 @@ Add dependence of `TestableMock` in `build.gradle` file: ```groovy dependencies { - testImplementation('com.alibaba.testable:testable-all:0.7.7') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.7') + testImplementation('com.alibaba.testable:testable-all:0.7.8') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.8') } ``` diff --git a/docs/zh-cn/doc/omni-constructor.md b/docs/zh-cn/doc/omni-constructor.md index 959b768..caa9aed 100644 --- a/docs/zh-cn/doc/omni-constructor.md +++ b/docs/zh-cn/doc/omni-constructor.md @@ -35,9 +35,7 @@ Parent parent = OmniConstructor.newInstance(Parent.class); parent.getChild().getGrandChild().getContent(); ``` -> **注意 1** :在当前版本中,类型为接口或抽象类的成员字段依然会被初始化为`null`,此问题将在后续版本修复 -> -> **注意 2** :基于轻量优先原则,默认模式下,`OmniConstructor`仅利用类型原有的构造方法来创建对象,对于绝大多数POJO和`Model`层对象而言这种模式已经能够满足需要。 +> **注意**:基于轻量优先原则,默认模式下,`OmniConstructor`仅利用类型原有的构造方法来创建对象,对于绝大多数POJO和`Model`层对象而言这种模式已经能够满足需要。 > 但对于更复杂的情形,譬如遇到某些类型的构造方法会抛出异常或包含其他妨碍构造正常执行的语句时,对象构造可能会失败。 > 此时可通过[Testable全局配置](zh-cn/doc/javaagent-args.md)`omni.constructor.enhance.enable = true`启用`OmniConstructor`的字节码增强模式,在该模式下,任何Java类型皆可构造。 diff --git a/docs/zh-cn/doc/release-note.md b/docs/zh-cn/doc/release-note.md index f19fdc6..fa5aa70 100644 --- a/docs/zh-cn/doc/release-note.md +++ b/docs/zh-cn/doc/release-note.md @@ -1,7 +1,11 @@ # Release Note -## 0.7.7 +## 0.7.8 +- 支持使用`OmniConstructor`工具类自动创建接口和抽象类的实例 +- 提供`CollectionUtil`工具类,包含在测试中常用的集合创建方法 +- 修复一处JDK 1.6的兼容问题 +## 0.7.7 - 未关联Mock类的类型自动跳过字节码处理,提升大型项目测试启动速度 - 仅对被Mock的方法引用生成替代方法 (issue-280) - 修复JDK 17的兼容性问题 (issue-283) diff --git a/docs/zh-cn/doc/setup.md b/docs/zh-cn/doc/setup.md index 045a88a..1cbbb9b 100644 --- a/docs/zh-cn/doc/setup.md +++ b/docs/zh-cn/doc/setup.md @@ -16,7 +16,7 @@ ```xml - 0.7.7 + 0.7.8 ``` @@ -63,8 +63,8 @@ ```groovy dependencies { - testImplementation('com.alibaba.testable:testable-all:0.7.7') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.7') + testImplementation('com.alibaba.testable:testable-all:0.7.8') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.8') } ``` diff --git a/testable-agent/pom.xml b/testable-agent/pom.xml index ad92dab..d1e9747 100755 --- a/testable-agent/pom.xml +++ b/testable-agent/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.7.7 + 0.7.8 ../testable-parent testable-agent @@ -123,6 +123,9 @@ jar + + -Xdoclint:none + @@ -137,6 +140,13 @@ sign + + + + --pinentry-mode + loopback + + diff --git a/testable-all/pom.xml b/testable-all/pom.xml index 417b42b..76224dc 100644 --- a/testable-all/pom.xml +++ b/testable-all/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.7.7 + 0.7.8 ../testable-parent testable-all @@ -59,6 +59,9 @@ jar + + -Xdoclint:none + @@ -73,6 +76,13 @@ sign + + + + --pinentry-mode + loopback + + diff --git a/testable-core/pom.xml b/testable-core/pom.xml index 1705768..570f575 100644 --- a/testable-core/pom.xml +++ b/testable-core/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.7.7 + 0.7.8 ../testable-parent testable-core @@ -80,6 +80,9 @@ jar + + -Xdoclint:none + @@ -94,6 +97,13 @@ sign + + + + --pinentry-mode + loopback + + diff --git a/testable-maven-plugin/pom.xml b/testable-maven-plugin/pom.xml index 4816bdd..e5cd37f 100644 --- a/testable-maven-plugin/pom.xml +++ b/testable-maven-plugin/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.7.7 + 0.7.8 ../testable-parent testable-maven-plugin @@ -85,6 +85,9 @@ jar + + -Xdoclint:none + @@ -99,6 +102,13 @@ sign + + + + --pinentry-mode + loopback + + diff --git a/testable-parent/pom.xml b/testable-parent/pom.xml index e5e72e8..2ea0f16 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.7 + 0.7.8 pom testable-parent Unit test enhancement toolkit @@ -33,16 +33,16 @@ 1.6 1.6 UTF-8 - 3.8.1 - 3.0.0-M5 - 3.2.0 - 3.2.4 - 3.2.0 - 3.2.0 - 1.6 - 1.6.8 - 3.6.0 - 0.7.7 + 3.10.1 + 3.0.0-M7 + 3.3.0 + 3.4.1 + 3.2.1 + 3.4.1 + 3.0.1 + 1.6.13 + 3.7.0 + 0.7.8 @@ -73,6 +73,9 @@ jar + + -Xdoclint:none + @@ -87,6 +90,13 @@ sign + + + + --pinentry-mode + loopback + + diff --git a/testable-processor/pom.xml b/testable-processor/pom.xml index 7de6b2c..dbc0c2d 100644 --- a/testable-processor/pom.xml +++ b/testable-processor/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.7.7 + 0.7.8 ../testable-parent testable-processor @@ -92,6 +92,9 @@ jar + + -Xdoclint:none + @@ -106,6 +109,13 @@ sign + + + + --pinentry-mode + loopback + +