Test Automation Performance Improvements + Streamlining#489
Merged
zakird merged 28 commits intozmap:masterfrom Feb 7, 2025
Merged
Test Automation Performance Improvements + Streamlining#489zakird merged 28 commits intozmap:masterfrom
zakird merged 28 commits intozmap:masterfrom
Conversation
This reverts commit fc20f3b.
…llip-stephens/zgrab2 into feature/test-automation-improvements
zakird
approved these changes
Feb 7, 2025
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
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 composeto improve speed as well as allow tests to even be run on ARM MacBooks. Consolidation of test build environment intodocker-compose.ymlgreatly reduced the files required for our build system.Notable Changes
test.shran, 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.shandcleanup.shscripts, these are all consolidated in a singledocker-compose.ymlfilezgrab2_ipp_service_basesince bothippimages were installingcupsandcups-pdfto improve build efficiencyintegration_tests/test.shto python3 for easier maintainabilityREADME.mdto remove out-dated guidance on using Python2README.mdto show how you can run only a single module's integration testsPerformance Improvements
Github Actions Runner10 mins
master-> 4minbranchMacBook AirCould 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.