fix loading issue

This commit is contained in:
2026-01-04 17:52:51 +01:00
parent ce37351722
commit e33ce220e9
3 changed files with 189 additions and 92 deletions

View File

@@ -8,7 +8,7 @@ TestArena is a web-based test management and execution platform designed to orch
### 1. Web Application (Flask)
- **Frontend**: Built with HTML, CSS (Vanilla), and JavaScript. Provides a dashboard for monitoring jobs, submitting new tests, and viewing logs.
- **Backend**: Flask server handling authentication, job management, and API requests.
- **Database**: SQLite (default) or PostgreSQL, managed via SQLAlchemy. Stores users and job history.
- **Database**: PostgreSQL (in Docker) or SQLite. Managed via SQLAlchemy. Stores users and job history.
### 2. Remote Execution Server
- Handles the actual execution of test scenarios.
@@ -21,14 +21,19 @@ TestArena is a web-based test management and execution platform designed to orch
1. User selects a branch and validates it via SSH on the remote server.
2. User selects test scenarios to run.
3. User reviews and submits the job.
4. The web app creates a local `Job` record and sends a POST request to the remote `/api/queue` endpoint.
4. The web app creates a local `Job` record and sends a POST request to the remote `/api/queue` endpoint using the local Job ID as the `remote_queue_id`.
### Status Polling
1. A background thread in the Flask app polls the remote server every 20 seconds for all `waiting` or `in_progress` jobs.
2. The dashboard also polls the local API every 5 seconds when a job is being viewed to provide real-time updates.
3. Tab persistence is handled in the frontend to ensure the user's view (Scenarios vs Logs) is maintained during polling.
### Job Search (Global)
- Users can search for jobs by **Job ID** or **Username** globally.
- By default, non-admin users only see their own jobs. Searching allows them to see others' jobs if they have the ID or username.
### Job Abort/Delete
- Users can abort running jobs or delete them entirely. These actions are synchronized with the remote server.
- Users can abort running jobs or delete them entirely. These actions are synchronized with the remote server using the `POST /abort/{id}` and `DELETE /delete/{id}` APIs.
## Technology Stack
- **Backend**: Python, Flask, Flask-SQLAlchemy, Flask-Login, Requests.

View File

@@ -16,13 +16,17 @@ Access the TestArena dashboard and log in with your credentials. Default admin c
### Dashboard
The dashboard shows a list of all test jobs. You can see the status (Waiting, In Progress, Passed, Failed, Aborted) and who submitted the job.
### Searching Jobs
Click the 🔍 icon in the sidebar to open the search panel.
- **Search by Job ID**: Enter a Job ID to find a specific job globally.
- **Search by Username**: Enter a username to find all jobs submitted by that user globally.
- **Clear Search**: Click "Clear" to return to your default view (your own jobs).
### Job Details
Click on a job to view its details:
- **Scenario Summary**: Shows the status of each individual scenario in the job.
- **Queue Logging**: Real-time logs from the execution queue.
### Searching
Use the search boxes in the sidebar to find jobs by **Job ID** or **Username**. Admins can see all jobs, while regular users see their own by default.
- **Scenario Summary Tab**: Shows the status of each individual scenario in the job.
- **Queue Logging Tab**: Real-time logs from the execution queue. The view persists even when the page updates.
- **Submitter Info**: The username of the person who submitted the job is listed in the details.
## Managing Jobs
@@ -30,4 +34,4 @@ Use the search boxes in the sidebar to find jobs by **Job ID** or **Username**.
If a job is running, you can abort it by clicking the **Abort** button in the job details or via the right-click context menu in the job list.
### Deleting a Job
To remove a job from the history and the remote server, click the **Delete** button in the job details or via the right-click context menu.
To remove a job from the history and the remote server, click the **Delete** button in the job details or via the right-click context menu. This will permanently delete the job data from both the local database and the remote execution server.