Testing is Rocket Science Not Brain Surgery

Almost all of the World's Greatest Accomplishments Were The Result of Great Planning!

Testing is Rocket Science Not Brain Surgery header image 1

Code Snippet(HP LoadRunner) : FILE I/O and creating dummy XMLs

September 27th, 2012 · Code Snippets, Performance Testing, Testing From The Field

This is a code dump of a XML file generator I threw together to create multiple child nodes under what was essentially a header in the XML file, along with generating multiple files iteratively. The actual number of iterations was controlled by the number of iterations specified in the run-time settings, the number of child nodes to create is a parameter. I’ll only include a slice of code in this post, the entire file should be available for download with the post. This was done to support a custom web services testing effort involving electronic medical record(EMR) transfers.Create Sync Data File

Create_Test_File(char *header_filename, char *output_filename, int merge_count, int max_merge_count)
{
int count, output,patient_record_length,result_record_length,tail_record_length;

int result_lines,num_of_result_lines;

int total = 0;

char buffer[20000];

char * buffer_manual;

long h_file_stream;
long o_file_stream;

num_of_result_lines = atoi(lr_eval_string(“{Max_Num_Result_Lines}”));
[Read more →]

→ 1 CommentTags: ··

Getting Started with Selenium Part Two by Bobby Washington

April 10th, 2012 · Functional Test Automation

In part one of this two part series we focused on creating a test script via the Selenium IDE and the Selenese commands that I find myself regularly using.  In this blog I plan to speak about how to actually locate various controls on a page specifically using CSS locators.  I will also demonstrate how we can use the Firefox add-in tool “FireBug” to assist us in this endeavor.  First and foremost I believe most Selenium users would agree that the ability to locate webpage elements/objects is a concept and skill that one must have a firm grasp of in order to be successful in any automation effort.  Most of your mainstream automation tools provide some record/playback feature.  However,  it has been firmly established that this approach, while valuable in the right context, does not produce scripts that are flexible or dynamic and as a result do not provide the longevity necessary for the ROI to be realized.  I liken the understanding and practice of object location to the concept and practice of correlation to a LoadRunner user.  As many LoadRunner users will tell you, the understanding and application of correlation is absolutely essential to successful script development and the same holds true for object location to a Selenium user.

So what exactly is object location?  My personal definition is that it is “The ability to programmatically select/locate an object or element with the goal of applying some action and or modification to it.”  Typical actions performed against objects on a webpage consist of:

–          Clicking a link, button, or image

–          Typing a value in a text box

–          Selecting an option from a drop-down box

These are essentially the types of actions that are routinely performed when interacting with a web-page.  In addition, many test automation tools provide intuitive commands or methods that represent these types of actions.  For example:

btnObject = Button.new

btnObject.click

txtBox = Input.new

txtBox.type(“Text to type”)
[Read more →]

→ 1 CommentTags: ········

“Getting Started with Selenium” Part One of Many by Bobby Washington

June 6th, 2011 · Functional Test Automation

If you have been exposed to test automation for any length of time then I suspect you have heard about an open source tool called Selenium. If there is any question in your mind regarding the validity of this set of tools simply because it is open source then I encourage you to perform a job search on Dice.com using “Selenium” as the search term. At the time of this writing the search yielded 474 results. A similar Monster.com search yielded 245 results with pretty impressive salary ranges I might add. In addition to this, if you navigate to the Selenium “Support” page you will find a listing of at least 12 companies/individuals that provide expert support for Selenium. Suffice to say Selenium is an automation tool you should become familiar with. Getting the tool set up is not difficult so I really would prefer not to spend a lot of time on this aspect of Selenium. Basically if you have installed an add-on for Firefox then you can install Selenium. As you peruse this site you will undoubtedly read about concepts that are essential to successfully using LoadRunner. Selenium is no different in that it has its own set of concepts that I believe are essential for a Selenium user. While using this tool, the following three areas that have aided me in creating Selenium test scripts:
• Common Selenium commands
• Use of web development tool Firebug
• Understanding of Xpath
[Read more →]

→ 2 CommentsTags: ···

Test Planning the Marine Way: “Develop A Shared Situational Awareness” by Ed Cook

April 4th, 2011 · Testing From The Field

“The process of planning itself should provide a common understanding of the nature of the problem and so support communication and cooperation. In other words, planning is a way of exploring the situation. Even if the understanding of that situation is incomplete or not entirely correct—and most attempts to attain situational awareness will be both—the common understanding provides a basis for unity of effort. In this respect, planning helps commanders both with formulating their intent and in conveying that intent to their subordinates.”
—Marine Corps Doctrinal Publication (MCDP) 5, Planning

For test efforts, “shared situational awareness” applies to both the test team’s exploring and understanding the application under test, as well as providing a framework to express that understanding to the rest of the project.

[Read more →]

→ 1 CommentTags: ····

Software Gems: “Comment Out Or Delete Entirely? Wait, What Are We Deleting Again?” By Bobby Washington

February 5th, 2011 · Software Gems, Testing From The Field

Table of contents for Software Gems

  1. Software Gems: Regular Expressions For Everyone by Howard Clark
  2. Software Gems: Files of an Arbitrary Size by Howard Clark
  3. Software Gems: Ethereal is anything but… by Howard Clark
  4. Software Gems: “Comment Out Or Delete Entirely? Wait, What Are We Deleting Again?” By Bobby Washington

If you’ve never used LoadRunner let me be the first to tell you this isn’t your grandmother’s performance testing tool. As a novice I am looking to become more proficient with LoadRunner and my hope is that I can help fellow novice users navigate this testing tool.

I am reminded of something a senior performance tester once told me. He said LoadRunner is very good at generating a lot of code. As I began to work on a performance testing exercise he assigned me I quickly realized truer words were never spoken. The first part of the assignment was to navigate to the www.finance.yahoo.com site and obtain a quote for General Electric Co. If ever there was a site to cut your chops on this is the one. To give you an example of what I’m talking about, below is a snapshot of the code generated by LoadRunner for simply loading the yahoo finance website, and obtaining a stock quote for a company:

[Read more →]

→ No CommentsTags: ···