hold images in cdn

This commit is contained in:
金戟 2021-09-15 21:11:29 +08:00
parent 6616ff1174
commit b47204e329
8 changed files with 10 additions and 10 deletions

View File

@ -10,4 +10,4 @@ However, when the current mainstream mock framework implements the mock function
Therefore, we developed `TestableMock`, **a maverick and lightweight mock tool**.
![mock](https://testable-code.oss-cn-beijing.aliyuncs.com/en-us/mock-simpson.png)
![mock-simpson-en-us.png](https://img.alicdn.com/imgextra/i2/O1CN01CdAfqR1tP2iqFC14g_!!6000000005893-2-tps-500-761.png)

View File

@ -61,4 +61,4 @@ This framework will run Android unit tests on a standard JVM virtual machine, wh
This problem is caused by the system `Class Path` content is too long, and has nothing to do with `TestableMock`. However, it should be noted that IntelliJ provides two auxiliary solutions: `JAR manifest` and `classpath file`. If `TestableMock` is used in the test, please select `JAR manifest`.
![jar-manifest](https://testable-code.oss-cn-beijing.aliyuncs.com/jar-manifest.png)
![jar-manifest.png](https://img.alicdn.com/imgextra/i2/O1CN01hfC5YE1Kw0gBIlB2x_!!6000000001227-2-tps-752-171.png)

View File

@ -15,4 +15,4 @@ At the same time, because the built-in unit test executor of `Eclipse` completel
Take the use of `JUnit` as an example. You need to pull down from the small triangle next to the run button on the IDE toolbar, select "Run Configurations...", select the task to run the unit test on the left side, and switch to "arguments" Tab on the right side, append a `-javaagent:` parameter in the "VM Options", the following figure is an example, note that the `testable-agent` package should be modified to match the actual situation of the local Maven repository path.
![eclipse-junit-configuration](https://testable-code.oss-cn-beijing.aliyuncs.com/eclipse-junit-configuration.png)
![eclipse-junit-configuration.png](https://img.alicdn.com/imgextra/i3/O1CN01C7DwGs1dHgVRAhh3y_!!6000000003711-2-tps-1430-1004.png)

View File

@ -29,13 +29,13 @@ This is because the IDE usually only runs the `maven-surefire-plugin` plugin whe
This problem can be bypassed by configuring the test parameters of the IDE additionally. Take IntelliJ as an example, open the "Edit Configuration..." option of the run menu, as shown in the position ①
![modify-run-configuration](https://testable-code.oss-cn-beijing.aliyuncs.com/modify-run-configuration.png)
![modify-run-configuration.png](https://img.alicdn.com/imgextra/i3/O1CN01HLlNyZ1gezVe4AOiE_!!6000000004168-2-tps-1036-184.png)
Add JavaAgent startup parameters at the end of the "virtual machine parameters" attribute value: `-javaagent:${HOME}/.m2/repository/com/alibaba/testable/testable-agent/xyz/testable-agent-xyzjar`, as shown in the figure position ②
> PS: Please replace `x.y.z` in the path with the actual version number
![add-testable-javaagent](https://testable-code.oss-cn-beijing.aliyuncs.com/add-testable-javaagent.png)
![add-testable-javaagent.png](https://img.alicdn.com/imgextra/i4/O1CN01pdxC8S1R2JpXX8aOJ_!!6000000002053-2-tps-2446-486.png)
Finally, click to run the unit test, as shown in the position ③

View File

@ -9,4 +9,4 @@ TestableMock简介
于是,我们开发了`TestableMock`**一款特立独行的轻量Mock工具**。
![mock](https://testable-code.oss-cn-beijing.aliyuncs.com/mock-simpson.png)
![mock-simpson-zh-cn.png](https://img.alicdn.com/imgextra/i2/O1CN01uPzi441cxzTZzhUWT_!!6000000003668-2-tps-500-761.png)

View File

@ -63,4 +63,4 @@ Kotlin语言中的`String`类型实际上是`kotlin.String`,而非`java.lang.S
这个问题是由于系统ClassPath包含太多路径所致与是否使用`TestableMock`无关。但需要注意的是IntelliJ提供了两种辅助解决机制`JAR manifest`和`classpath file`,若测试中使用了`TestableMock`,请选择`JAR manifest`。
![jar-manifest](https://testable-code.oss-cn-beijing.aliyuncs.com/jar-manifest.png)
![jar-manifest.png](https://img.alicdn.com/imgextra/i2/O1CN01hfC5YE1Kw0gBIlB2x_!!6000000001227-2-tps-752-171.png)

View File

@ -15,4 +15,4 @@ IntelliJ IDE对`TestableMock`所用到的`JSR-269`注释处理器以及`maven-su
以使用`JUnit`为例方法为从IDE工具栏的运行按钮旁边的小三角处下拉选择"Run Configurations...",左侧选择要运行单元测试的任务,在右侧切换到"arguments"标签页,在"VM Options"里添加`-javaagent:`参数,下图为示例,注意应修改`testable-agent`包为与实际情况匹配的本地Maven仓库路径。
![eclipse-junit-configuration](https://testable-code.oss-cn-beijing.aliyuncs.com/eclipse-junit-configuration.png)
![eclipse-junit-configuration.png](https://img.alicdn.com/imgextra/i3/O1CN01C7DwGs1dHgVRAhh3y_!!6000000003711-2-tps-1430-1004.png)

View File

@ -31,13 +31,13 @@
该问题可以通过额外配置IDE的测试参数绕过。以IntelliJ为例打开运行菜单的"编辑配置..."选型,如图中位置①
![modify-run-configuration](https://testable-code.oss-cn-beijing.aliyuncs.com/modify-run-configuration.png)
![modify-run-configuration.png](https://img.alicdn.com/imgextra/i3/O1CN01HLlNyZ1gezVe4AOiE_!!6000000004168-2-tps-1036-184.png)
在"虚拟机参数"属性值末尾添加JavaAgent启动参数`-javaagent:${HOME}/.m2/repository/com/alibaba/testable/testable-agent/x.y.z/testable-agent-x.y.z.jar`,如图中位置②
> PS请将路径中的`x.y.z`替换成实际使用的版本号
![add-testable-javaagent](https://testable-code.oss-cn-beijing.aliyuncs.com/add-testable-javaagent.png)
![add-testable-javaagent.png](https://img.alicdn.com/imgextra/i4/O1CN01pdxC8S1R2JpXX8aOJ_!!6000000002053-2-tps-2446-486.png)
最后点击运行单元测试,如图中位置③