Invention Grant
- Patent Title: Reliable unit testing through cached mocking
- Patent Title (中): 可靠的单元测试通过缓存嘲笑
-
Application No.: US13597716Application Date: 2012-08-29
-
Publication No.: US08935573B2Publication Date: 2015-01-13
- Inventor: Steven J. Horsman , Kathleen Sharp
- Applicant: Steven J. Horsman , Kathleen Sharp
- Applicant Address: US NY Armonk
- Assignee: International Business Machines Corporation
- Current Assignee: International Business Machines Corporation
- Current Assignee Address: US NY Armonk
- Agency: Cuenot, Forsythe & Kim, LLC
- Main IPC: G06F11/28
- IPC: G06F11/28

Abstract:
During execution of a unit test, receiving from the unit test a first request referencing a mock object. An instance of the mock object and initial cached mock object data is returned to the test unit, wherein the initial cached mock object data includes first data for a real object represented by the mock object. Second data for the real object represented by the mock object is collected. The second data for the real object is compared to the initial cached mock object data. Responsive to determining that at least one aspect of the second data for the real object does not correspond to the initial cached mock object data, the cached mock object data is updated with the second data for the real object. An indication can be provided to the unit test that the initial cached mock object data returned to the unit test is unreliable.
Public/Granted literature
- US20140068334A1 RELIABLE UNIT TESTING THROUGH CACHED MOCKING Public/Granted day:2014-03-06
Information query