.!.
Been a looong time since i sat down to blog, (assumption being that you need to go out and learn something new to blog something new). After another burst of heavy testing, i gathered a few essentials of writing good perl scripts for automated testing. Here are a few observations. I hope to continue this serious……
1. Logging is everything – This is one obvious thing that most automation framework developers dont concentrate much on. As a QA person the application log file dump is the first place we go to track/analyze a defect. Similarly when an automation perl script is developed a standardized log record of the various tests and outcomes is very helpful. A good format for (found in most standardized logs would look something like this:)
<timestamp> <Tag>: <Descriptor>
The Tag should be a finite list of callouts like: Fail, Pass, Info, Checkpoint etc.
This is purely for the puropose of running overall searches when you log files become huge. For example, after every run of the script, the tester would be interested in Fails (obviously). This is where these tags
come handy. A simple search for “Fail” would tell me where all the test has failed.
2. Non-interactive automation scripts: These are cases where the user inputs (if any) are recorded into .conf (config files). This helps “silent runs” of the test scripts. Designing good config files are very important. Be sure to provide flexibility of ignoring comments and blank while parsing config files for parameters. See a sample perl code snippet below
s/#.*//; # ignore comments by erasing them
next if /^(\s)*$/; # skip blank line
chomp;
push @test_cases, $_; # push the data line onto the array
Another possibility would be to ignore comments at the end of a line also like:
[test_case_login]
username=mike #place where the username goes in
password=gogogo #place where the password goes in
From a readability perspective, provide users of your automation framework to have such comments in their config files, (make sure you handle these types of comments also). Checkback with me if you need a code snippet for that (Exercise for the reader
Tags: automation,
logging,
perl script,
testingIf you enjoyed this post, make sure you subscribe to my RSS feed!
Tags: config file, log file, perl scripts
on Jun 14, 2008 in
QA Process
.!. dead eyes see no future ep mp3 download A question always asked is “How much should we test?” and a lot of schools of thought follow on with answers. However, there is another question which id like to pose. “What level of documentation is required?” The norm for the above question that we practice [...]
.!. I recently started doing a project which involves some API testing. Since my knowledge of this domain was restricted and began to learn of lot of things as i started….. This is the first time i thought ill blog about it as i go along. How to design and API testing framework ??? Coming [...]
on Jun 10, 2008 in
random thoughts
.!. This was a google result obtained when i recently did a search for the ‘vice president of India’. Note the content circled in RED. devolution download mp3 The CIA website however gives the correct address: Tags: bug, GoogleIf you enjoyed this post, make sure you subscribe to my RSS feed!
on Jun 7, 2008 in
random thoughts
.!. download living dying movie I just made an amazing discovery after being buried over the week in jargons and statements that go round and round a point till my cranial circuitary was cross circuted i finally emerged with what they were trying to tell me and it was this………………….. the ego has landed robbie [...]
on Jun 28, 2007 in
Tech thoughts
.!. With the advent and maturity of Web 2.0 concepts and feature rich dev tools, the impetus to develop desktop solutions for your computing needs should be seeing a decline. I was mulling over the “problem of choice” ( Matrix fame)…… What would be the factors to consider when deciding whether an application/system should be [...]
.!. A picture is worth a thousand words…… Presenting the synopsis of what i mean The nut bolt analogy would give u a small idea of how this is relevant to testing. There is always a set of N possible ways to test and application/product. This is the “superset of all solutions”. Out of this [...]
on Jun 22, 2007 in
QA Process
.!. The concept of performing ACID testing on Databases have been theoretically emphasized over the years, but I have often noticed that this dimension is not an evident driver when it comes to strategizing testing of application. the sun don t lie mp3 Testers these days have failed to look beyond the conventional classroom wisdom [...]
.!. Feliz Navidad Feliz Navidad Feliz Navidad Prospero año y Felicidad I want to wish you a Merry Christmas lithosphere mp3 download I want to wish you a Merry Christmas I want to wish you a Merry Christmas From the bottom of my heart noneIf you enjoyed this post, make sure you subscribe to my [...]
on Jun 19, 2007 in
Tech thoughts
.!. Recently I was brainstorming with a highly competent tester based in Bangalore, India [a rare breed out here] and we stumbled on a startling fact. Requirement gathering and tracking methods have remained largely static for a long time. The delivery models in India with respect to QA and process are reminiscent of the late [...]