alibaba / alibaba/testable-mock
被测类间接依赖的静态方法调用没法mock
Open
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
被测类A,有个方法a,a方法里生成了个对象b,b的某个方法调用Utils的静态方法s,该静态方法mock不生效
但若在a中直接调用静态方法s,则mock生效
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with issue #287's A.a, the object B it creates, and B's call to Utils.s; compare that path with calling Utils.s directly from A.a. Trace the static-method mocking entry point and run or add a regression reproduction for both cases. Done means the indirect call is mocked consistently with the direct call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100