alibaba / alibaba/testable-mock

TestableMock在使用时仍然会加载环境配置,如果有未mock的方法,在运行测试类时会真实执行

Open
#82 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
1.8k
Forks
306
PR merge metrics
No merged PRs in 30d

Description

如果存在未mock的方法,会在测试类执行时候真实的执行代码逻辑,有什么方法可以避免这种情况吗?在powermock中是依靠@PrepareForTest注解和@Mock等注解配合实现的,但是在TestableMock中注解好像不适用

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the behavior in a test class containing an unmocked method, then inspect how TestableMock handles environment configuration and unmocked calls. Compare the expected isolation with the PowerMock annotations mentioned in the issue; done means unmocked methods no longer execute real code during the test class run.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.