-
Notifications
You must be signed in to change notification settings - Fork 339
Test Automation Performance Improvements + Streamlining #489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
zakird
merged 28 commits into
zmap:master
from
phillip-stephens:feature/test-automation-improvements
Feb 7, 2025
Merged
Test Automation Performance Improvements + Streamlining #489
zakird
merged 28 commits into
zmap:master
from
phillip-stephens:feature/test-automation-improvements
Feb 7, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit fc20f3b.
…llip-stephens/zgrab2 into feature/test-automation-improvements
zakird
approved these changes
Feb 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #112
Revamp of testing framework to leverage
docker compose
to improve speed as well as allow tests to even be run on ARM MacBooks. Consolidation of test build environment intodocker-compose.yml
greatly reduced the files required for our build system.Notable Changes
test.sh
ran, generating a scan output. After all modules had run, these schemas were validated. This meant a failure in the first would wait to fail until all had run. Now we validate as we scan, letting us fail fast.setup.sh
andcleanup.sh
scripts, these are all consolidated in a singledocker-compose.yml
filezgrab2_ipp_service_base
since bothipp
images were installingcups
andcups-pdf
to improve build efficiencyintegration_tests/test.sh
to python3 for easier maintainabilityREADME.md
to remove out-dated guidance on using Python2README.md
to show how you can run only a single module's integration testsPerformance Improvements
Github Actions Runner
10 mins
master
-> 4minbranch
MacBook Air
Could not run
master
-> 2 mins 50 sec.branch
(taking advantage of docker caching)Testing
Positive Test Case
https://github.com/phillip-stephens/zgrab2/actions/runs/13206866505 -> 3 min 57 sec.
Negative Test Case
Here, I've added a typo in the amqp module so that schema validation should fail. It fails immediately rather than waiting for all tests to run and then performing validation on the results.
Potential Areas of Concern
By using
docker compose
, we bring up all containers at once. This takes around 3 GB of RAM but CPU usage quickly drops back to baseline after the containers come up since nothing is actively computing anything. IMO, the increased RAM usage by bringing up all containers at once is worth the efficiency gains of building/starting all docker images in parallel.