2.5 KiB
TestArena Deployment & Testing Guide
This guide explains how to deploy and test the TestArena backend application on your Ubuntu Server.
🚀 Deployment Steps
1. Clone the Repository
Ensure you have the code on your server in a directory like /home/asf/testarena_pc_backend.
2. Run the Deployment Script
The deployment script automates Nginx configuration and dependency installation.
sudo chmod +x deploy.sh
sudo ./deploy.sh
3. Manage Application Services
The application and worker are managed by systemd. You can control them using the following commands:
Check Status:
sudo systemctl status testarena-app
sudo systemctl status testarena-worker
Restart Services:
sudo systemctl restart testarena-app
sudo systemctl restart testarena-worker
🧪 Testing the System
1. Verify Dashboard Access
Open your browser and navigate to:
http://asf-server.duckdns.org:8080/
You should see the modern, colorful TestArena dashboard.
2. Verify Results Browsing
Navigate to:
http://asf-server.duckdns.org:8080/results/
You should see an automatic directory listing of /home/asf/testarena/.
3. Test the Queue API
Run the following curl command to queue a test task with branch information:
curl -X POST http://asf-server.duckdns.org:8080/api/queue \
-H "Content-Type: application/json" \
-d '{
"source": "add_esp_idf_io_wrappers",
"345": [
"staging",
{
"5555": "application_layer/business_stack/actuator_manager/test/actuator_manager_init_test.test_scenario.xml"
}
]
}'
4. Verify Worker Execution
- Check the dashboard; you should see the new queue appear and its status change from
WaitingtoRunningand thenFinished. - Check the filesystem:
You should see
ls -R /home/asf/testarena/test_queue_001queue_status.jsonand any results generated bytpf_execution.py.
5. Test Abortion
Queue another task and click the Abort button on the dashboard. Verify that the status changes to Aborted in both the dashboard and the queue_status.json file.
🛠️ Troubleshooting
- Nginx Errors: Check logs with
sudo tail -f /var/log/nginx/error.log. - FastAPI Errors: Check the terminal where
uvicornis running. - Permission Issues: Ensure
/home/asf/testarenais writable by the user running the app. - Port 8080 Blocked: Ensure your firewall (ufw) allows traffic on port 8080:
sudo ufw allow 8080.