We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDK jdk1.8.0_291.jdk
IDEA版本: IntelliJ IDEA 2022.3.1 (Ultimate Edition) Build #IU-223.8214.52, built on December 20, 2022
The text was updated successfully, but these errors were encountered:
经过排查,发现testable.properties配置文件不生效 我是使用spock测试框架
配置文件不生效怎么排查呢
Sorry, something went wrong.
再排查,发现可能是环境上哪里有问题,导致testable-agent无法直接识别出test/resource下的testable.properties配置文件,使用pom指定相对于根路径的path,可以成功
使用的是spock框架,开启了增强omni.constructor.enhance.enable=true 测试用例里使用spock的Mock方法时,会出现报错:构造方法重复
Duplicate method name "" with signature "(Ljava.lang.Void;)V" in class
请问spock对于spock的搭配,具体实践还是new 实际类麽?
附上场景代码
`class OmniConstructorTest extends Specification {
@SpringBean private SomeServiceClass contractClient = Mock() @MockDiagnose(LogLevel.VERBOSE) static class Mock { } @Unroll def "omniConstructor"() { def bigDecimal = OmniConstructor.newInstance(BigDecimal.class) def date = OmniConstructor.newInstance(Date.class) def longNumber = OmniConstructor.newInstance(Long.class) def bigInt = OmniConstructor.newInstance(BigInteger.class) expect: assert 0 == OmniConstructor.newInstance(int.class) assert 0L == OmniConstructor.newInstance(Long.class) assert "" == OmniConstructor.newInstance(String.class) assert LogLevel.DISABLE == OmniConstructor.newInstance(LogLevel.class) assert 0.0 == bigDecimal assert date.getTime() > 0 assert longNumber == 0L assert bigInt.intValue() == 0 }
}`
No branches or pull requests
JDK
jdk1.8.0_291.jdk
IDEA版本:
IntelliJ IDEA 2022.3.1 (Ultimate Edition)
Build #IU-223.8214.52, built on December 20, 2022
The text was updated successfully, but these errors were encountered: