Reliable unit testing through cached mocking
US8935573B2 · kind B2 · utility
Assignee
Inventors
Key dates
| Filing date | Aug 29, 2012 |
| Grant date | Jan 13, 2015 |
| Priority date | — |
| Expiry date | Feb 5, 2033 |
Classification
- Technology area (CPC G)Physics
- CPC primaryG06F11/3684
- WIPO fieldComputer technology
- WIPO sectorElectrical engineering
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.
Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.