Currently the testing of the agent is limited and a bit complicated. Once APIv2 is release the testing framework can be extended.
- Start the development container for the server, make sure you use the branch: feature/apiv2.
- Start the development container for the agent.
- Start the agent once to setup the config.json file (Run -> Start Debugging).
- Set the agent to CPU only.
- You should be able to run the tests with
python3 -m pytestor run them directly from 'Testing' in VSCode.
Currently you cannot run the tests from a devcontainer on Windows, because vscode does not support devcontainers running on Windows containers.
Only possible to run tests on a Windows platform. Does not really allow to run tests windows hashcat, no GPU support
- Start the development container for the server, make sure you use the branch: feature/apiv2.
- Git clone the repo into the Windows file system
- Switch Docker Desktop to Windows Containers. Right click the Docker Desktop tray icon. Select 'Switch to Windows Containers'
- Open powershell, cd to the agent folder
.devcontainer\windows docker compose builddocker compose up- Everything should install, now attach to the container
docker exec -it hashtopolis_agent_windows cmd.exe - Start the agent once
python -d . --url http://host.docker.internal:8080/api/server.php --debug --voucher devvoucher - Run the tests
python -m pytest
Requires some OpenCL device for example a GPU to run tests.
- Start the development container for the server, make sure you use the branch: feature/apiv2.
- Git clone the repo into the Windows file system
- Install Python3.10 through https://www.python.org/downloads/ (as Admin/systemwide) + add python to path
- Install requirements-test.txt and requirements.txt
pip3 install -r .\requirements-tests.txt -r .\requirements.txt - Run VSCode install Python extension
- Run agent once
python -d . --url http://127.0.0.1:8080/api/server.php --debug --voucher devvoucher - You should be able to run the tests with
python3 -m pytestor run them directly from 'Testing' in VSCode.
- Clear the who database through Config -> Server -> Delete all
- Check if the agent is still active
- Clear the agent folder
- Check if the agent is marked CPU only
- Only one environment can be tested at a time.
- Only works with APIv2.
- No support yet for Github actions, waiting for release of APIv2 to prevent having to fix it again.