Skip to content

Conversation

@divyashreej
Copy link

fixes issue #5

This PR does the following:

  1. A new CLI entry point that serves as a starting point to run multiple test files or test files in a folder
  2. Enable verbose logging

@divyashreej
Copy link
Author

divyashreej commented Jun 25, 2025

**Test run output:

  1. run multiple files with verbose:

binnacle -vvv test/test_rest_apis.py test/test_commands_docker.py

[Running] test/test_rest_apis.py
URL: GET /api/v1/folders
Expected Status: 403
Actual Status: 403
OK [ 9.30ms] [ 1] file=test/test_rest_apis.py:9 [http_get("/api/v1/folders", status=403) ]
URL: GET /api/v1/folders
Expected Status: 401
Actual Status: 401
OK [ 3.44ms] [ 2] file=test/test_rest_apis.py:13 [http_get("/api/v1/folders", status=401) ]
URL: GET /api/v1/folders
Expected Status: 200
Actual Status: 200
OK [ 3.54ms] [ 3] file=test/test_rest_apis.py:17 [data = http_get("/api/v1/folders") ]
{
"folders": [
"folder1",
"folder2",
"folder3"

]
}

OK [ 0.12ms] [ 4] file=test/test_rest_apis.py:20 [folders = validated_json(data) ]
OK [ 0.03ms] [ 5] file=test/test_rest_apis.py:21 [validated_json('{"name": 100}') ]

Summary:
OK [186.56ms] total=5 passed=5 failed=0

[Running] test/test_commands_docker.py
OK [375.29ms] [ 1] file=test/test_commands_docker.py:8 [command_run("echo 'Hello World!' > /root/r...]
OK [235.26ms] [ 2] file=test/test_commands_docker.py:9 [command_run("stat /root/reports.txt") rep...]
OK [224.75ms] [ 3] file=test/test_commands_docker.py:10 [command_run("stat /root/reports1.txt 2>/de...]

Summary:
OK [968.86ms] total=3 passed=3 failed=0

  1. run a folder with verbose

binnacle -vvv test

[Running] test/test_commands_docker.py
OK [169.94ms] [ 1] file=test/test_commands_docker.py:8 [command_run("echo 'Hello World!' > /root/r...]
OK [202.87ms] [ 2] file=test/test_commands_docker.py:9 [command_run("stat /root/reports.txt") rep...]
OK [176.42ms] [ 3] file=test/test_commands_docker.py:10 [command_run("stat /root/reports1.txt 2>/de...]

Summary:
OK [692.69ms] total=3 passed=3 failed=0

[Running] test/test_commands_local.py
OK [ 0.03ms] [ 1] file=test/test_commands_local.py:4 [validated_json('{"name": 100}') ]
OK [ 14.91ms] [ 2] file=test/test_commands_local.py:5 [command_run("ls /tmp") ]
OK [ 5.12ms] [ 3] file=test/test_commands_local.py:6 [command_run("stat /home/ubuntu/reports.pdf...]
**

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.

1 participant