Ask a Question

Prefer a chat interface with context about you and your work?

Tests as Maintainable Assets Via Auto-generated Spies: A case study involving the Scala collections library's Iterator trait

Tests as Maintainable Assets Via Auto-generated Spies: A case study involving the Scala collections library's Iterator trait

In testing stateful abstractions, it is often necessary to record interactions, such as method invocations, and express assertions over these interactions. Following the Test Spy design pattern, we can reify such interactions programmatically through additional mutable state. Alternatively, a mocking framework, such as Mockito, can automatically generate test spies that …