Skip to content

Conversation

@NexionisJake
Copy link

This commit introduces a progress indicator that displays the number of completed samples and percentage during the 'Testing' stage of test execution, enhancing user visibility into test progress.

Changes:

  • Modified mod_test/controllers.py to calculate and return sample progress data in the get_json_data endpoint
  • Updated templates/test/by_id.html to display progress information and handle real-time updates via AJAX polling

Implementation details:

  • Calculates progress using existing test.results and test.get_customized_regressiontests() data
  • No database schema changes required
  • Updates every 20 seconds via existing AJAX mechanism
  • Displays format: 'X / Y samples (Z%)'
  • Backward compatible with existing functionality

The feature provides immediate feedback to users about test execution progress without requiring any infrastructure changes.

Please prefix your pull request with one of the following: [FEATURE] [FIX] [IMPROVEMENT].

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

My familiarity with the project is as follows (check one):

  • I have never used the project.
  • I have used the project briefly.
  • I have used the project extensively, but have not contributed previously.
  • I am an active contributor to the project.

Summary

This PR adds a real-time sample progress indicator to the Testing stage, displaying the number of completed samples and percentage (e.g., "13/25 samples (52%)") as tests execute. This enhancement provides immediate visibility into test execution progress without requiring any database schema changes.

Implementation Approach

  • Leverages existing data: Calculates progress from test.results count and test.get_customized_regressiontests() length
  • Minimal changes: ~30 lines across 2 files
  • Zero infrastructure impact: No database migrations or new dependencies
  • Backward compatible: Existing functionality remains unchanged

Testing & Demonstration

Since setting up the full application environment (database, GCP credentials, config files) was not feasible for local testing, I created a standalone HTML demo page to validate the UI/UX implementation and capture screenshots for this PR (with assistance from Claude AI)
This approach was taken because:

  • The feature is purely presentational on the frontend
  • The backend logic is straightforward (simple arithmetic using existing model methods)
  • A demo allows clear visualization of the feature without requiring reviewers to set up test data
  • The demo accurately simulates the progress indicator's appearance and behavior in the actual application.
image image image

CLOSES #927

This commit introduces a progress indicator that displays the number
of completed samples and percentage during the 'Testing' stage of test
execution, enhancing user visibility into test progress.

Changes:
- Modified mod_test/controllers.py to calculate and return sample
  progress data in the get_json_data endpoint
- Updated templates/test/by_id.html to display progress information
  and handle real-time updates via AJAX polling

Implementation details:
- Calculates progress using existing test.results and
  test.get_customized_regressiontests() data
- No database schema changes required
- Updates every 20 seconds via existing AJAX mechanism
- Displays format: 'X / Y samples (Z%)'
- Backward compatible with existing functionality

The feature provides immediate feedback to users about test execution
progress without requiring any infrastructure changes.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 1, 2026

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.

[FEAT] Upgrade the test progress experience

1 participant