A system that allows running tests on slave/minion machines and viewing results through a central dashboard. For this Project I used SALT. Similar platform is ansible.
This distributed monitoring system consists of two main components:
- Slave/Minion Side: Machines that run the actual test files.
- Host/Storage Side: Machine that stores test results and provides a web dashboard to view them.
- Python 3.x
- SSH/SCP access to the storage host
- Cron (for scheduled execution)
-
Install Dependencies: bash pip install -r requirements_minion.txt
-
Configure Storage Host: Edit the configuration to set the IP address of your storage host for SCP transfers.
-
Set Up Cron Job (Optional): bash
crontab -e
0 * * * * /path/to/execute.sh
Execute the test runner:
- For Refrence, I have also provided a sample pytest file.
- Save the test file locally.
bash python3 run_pytest.py
You will be prompted for:
- The Path for the test file: Enter the path to your pytest file
- The machine name(s) or pattern to run them on: Specify which machines should execute the tests
The system will:
- Execute the tests on the specified machines
- Display the results locally
- Transfer the results to the storage host automatically
- Python 3.x
- FastAPI/Uvicorn
- Database (as specified in requirements)
-
Install Dependencies: bash pip install -r requirements_host.txt
-
Start the Dashboard Server: bash uvicorn hosting_file:app --host 0.0.0.0 --port 8000 --reload
-
Open a web browser and navigate to:
http://:8000
-
For New Users:
- Click on the registration link
- Complete the registration form
- Submit your credentials
-
For Existing Users:
- Enter your login credentials
- Access the dashboard
Note: Test results will only appear in the dashboard after tests have been executed on the slave/minion side.
- Ensure proper network connectivity between slave and host machines
- Verify that SCP transfers are configured correctly
- Check that all dependencies are installed on both systems
- Confirm that the host server is running and accessible on the specified port