Skip to content

Conversation

omursahin
Copy link
Collaborator

No description provided.

@omursahin omursahin requested a review from arcuri82 October 6, 2025 11:58

val body = result.getBody()

if(body != null && StackTraceUtils.looksLikeStackTrace(body)){
Copy link
Collaborator

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)
Copy link
Collaborator

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 {
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants