Road to Automation: QA
Software QA (quality assurance), much like documentation, while important, often gets overlooked and buried down in the priority list when compared to research and development efforts.
While there are increasing efforts to automate the various aspects of software QA, many still require substantial effort to get meaningful values (such as writing unit- or end-to-end tests). However, we have sophisticated a few other fronts that can integrate into many projects with minimal setup.
Commit Message Convention Check
Primarily because we already rely on the same convention to facilitate team updates and product release efforts, ensuring that our commit messages follow the said convention becomes even more critical. And for this reason, we created a CLI (command line interface).
1 | (some repo) % npx @eqworks/commit-watch -b origin/main --verbose |
The CLI form factor means it is simple to integrate into any CI/CD (continuous integration/deployment) processes, such as GitHub Actions.
1 | name: Main |
And the CLI exits with an error when encountering any unsatisfactory commit messages against the convention. You can find more usage details in the commit-watch
repo.
Environment Variables Usage and Security Sanitization
Another aspect that often haunts developers is environment variable usage, especially when we accidentally need to remember to configure them at build or deployment time. To mitigate that, we created another CLI.
1 | (@eqworks/updates repo) % npx @eqworks/scan-env |
The CLI works well with Python and JavaScript (Node.js) projects. In the future, we plan to support more language stacks. And since we use Serverless extensively, we have also built good support to detect when the application’s environment variables mismatch with the references dictated in the serverless.yml
configuration.
1 | (a-serverless-service) % npx @eqworks/scan-env |
Like commit-watch
, the CLI easily integrates into any CI/CD workflow.
1 | name: Main |
You can find more details in its repo.
Bonus: Slack Notification
While this one is not strictly about QA, we often use it hand-in-hand with all QA-related CLIs in our CI/CD workflows to notify us of various statuses.
1 | name: Serverless Deploy - prod stage |
There are more details in the notify
repo, including its usage as a Node.js library.
Final Remarks
While far from comprehensive, we’ve built a little collection to start saying, “There’s a CLI for that.” The point, though, is to identify common-enough issues to create flexible and composable toolings to form reasonable solutions while getting as much value as possible.
Do you have similar itches? Do you have any other ideas? Let us know by creating issues in the respective repositories: