From 2806d38c941c0b43a42e47f3747b23f8c692b86f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E6=88=9F?= Date: Tue, 5 Jan 2021 15:51:22 +0800 Subject: [PATCH] add shorten command line issue to faq --- docs/en-us/doc/frequently-asked-questions.md | 6 ++++++ docs/zh-cn/doc/frequently-asked-questions.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/docs/en-us/doc/frequently-asked-questions.md b/docs/en-us/doc/frequently-asked-questions.md index 2189270..98a0e47 100644 --- a/docs/en-us/doc/frequently-asked-questions.md +++ b/docs/en-us/doc/frequently-asked-questions.md @@ -66,3 +66,9 @@ private static int getXxx(Demo self) {} ``` In the next major iteration (**i.e. `v0.5`**), the mock implementation mechanism will be modified while maintaining the current mock experience. Then, it will be no longer necessary to modify the mock method to a static method, and completely solving this problem. + +#### 9. Meet "Command Line is too Long. Shorten command line for ..." error when triggering test in IntelliJ IDE? + +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) diff --git a/docs/zh-cn/doc/frequently-asked-questions.md b/docs/zh-cn/doc/frequently-asked-questions.md index 36a30a6..f607b84 100644 --- a/docs/zh-cn/doc/frequently-asked-questions.md +++ b/docs/zh-cn/doc/frequently-asked-questions.md @@ -66,3 +66,9 @@ private static int getXxx(Demo self) {} ``` 在下一个大迭代版本(**即`0.5`版本**)中,将会在保持当前Mock体验的前提下,对Mock的实现机制进行修改,不再需要修改Mock方法为静态方法,从而彻底解决此类报错问题。 + +#### 9. 在IntelliJ运行测试报"Command Line is too Long. Shorten command line for ..."错误? + +这个问题是由于系统ClassPath包含太多路径所致,与是否使用`TestableMock`无关。但需要注意的是,IntelliJ提供了两种辅助解决机制:`JAR manifest`和`classpath file`,若测试中使用了`TestableMock`,请选择`JAR manifest`。 + +![jar-manifest](https://testable-code.oss-cn-beijing.aliyuncs.com/jar-manifest.png)