The Blog


Comment on an article by clicking on its title and scroll down.

 

There are many easy to use testing automation tools on the market.  There are many powerful testing automation tools on the market.  There are, however, rather few that are both.  Selenium is one that stands out, though and it is the tool that I most often use.  In this tutorial, I'll demonstrate a quick way to create simple tests using the tool.

 

In order to play back your tests, simply press the green arrow "play buttons" on the toolbar.

WHAT???  Why did my tests fail??

Well, your tests probably failed here, but that's ok.  This really demonstrates the speed of Selenium.  Your test most likely failed because Selenium tried to move on to the next step before the web page finished rendering.  So it tried to click on your next link before the link was actually on the page.  There are two ways to handle this.  The quick but bad way would be to adjust the speed of your test by adjusting the slider on the toolbar.  This would allow the web pages a chance to render prior to Selenium trying to act on it.  The better way to handle this would be to change the "click" commands to "ClickAndWait" commands, though.  This way, Selenium will wait for the page to completely render before moving on to the next command.  One thing to note about this method, however, if you are testing a page that has frames, you might run into problems with FireFox.  FireFox says the page is completed once the Frameset is complete rather than waiting for the contents of the frame have completely rendered.

Also before I sign off for this first tutorial, I'll mention the difference between Assert and Verify

When you ASSERT that an element is present, you are telling Selenium to stop the test and proceed no further if the assertion is not valid.  So, if I assert that an image is present and that image is NOT present, Selenium will not move on and all testing will stop.  The test will be marked a failure.

When you verify something is present, you are looking for something that is not terribly important enough to stop the entire test if it's not.

An example of when I might use assert versus using a verify:

If I loaded a web page displayed a render time, I might want to verify that the render time was under 5 seconds, but I wouldn't necessarily think that it's a total failure if it took 6 seconds to render.  I would want to use an assert to verify that it didn't take longer than 10 seconds because 10 seconds is way past my threshold for acceptable render times and there is no point in continuing my tests if it takes longer than that.

 

Stay tuned for the next session: "Creating Tests Suites"

We all hear about the Hubble Telescope.  Many of us will remember the snafu upon its launch.  The main mirror had been ground incorrectly and we weren't FileHST-SM4 able to fully utilize it until the first service mission in 1993.  But ever since then, the Hubble Space Telescope has been raining down data like digital manna from heaven.  I think we've become jaded to the wonder of it.  We've grown complacent with its abilities. 

Well, I'm here to bring your attention to this wonderful piece of technology.  Go take a look at some of its beautiful photos in the gallery.  I promise you, you'll be amazed at the stunning beauty that makes up our night time sky.

One mind blowing thing about this:  We are actually looking back in time whenever we look at stars and galaxies.  The closest star to us is 4.37 light years away from us.  That means, when we look at see that star system through a telescope, we are seeing the light that left the binary star system 4.37 years ago.  We are, in effect, looking 4.37 years into the past.  Now take that thought and apply it some of the most distant galaxies that the Hubble is able to peer at.  Billions of light years away...  We are literally looking at images of the universe from billions of years ago.  Creeping our perception ever closer to the beginning of it all.  That's about 700 million years since the Big Bang, or almost 95% of the way back to the beginning. Staggering to think about.  Read from the related articles below to learn more about this.

 

 

 

