alibaba / alibaba/testable-mock
关于mock的使用问题
Open
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
先说场景:
1.正常使用teatable-mock,分层写完每层的mock测试类,均可正常执行;
2.编写一个不使用mock的测试类场景,期中由于会调用到不同的bean,当调用到某一个bean时,这个bean在1的场景下,已经进行过mock返回了mock的值;
问题:
我新编写的2场景并未使用mock,而且也不想调用到1场景的mock的结果,我也不想删除原有的mock测试类,如何实现我2的场景能使用原有的bean去执行代码?
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or entry points are mentioned. Reproduce the two scenarios in a minimal Java test setup, then inspect how testable-mock applies and isolates mock results; done means the non-mock test can use the original beans without removing the existing mock test classes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100