Have you ever wondered if doing simple things such as adding a meaningful commit message, tagging a commit with git tag, or maintaining change logs with 𝘊𝘏𝘈𝘕𝘎𝘌𝘓𝘖𝘎.𝘮𝘥 in a VCS can go a long way to keep up with the traceability of your changes while writing automated tests?
Useful message — Committing the code changes with meaningful and self-explanatory commit messages can help to place a traceability in automated tests’ repositories so it becomes relatively easy to refer to them later in alignment with the app’s features if necessary. For instance, considering the following command, besides telling reviewers what this commit is all about, it also facilitates that all code changes related to this feature can also be traced back later using the same commit message.
git commit -m ‘add scenarios: place an order as a guest’
Tagging — Tagging in Version Control by definition is to tag specific points in a repository’s history as being important. In testing context, It can be done in a few different ways. 1. Tag a commit in the test code repository using the same version as that of the app/product only after all the changes related to this specific version are automated so there is a one-to-one mapping between source code and test code repository and 2. Straightaway tag a commit with requirement references such as ticket id, requirement id etc, however a slight drawback with this approach is that it might end up creating too many tags.
git tag -a -m ‘Includes scenarios of 12/30 release’ 3.4.10
Changelog — In addition to tagging, maintaining curated, chronologically ordered list of notable changes on a CHANGLELOG.md file benefits the traceability by providing detailed info about these changes by version. The below illustration shows the type of information that we can add to this file.
# Changelog
## [3.4.10] — (2023–12–30)
### Added
— automated scenarios related to guest order
— covered for all platforms
### Modified/Fixed
— fixed logged-on user order placement
### Removed
— mobile number format check is no longer needed
If you have another way of incorporating traceability within a test code repository, please do share.
Thank you!
Veera.