No matter what you are using to keep track of defects that you find in your software, there are certain things that you should keep in mind when you are documenting a defect.

  1. A CLEAR AND CONCISE SUBJECT LINE / TITLEBugsLifeWallpaper1024
    This might be the most important part of creating a good defect report.  With this, the people responsible for fixing the bug/defect and quickly group several similar or identical problems into one investigation.  A good description will have at least 2 elements:  An action taken and a result

    EXAMPLES:
    Bad:  The website isn't working.
    Good: Clicking on 'Home' link takes me to a "missing page" error page

  2. CLEAR AND CONCISE STEPS TO REPRODUCE THE ISSUE
    More often than not, a majority of the time it takes to fix a defect or bug occurs in the "trying to reproduce it" phase.  Even if we track you down to have you give us a demo of the problem and that demo only takes 2 minutes, the time it takes to actually catch up with you and get that 2 minute demo stacks up quickly.  So, in the body of your defect, you should give developers more information than you think they could ever use.

    EXAMPLES: (We'll continue with the bug started in step 1)
    Bad:  I clicked home and was taken to a blank page.
    Good:
    1. I opened up a browser and navigated to our live site ( http://www.ourdomain.com )
    2. I logged into the site using the "Login" link
    3. I clicked on the "Message Boards" Link
    4. From Message Boards, I opened up the article "Summertime fun spots"
    5. I clicked on the "Add Comment" button
    6. I typed in a comment, but didn't hit [submit]
    7. I clicked on the "Home" button in the menu bar of the site
    8. I saw a blank page that stated the page was not found
    9. In the address bar, there was this URL:  http://joedeveolper.dev.ourdomain.com/home.html
    10. I'm using Firefox for my browser on Windows 7.
  3. A RECORD OF REPRODUCTIONS
    There is an old and sometimes joked about adage that states "It's not a problem if was can't reproduce it." While this may seem rather flippant and careless, there's also a huge grain of truth in it.  Sure there may have be an actual problem, but in the terms of prioritization, I'm sure it's easy to see that a defect that is either un-reproducible or difficult to reproduce is less important to fix than something that happens all the time.  Of course, this is an over-simplification as a bug that wipes out all of your data, even if it is almost impossible to reproduce is pretty damn important.

    EXAMPLES:
    Bad:
    I think I heard someone else had this problem
    Good: I was able to reproduce this on Internet Explorer, too.
    Best: I was able to reproduce this on Internet Explorer too.  I also got Sally and Jim to reproduce it on their computers, as well
  4. SCREENSHOTS OF THE PROBLEM
    If the problem is visual in nature, it's always a good thing to include a screen capture of the problem.

    EXAMPLE:
    "The background color for the Name and Description columns do not match on the albums listing page."
    image
  5. ADVANCED TECHNIQUES: Recording a macro to reproduce the problem automatically
    There are many tools out there that will allow you to record all the clicks and typing you do on your computer.  Recording these actions could prove to be very helpful to the people trying to fix your defect.  Even if you list all of your steps as accurately as you believe is possible, there might be something that you do, thinking it's insignificant, that the developer will catch on and realize exactly what the problem is.  Perhaps you clicked on the graphic of a button rather than its, text.  Perhaps you submitted a form by hitting the [Enter] key on your computer rather than clicking the [submit] button on the web page.  Another major benefit of recording your actions is that your recorded actions are now documented, and it might be possible to create an automated test from them.  With an automated test, your defect might be caught next time before it ever gets to a production environment.  Keep in mind, these tools record your actions ( move mouse here, click here, type this ).  It does not record a video of what you see.

    SUGGESTED SOFTWARE:

    Bad Boy
    a very nicely done tool that is, unfortunately, a windows and Internet Explorer only tool.

    Selenium IDE:  This tool is also a very good program.  It sits on your system as a Firefox Plugin.  So initial recording of a defect will be done in Firefox only, but it can be played back using several different browsers.

These techniques and suggestions are not the be all and end all of 'best practices' for reporting a bug or defect, but they will certainly get you further down the road in being a productive partner when it comes to making sure your company produces the highest quality software.

An Attempt At the Completely Absurd:

The glumblefilch sauntered into the room.  He was full of vim, vigor, and veracity.  His three blandlybulches protruded from his torso, nearly touching the floor and he admired them.  They were long and elegant.  Fragile looking but he knew they were sturdy.  The purplish hue they emanated set off the radiance of his six yellow eyes.  Most glumblefilches only had five eyes, but he had six.  He was quite proud of that, even if the other glumblefilches looked at him askance for his audacity, he had just one more eye that he could roll at their ignorance.

This glumblefilch was named Snodgrass.  That was not something he was particularly proud of, but it was his name.  He bore it with resolution and aplomb. He honestly didn't care what the other glumblefilches said about it.  It was better than Steve, Victor, and Roger. And it was miles above Roderick.  Roderick only had 3 eyes, Snodgrass mused, shaking slightly in his mirth.  A low chuckle escaped his lips.  Normally that would be fine, but tonight Snodgrass was with his boy at dinner, and a glumblefilch's low chuckle was actually quite a rumble.  His boy gave him a warning glance over his shoulder and Snodgrass settled down.  He didn't want to get his boy in trouble again. Last time that happened, Snodgrass wasn't allowed to come out from under the bed for a whole week.  That was torture.  Glumblefilches aren't known for there ability to handle solitude.  They need constant attention and reassurances or else they disappear.  By the time the week was over and his boy again came looking for him, Snodgrass had faded to near invisibility.  A couple hours later though, fueled by the laughter of his boy and the games they played together, Snodgrass was back to his three limbed, six eyed purpley self. 

The boy's mother had stuck her head into the room looking about curiously. "Who were you talking to?" she asked, her half smile showing she wanted to share in the fun.

"Just Snodgrass,"  the boy had answered.  With a confused look, the mother left the room.

So ... not wanting a repeat of a week under the bed, Snodgrass promised to be good during dinner.  He floated down to the floor folding his blandlybulches beneath him. 

He tried.  He really did.  He wanted to sit and wait quietly, but he was just not good at that.  After a few moments, he couldn't take it anymore.  He had to do something.  So, Snodgrass pulled himself into the tightest ball he could and rolled under the boy's chair.  Giggling softly to himself (this was going to be hilarious), the glumblefilch gulped and swallowed three big mouthfuls of air. Then he waited..   He could feel the air wanting to escape.  He held it in... He held it in more..  He giggled... Then he couldn't hold it anymore.

Remember when we talked about the rumbling of a glumblefilch's low chuckle?  Well, imagine what a full fledged belch would be like.  The silverware on the table rattled.  A Glass fell over, spilling milk onto the table.  The curtains flapped in the breeze.  The boy's mother fell over in a dead feint (OK, well almost).  The boy's father had the look of horrified disgust.  The dog ran into the living room, looking for a reprieve.  Low flying aircraft swerved crazily, looking for where that clap of thunder came from.

When the echoes died away, when the mouths of both parents closed, trying to hide their disbelief and the glumblefilch under the boy's chair fairly split in two trying to contain his mirth, the boy glared under his chair.

"SAMUEL!!!" the boy's mother admonished.

The boy looked astonished, "It wasn't me, Mom!!  It was Snodgrass!"

Samuel's father looked at him angrily.  "Young man, that is not the way we behave at the table.  And I've told you before.  There is no Snodgrass.  There is no such thing as a glumblefilch!!"

Snodgrass hmmphed quietly to himself. "No such thing??" he thought, "What does he know?"  In a rage, he rolled out from under the chair, hovered up to the height of the table and stretched out his blandlyfilches to their full reach. 

That's when he noticed he wasn't there.

The first punch landed with a splat against my cheek.  I barely felt it.  I think I was grinning so maniacally at that point that my cheeks were already tensed up, absorbing the blow without much damage.  It caught me off guard and staggered me back a step or two.  I didn't take my eyes off of the object of my fixation though.  Well, at least not until the second blow landed.  This time in the gut.  My breath left me in a gush and I bent over, nearly double, cradling my stomach. 

For a moment, I lost sight of my prize.  I saw only the rocks and grass at my feet.  Struggling to catch my breath I stood up straight again and smiled as my vision locked again just over the shoulder of this behemoth that was pummeling me.  This time the punch to the face hurt.  I'm pretty sure I heard the loud crunch of my nose breaking as his fist connected.  I know I tasted blood. 

This blow actually knocked me off of my feet.  I sprawled backward into the bushes that lined the side of the house.  Groaning with the fire that seemed to be consuming my face.  WOW!!! That hurt like hell!!  The behemoth was yelling something at me now, but I couldn't make out what he was saying.  Having rebounded off of the bushes, I was lying on my stomach inches from his feet.  Lord, please don't let him be pissed off enough that he's going to kick me...beat-up-face

As the ringing in my head began to taper off, I'm was able to make out what he was shouting, "Get up you little bastard!!" or something to that effect.  He moved to the side of me and kicked me hard in the upper thigh. "Get up!!"

With a Herculean effort, I pushed myself up, unsteadily rising to my feet.  I glanced back at what had been holding my rapt attention in disappointment.  The moment was gone, time to retreat.  I tried to find my way around this bruiser,  tried to find my way to the street so I could get home and nurse my broken face.  He shoved me, roughly.  I hit the side of the house with a sickening thud. My head slammed against the paneling with a sickening crack.  I prayed that it was the wood and not my skull that split.  The sasquatch grabbed the front of my shirt, holding me upright so he could deliver another punch to my face.  "I'll show you!!" he bellowed, "You fuckin' pervert!!"

We were both startled by a scream from above us.  "STOP IT!!!"  The shrill voice came from directly over our heads, from the bathroom window.  Cyndi was leaning out of it, her face filled with horror and a bit of fear.  "What the hell is wrong with you??"  The light behind her shimmered on her wet golden hair, creating a nimbus of light around her. Her robe was pulled tightly around her now, I guess she'd finished drying after her shower before sticking her head out the window to see what the commotion was about.  Despite my blood spattered face and probably already swollen nose, despite the pain in my gut, and the pounding in my head, I managed a weak smile. 

Jared, her older brother still held me, his fist ready for that final blow. "This little perv was watching you!!"  he yelled, much too loudly for my throbbing head.

She looked down at me then, perhaps a slight flicker of recognition in her eyes.  I could see that she was torn, emotionally.  Angry at having been spied on.  Embarrassed she had just stepped out of the shower, and I'd probably seen her drying off and putting on her lotion before the pummeling began.  Concerned, because I'm sure I looked a mess.  Hopefully I didn't look as bad as I felt.  After an appraising second, she said, "Let him go Jared, he's just a kid."

"But.." Jared began, obviously wanting to pummel me a bit more.

"Let him go, you've beat him up enough.  He'll never do it again."  With a pointed look at me she asked, "Will you?"

I was a bit miffed at being called "just a kid." She was only a few years older than me after all.  She's a senior though, and I guess we're all kids to her.  I shook my head in a silent promise that I'll never peep on her again.

"Let him go," she repeated with finality.

With reluctant glare, Jared gave me a hard shove in the direction of the street. "If I ever see you around here again, you'll get worse!" he promised.

I made my way toward the street, toward home.  Jared was making his way back into the house through the side door and was quickly out of sight.  Cyndi was still leaning out the window, watching me leave, a curious expression on her face.  If you asked me today, I would still swear there was a slight smile on those lips as I walked away.

So was it worth it?

Yeah..  It was worth it...

 

-E Steven Jones



Translator

 

 

FireFactor

Google Ads

 

The Tao of Calvin

 

Armed Forces News