-
Notifications
You must be signed in to change notification settings - Fork 97
Stack Trace Oracle #1336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Stack Trace Oracle #1336
Conversation
|
||
val body = result.getBody() | ||
|
||
if(body != null && StackTraceUtils.looksLikeStackTrace(body)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somehow, this check should be done in the fitness function as well. otherwise, if a test is cloned and its fitness recomputed, we lose the info.
in the fitness function, it could be checked only for 500 and for SECURITY type tests
copyTarget.evaluatedMainActions().forEach { action -> | ||
// body | ||
val result = (action.result as RestCallResult) | ||
val action = (action.action as RestCallAction) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't action
here overshadow the action
in line 310
?
also, shouldn't we just look at the ones with same verb and path from 310 instead of all actions in a test?
* @param text the log or string to analyze | ||
* @return true if the text appears to be a stack trace | ||
*/ | ||
fun looksLikeStackTrace(text: String): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need several unit test for this function, with example of real-world response strings (taking from googling) from different languages (at least the ones we use here) and major frameworks.
we need both "positive" and "negative" examples
actionResults: List<ActionResult>, | ||
fv: FitnessValue | ||
) { | ||
for(index in individual.seeMainExecutableActions().indices){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't be a check for config.getDisabledOracleCodesList()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this check for all oracle types in the AbstractRestFitness.
*/ | ||
private fun handleStackTraceCheck(){ | ||
|
||
mainloop@ for(action in actionDefinitions){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check for config.getDisabledOracleCodesList()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am checking it in accessControlBasedOnRESTGuidelines.
|
||
mainloop@ for(action in actionDefinitions){ | ||
|
||
val suspicious = RestIndividualSelectorUtils.findIndividuals( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need a bit of code comments to explain why we need BOTH the check here and in the fitness function.
- here: because we need to make sure 500 from archive are re-executed and added back with SECURITY tag if fault found
- in ff: to avoid losing info if test is re-evaluated
@omursahin before merging, i just realized that oracle would be on by default. until we run full experiments on WFD, we cannot have it. |
No description provided.