Skip to content

Conversation

@WillyEverGreen
Copy link

Currently, the test summary’s reported execution time includes the user-provided application delay (--delay flag), which makes the metric misleading as it also accounts for startup wait time rather than actual test execution.

This PR corrects the timing calculation so that only the real test execution duration is reported.

Closes #3351

Describe the changes that are made

  • Moved the test execution timer start point to after the application delay
  • Renamed the summary label from Total time taken to Total test execution time
  • Updated per-testset summary labels for naming consistency

Links & References

Closes: #3351

What type of PR is this? (check all applicable)

  • Bug Fix
  • Code Refactor

Added e2e test pipeline?

  • No, because the change affects reporting logic only and is covered by existing execution flow

Added comments for hard-to-understand areas?

  • No, the code is self-explanatory

Added to documentation?

  • No documentation needed

Are there any sample code or steps to test the changes?

  • No, manual verification through existing CLI execution is sufficient

Self Review done?

  • Yes

Any relevant screenshots, recordings or logs?

  • NA

Currently, the test summary's 'Total time taken' includes the
user-provided delay (--delay flag), which makes the metric misleading
as it includes application startup wait time.

Changes:
- Moved timing start point to after application delay
- Updated label from 'Total time taken' to 'Total test execution time'
- Updated per-testset summary labels for consistency

This ensures the reported time accurately reflects actual test
execution duration, excluding initialization delays.

Closes keploy#3351

Signed-off-by: WillyEverGreen <saibalkawade10@gmail.com>
@github-actions
Copy link

github-actions bot commented Dec 17, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@github-actions
Copy link

The CLA check failed. Please ensure you have:

  • Signed the CLA by commenting 'I have read the CLA Document and I hereby sign the CLA.'
  • Used the correct email address in your commits (matches the one you used to sign the CLA).

After fixing these issues, comment 'recheck' to trigger the workflow again.

1 similar comment
@github-actions
Copy link

The CLA check failed. Please ensure you have:

  • Signed the CLA by commenting 'I have read the CLA Document and I hereby sign the CLA.'
  • Used the correct email address in your commits (matches the one you used to sign the CLA).

After fixing these issues, comment 'recheck' to trigger the workflow again.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you and congratulations 🎉 for opening your very first pull request in keploy

@WillyEverGreen
Copy link
Author

I have read the CLA Document and I hereby sign the CLA.

@WillyEverGreen
Copy link
Author

recheck

}

// Start timing test execution after application delay
startTime := time.Now()
Copy link
Member

Choose a reason for hiding this comment

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

why this is added?

Copy link
Member

Choose a reason for hiding this comment

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

Please remove it

runTestSetCtx = context.WithValue(runTestSetCtx, models.ErrGroupKey, runTestSetErrGrp)
runTestSetCtx, runTestSetCtxCancel := context.WithCancel(runTestSetCtx)

startTime := time.Now()
Copy link
Member

Choose a reason for hiding this comment

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

why was this removed?

please revert this

@officialasishkumar
Copy link
Member

the pipelines are failing.

did you test this PR locally?

@WillyEverGreen
Copy link
Author

Thanks for pointing this out — you're right.

By moving startTime I ended up affecting the execution flow instead of just the reporting logic, which wasn’t the intention. That explains the pipeline failures as well.

I’ll revert the timer change back to its original place and update the summary calculation so the reported execution time excludes the --delay duration without touching the core execution lifecycle. I’ll also run the tests locally before pushing the fix.

Track user-provided delay time separately and subtract it from the
total execution time when printing the test run summary. This ensures
the reported time accurately reflects actual test execution duration.
Closes keploy#3351

Signed-off-by: WillyEverGreen <saibalkawade10@gmail.com>
@WillyEverGreen WillyEverGreen force-pushed the fix/3351-exclude-delay-from-summary branch from 7ddf505 to 306d6d0 Compare December 18, 2025 14:26
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.

[feature]: remove inclusion of delay time in the test run summary

2 participants