release v0.6.7

This commit is contained in:
金戟
2021-06-11 17:36:43 +08:00
parent e812aa6126
commit fd3b088f59
18 changed files with 31 additions and 29 deletions

View File

@@ -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.6.6'
testImplementation 'com.alibaba.testable:testable-all:0.6.7'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

View File

@@ -13,8 +13,8 @@ repositories {
dependencies {
testImplementation('org.junit.jupiter:junit-jupiter:5.6.2')
testImplementation('com.alibaba.testable:testable-all:0.6.6')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.6')
testImplementation('com.alibaba.testable:testable-all:0.6.7')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.7')
}
tasks.withType(JavaCompile) {

View File

@@ -12,7 +12,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<junit.version>5.6.2</junit.version>
<testable.version>0.6.6</testable.version>
<testable.version>0.6.7</testable.version>
</properties>
<dependencies>

View File

@@ -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.6.6")
testAnnotationProcessor("com.alibaba.testable:testable-processor:0.6.6")
testImplementation("com.alibaba.testable:testable-all:0.6.7")
testAnnotationProcessor("com.alibaba.testable:testable-processor:0.6.7")
}
tasks.withType<KotlinCompile> {

View File

@@ -14,7 +14,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<junit.version>5.6.2</junit.version>
<testable.version>0.6.6</testable.version>
<testable.version>0.6.7</testable.version>
</properties>
<dependencies>

View File

@@ -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.6.6')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.6')
testImplementation('com.alibaba.testable:testable-all:0.6.7')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.7')
}
tasks.withType(JavaCompile) {

View File

@@ -12,7 +12,7 @@
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<testable.version>0.6.6</testable.version>
<testable.version>0.6.7</testable.version>
</properties>
<dependencyManagement>

View File

@@ -1,5 +1,9 @@
# Release Note
## 0.6.7
- support empty mock container class which has all mock methods in its parent
- fix an issue cause mock fail when parameter has array element accessing
## 0.6.6
- support global package path mapping for easier mocking code of 3rd packages
- complete mock target checking, improve resistance to code refactoring

View File

@@ -17,7 +17,7 @@ It is recommended to add a `property` field that identifies the TestableMock ver
```xml
<properties>
<testable.version>0.6.6</testable.version>
<testable.version>0.6.7</testable.version>
</properties>
```
@@ -64,8 +64,8 @@ Add dependence of `TestableMock` in `build.gradle` file:
```groovy
dependencies {
testImplementation('com.alibaba.testable:testable-all:0.6.6')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.6')
testImplementation('com.alibaba.testable:testable-all:0.6.7')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.7')
}
```

View File

@@ -1,5 +1,9 @@
# Release Note
## 0.6.7
- 支持所有Mock方法都定义在父类中的空Mock容器类issue-167
- 修复一处导致参数包含数组下标读取的调用无法Mock的问题issue-171
## 0.6.6
- 支持全局参数配置Mock容器的包路径映射便于Mock三方包内的代码issue-105
- 实现Mock功能的防代码重构机制issue-5

View File

@@ -17,7 +17,7 @@
```xml
<properties>
<testable.version>0.6.6</testable.version>
<testable.version>0.6.7</testable.version>
</properties>
```
@@ -64,8 +64,8 @@
```groovy
dependencies {
testImplementation('com.alibaba.testable:testable-all:0.6.6')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.6')
testImplementation('com.alibaba.testable:testable-all:0.6.7')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.7')
}
```

View File

@@ -89,9 +89,3 @@ public class ServiceTest {
完整代码示例见`java-demo``kotlin-demo`示例项目中`OneToMultiSvcTest`测试类的用例。
> 由于测试类无法通过`@MockWith`与多个Mock容器关联目前这种用法仅支持生效范围为`MockScope.GLOBAL`的Mock方法。
### 4. 使用不包含Mock方法的Mock容器类
为了加快搜索Mock容器类的速度在扫描过程中`TestableMock`只会将自身定义有Mock方法包含`@MockMethod``@MockMockConstructor`注解的方法)以及明确被`@MockWith`指向的类识别为有效的Mock容器而不会去遍历其父类。
假如出于某些极特殊原因要使用无Mock方法的类型作为Mock容器譬如希望将实际Mock方法均定义在父类实际使用的子容器仅仅重载父类的某些特定方法。此时即使Mock容器类的位置符合约定为了能够被识别依然应该在相应的测试类上增加对Mock容器类的`@MockWith`引用。

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.6.6</version>
<version>0.6.7</version>
<relativePath>../testable-parent</relativePath>
</parent>
<artifactId>testable-agent</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.6.6</version>
<version>0.6.7</version>
<relativePath>../testable-parent</relativePath>
</parent>
<artifactId>testable-all</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.6.6</version>
<version>0.6.7</version>
<relativePath>../testable-parent</relativePath>
</parent>
<artifactId>testable-core</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.6.6</version>
<version>0.6.7</version>
<relativePath>../testable-parent</relativePath>
</parent>
<artifactId>testable-maven-plugin</artifactId>

View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.6.6</version>
<version>0.6.7</version>
<packaging>pom</packaging>
<name>testable-parent</name>
<description>Unit test enhancement toolkit</description>
@@ -42,7 +42,7 @@
<plugin.gpg.version>1.6</plugin.gpg.version>
<plugin.staging.version>1.6.8</plugin.staging.version>
<plugin.maven.version>3.6.0</plugin.maven.version>
<testable.version>0.6.6</testable.version>
<testable.version>0.6.7</testable.version>
</properties>
<profiles>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.6.6</version>
<version>0.6.7</version>
<relativePath>../testable-parent</relativePath>
</parent>
<artifactId>testable-processor</artifactId>