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

@omursahin omursahin requested a review from arcuri82 October 8, 2025 07:01
actionResults: List<ActionResult>,
fv: FitnessValue
) {
for(index in individual.seeMainExecutableActions().indices){
Copy link
Collaborator

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()?

Copy link
Collaborator Author

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for config.getDisabledOracleCodesList() ?

Copy link
Collaborator Author

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(
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 a bit of code comments to explain why we need BOTH the check here and in the fitness function.

  1. here: because we need to make sure 500 from archive are re-executed and added back with SECURITY tag if fault found
  2. in ff: to avoid losing info if test is re-evaluated

@omursahin omursahin requested a review from arcuri82 October 8, 2025 12:31
@arcuri82
Copy link
Collaborator

@omursahin before merging, i just realized that oracle would be on by default. until we run full experiments on WFD, we cannot have it.
In a new branch, we need the following: have new EMConfig option called useExperimentalOracles, with false by default. then, in EMConfig we can have method to check if an oracle can be used. this would be based on config.getDisabledOracleCodesList() and useExperimentalOracles if code is 9xx. once we have than, then we can update and merge this branch

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