sub-property error
Hi, thank you for this amazing tool!
I found an error with finding sub-property.
In the CoverageGatherer.addResponseBodyPropertiesCriterion method, it tries to recursively find sub-properties.
However, if A definition has a $ref value of B definition and B definition has a $ref value of A definition, RESTest traverse A and B until it gets stack limit error.
For example, in the EvoMaster's benchmark repo, they have scout-api project which has "user" definition and "user identity" definition. They refer each other, so RESTest gets an stack limit error.
Hi @sooding93
Thanks a lot for your interest in RESTest.
Indeed, we've been having troubles with the Coverage module for some time, due to that kind of issues. If you disabled the Coverage feature of RESTest, then you wouldn't have any problems. But I don't think there's a way to completely disable it as of now. We'll create a fix, either to disable the coverage or to handle those scenarios (cyclic objects). I'm aware of how it's done in EvoMaster, so it shouldn't be too hard.
Could I just delete CoverageGatherer.java file's this part for now? (line 375 ~377)
for (Entry<String, Schema> openApiProperty: openApiProperties.entrySet()) { // Recursively add criteria for each property addResponseBodyPropertiesCriterion(openApiProperty.getValue(), criteria, baseRootPath+openApiProperty.getKey()); // update rootPath with the name of the property }
After I comment it, I don't have errors any more.
Yes, that should probably work. Basically you're telling RESTest not to collect coverage information for some nested response body properties, but the testing functionality will be exactly the same.