Two step process
- Process log files to produce DB records (each file to be processed only once)
- Use DB to generate test cases
Step 1 can start as soon as data starts flowing in. Step 2 need user input starting with which class to generate test case for.
- SQL database (sqlite ATM)
- Querying for available test candidates based on class type is single query lookup.
- DB also has information of all the calls ever made thru the execution (and not just the ones we would actually need)
- Time taken for each call is available
Individual unique objects of a particular type, is made up of the following
- Parameter testSubject: Specific object instance (ID's are long numbers so showing them would not make much sense)
- MethodCallExpression mainMethod: The Call which we are going to test
- List fields: of the test candidate:
- eg private Gson gson, need(should) not be mocked
- eg AyuCityHelper ayuCityHelper, probably should be mocked
- List callsToMock: (we have a list of all calls within the span of the mainMethod):
- static calls [Classname.methodCall()]
- normal calls [objectName.methodCall()]
A method call on a particular object, is made of the following
- Parameter subject: objectId on which call was invoked (null if static call)
- List arguments: method arguments (are not going to be primitive types in most cases)
- Parameter returnValue: return value, can be an exception type
- Int callStack: the depth at which this call was made (sometime we might need to mock a deep call
- Long => call time nano seconds (time taken to execute to call based on the recording)
This represents a specific instance of any class type
- value: or id/long number uniquely identifies a value in jvm (can have multiple names in different context)
- type: class name (while these can be multiple for an object, we will record the most relevant, which means the one at the bottom of the class hierarchy)
- exceptional: if this object was used in throw .
- serializedValue: value as json if recorded (only for certain events we record serialized values)
- probeInfo: the associated probe from which we collected this information