GC Test framework
Publication Date: 2015-Nov-13
The IP.com Prior Art Database
Disclosed is a reusable test framework to facilitate test developing for a Garbage Collector (GC) component in a runtime project.
Page 01 of 3
GC Test framework
The existing testing solution for a Garbage Collector (GC) component in a runtime project places tests in a language layer, which introduces a large amount of duplication because the runtime project aims to support multiple languages . Adding and maintaining tests in a lower layer are time-consuming and error-prone, due to the complicated nature of the GC component.
The novel solution is a language-agnostic test framework to help write targeted GC tests with lower development costs and higher maintainability.
The test framework is language-agnostic to test as low in the stack as possible to avoid duplicate tests in all the different languages supported. It is able to exercise targeted GC functionality by parsing a user defined configuration file. The configuration file can be used to describe GC options, object patterns (with configurable tree structures and object size), and test success criteria in order to simulate real world environment. To add a new test case, the user only needs to define a test scenario in a configuration file and feed it to the framework.
Figure 1: Language Agnostic Testing
Page 02 of 3
As shown in Figure1, instead of calling a language Application Programming Interface (API), the test framework directly invokes low layer GC API to trigger the targeted behavior.
Figure 2: GC Test Framework
The configuration file is a visualized way to specify GC test inputs; it can be used to define:
Page 03 of 3
• GC options, such as initial and max memory size • Object patterns, such as various object trees for GC to allocate or mutate • Test passing criteria
• All other kinds of inputs that can affect test results