Traceability is one of the key tenets for accountability. One of the easiest scripts I've had to write helps me to manage what my testing scope is going to be from release to release. This script that I'm going to share has been helpful in getting a clear picture of what is potentially in the next set of code for testing. Assumptions:
Here's the workflow that I've devised (first version):
To get log of the current branch, simply type: git log Assuming, that you have the latest commits, it is easy to compare the logs of two files by running this command and placing the results into a file. git log {production}..{release_candidate} > new_code.txt The one thing it doesn't do very well, is if you had to do a hotfix in production after the fact. It is still okay, as it will remind the tester to test that "critical" hotfix to insure that we didn't break it again.
Once you have the file, it is a matter of parsing the file and updating the JIRA tickets with the appropirate label. Question: Determine if two strings are anagrams. For example, listen and silent are anagrams.
My Solution In Ruby: "listen".chars.sort { |a, b| a.casecmp(b) } .join == "silent".chars.sort { |a, b| a.casecmp(b) } .join ? "They are anagrams" : "They are NOT anagrams" Explaining my approach to the page object design pattern with ruby and capybara, I was asked if I could make a visual representation. Hopefully, this quick guide helped.
|