INCLUDE_DATA

Quick Testing Tips Your daily feed of short software testing tips…

9Jun/10Off

SEED NATALI: GUI Step Automation Heuristic

Whenever you implement automation of GUI steps, suggested heuristic might help you to keep track of operations you need to code.

GUI Step

(click on the picture to see mind map in online version with expanded nodes)

SEED NATALI acronym stands for the following.

  • Synchronize till object
  • Exists
  • Enabled
  • Displayed
  • verify Number of Arguments
  • verify Type of Arguments
  • Log test flow
  • Investigate any issues occurred
1Jun/10Off

Stella

Stella is a handy web application testing tool developed by Solutious Inc, a small software company based in Montreal. Stella is a very lightweight Ruby test tool for functional and performance testing. Like JMeter, Stella doesn't simulate a browser; it generates HTTP requests and parses the responses. Currently, Stella provides support for automatic parsing of HTML, XML, XHTML, YAML and JSON.

A few months ago, I wrote an introductory article on Stella for SearchSoftwareQuality.com - you can find it here.

26May/10Off

Bring up your Desktop in double-click!

Today I offer a time-saving tip for those who has to work on multiple test desktops, including virtual machines.

What do you do when preparing for your test session?

  • Opening folders?
  • Opening browsers?
  • Opening test cases?
  • Opening test reports?
  • Starting application-under-test?

If each desktop or VM is configured for a specific testing environment, the steps above probably become even more complicated.

  • Opening folders: "Well.. let's click "My computer"..then Q:\ drive... then "Projects".. then..."
  • Opening browsers: "What ip should I use, again? Is it 13.24.597.68:3397? "

Would you like to have a magic button to bring everything up in one click?

herewego-bat

Today you can create one for yourself and your team.

@echo off
REM Open mailbox
start "QuickTestingTips" "C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE"
REM Open folders
explorer.exe "C:\Documents and Settings\All Users\Documents"
explorer.exe "c:\project\test cases\module1"
explorer.exe "c:\temp"
REM Open browsers
start "QuickTestingTips" "C:\Program Files\Internet Explorer\iexplore.exe" google.com
start "QuickTestingTips" "C:\Program Files\Mozilla Firefox\firefox.exe" yahoo.com
REM Open bugtracker
start "QuickTestingTips" "C:\Program Files\Internet Explorer\iexplore.exe" jira.com
REM Open documents
start "QuickTestingTips" "C:\Temp\TestReport.doc"
start "QuickTestingTips" "C:\Temp\TestPlan.xls"
REM Start Application Under Test
start "QuickTestingTips" "C:\WINDOWS\system32\calc.exe"
REM Last but not least
start "QuickTestingTips" "C:\Program Files\Internet Explorer\iexplore.exe" softwaretestingclub.com

Instructions

Create a text file on your desktop, and paste the source code.
Save the file and change its extension to ".bat". - You've just created an MS-DOS batch file.
Double-click on it to start it, or right-click and select "Edit" to put relevant parameters.

  • Use REM to comment out a line
  • Use quotes while supplying an extended syntax path (i.e. with long names and space characters between words)
  • Study extended MS-DOS batch file syntax if you want to make your scripts even more powerful
  • Store scripts in a shared folder to make them accessible by teammates

Downloads

herewego.bat

1Jan/10Off

Throw away code can be ugly code

Recently, I needed to do a bunch of test setup in a web application. I had to manipulate around 5,000 records, and due to a time crunch and few people around over the holidays, it was easier for me to get at the GUI than it was the database. So I decided to write a quick Watir script to do the edits for me.

I had a spreadsheet with all the changes I needed, so I decided to let Excel write the bulk of my code. Using the CONCATENATE() function, I inserted the following into the first row:

CONCATENATE("ii == ", A1, " ? temp = ", A6, A3, A6, " : temp = temp")

That creates something that looks like this:

ii == 1 ? temp = "Some Value" : temp = temp

All I had to do was drag that down to fill each row and I was able to copy and paste a very large block of code from Excel into a loop in Ruby:

for ii in (1..5005)
#do some setup using Watir
ii == 1 ? temp = "Some Value" : temp = temp
ii == 2 ? temp = "Some Value" : temp = temp
ii == 3 ? temp = "Some Value" : temp = temp
ii == 4 ? temp = "Some Value" : temp = temp
#...etc...
ii == 5005 ? temp = "Some Value" : temp = temp
#do something afterward using Watir
end

Now, this is REALLY UGLY code. I know it's ugly, and you know it's ugly, but I'm defending it because it only took me five minutes to get my script running. It ran for a couple hours, and I was done. All of my test setup complete. I deleted the script and moved on.

While my solution wasn't elegant, it worked. Someone later told me about an Excel library I could have used, and I didn't feel bad about not using it. Sometimes you need to resist the urge to write an elegant solution if you're just hacking away at a simple problem.

Filed under: Automation 1 Comment
30Dec/09Off

Test ideas that come from test automation

I know it's not fashionable to like GUI-level test automation any longer. But whatever, I still like it. I'm unfashionable in more ways than one. I still like GUI-level automation for reproducing bugs, automated acceptance testing, and to support my performance and exploratory testing. I also like non-GUI tests, but I've never disliked GUI automation.

One reason I still write GUI-level test automation is because it helps me learn about the product. I'm still amazed at how many times I say "Wow, really?" when I'm writing my tests. Because I'm always picking at the GUI with tools like FireBug and Web Developer while I'm testing, I'm seeing things I don't normally see when I'm just clicking around.

For example, today I noticed:

  • One of the applications I'm testing doesn't remove fields from the screen when they aren't active, it just hides them. I had never noticed until I counted on it not being there in my code.
  • One of the applications I'm testing sometimes shows a parent child relationship using icons, and sometime doesn't.  I had never noticed until I coded a rule expecting it to always be there.
  • One of the applications I'm testing appears to have a relationship between fields that I wouldn't have expected. I discovered this based on field naming conventions.

All of these give me new test ideas completely unrelated to my automated tests. Anytime I'm surprised, I use that as an indicator that I have more tests to run. When I automate at the GUI-level, I often get surprised. I rarely get surprised when I'm automating against an API.

29Dec/09Off

Watir

I've neglected mentioning Watir on this blog because it's already a well known tool. However, since I recently had to do an install of Watir yesterday on a new computer, I noticed a couple of new things the Watir community has been up to since last I checked in with them. For those who don't know, Watir stands for Web Application Testing in Ruby and it's a very simple tool (dare I say painless) for generating test automation for web applications.

So what's new? Well, the last time I installed Watir (it was a while ago), it only had (working) distributions for IE and FireFox. Now it appears to support almost everything I'd care to test: IE, FireFox, Safari, Chrome, Flash, and work is underway on other ports. I also stumbled across Celerity, a headless Java browser with JavaScript support. Mmmmm.... sounds fast.

I like Watir for a couple of reasons. First, I enjoy programming in Ruby - it's strangely relaxing to me. That Watir leverages my language of choice is a big win. Second, Watir is so easy to use. Between IRB and FireBug, there are few web applications I've encountered that I can't have working Watir scripts for in a few minutes. Watir commands are predictable and relatively few - making them easy to remember. Finally, it's very easy for me to extend other scripting tasks using Watir. Because it's Ruby, I don't just use Watir for test automation. I sometimes use it to drive test data entry, assist with exploratory testing, parse websites for data, and other odd tasks.

Another fun fact, Watir is one of the few tools with it's own podcast. If you do a lot of test automation, it's well worth taking the time to listen to the podcasts. Lots of gems in there, and not all of them related to Watir.

27Dec/09Off

soapUI

I'm surprised I haven't posted about soapUI yet given how often I use it. It's one of the first web service testing tools I ever used, and I haven't had much need to look elsewhere. soapUI is great for both functional testing and performance testing. They also have a great service mocking feature.

I've never used the pro version, so I can't speak to those features or the support that comes with it. But I will tell you this, the first (and only) time I had an issue with the tool I contacted the developers and they had a build for me the next day with a fix. I was amazed at the turnaround. I'm sure not all fixes can happen that fast, but it still says something about their passion for the tool and the people that use it.

You can checkout the full feature set here: http://www.soapui.org/features.html

13Nov/09Off

Frankenstein

Frankenstein is an open source tool for testing swing applications. It's focus is on readable, simple, tests. Some features include: record and playback, test scripts are independent of widget location, OGNL based assertions, and HTML reports.

2Oct/09Off

Where to start: Automation in an Agile environment

When you are switching from Waterfall to Agile, it's very easy to get caught up in discussions about tools and automation. Which tools are best for unit testing and acceptance testing? What tools will we need for test data and test environment creation?

It may be worthwhile to take a step back and first prioritize what you want to automate. Ask yourself: "Where are tools going to add the best efficiencies?"

One area that often creates the most pain and gets overlooked is creating the test environment, installation and configuration.  It's these early stages in testing where most often delays occur.

It's not sexy and perhaps not as much fun, but for testers,  automating these areas first can provide considerable benefit in cost and time savings.  Getting developers to start on installation and configuration scripts first, before writing any application code is another way to streamline the process. This way, you can get the test environment running ahead of any functionality testing.

Remember its, "Individuals and interactions over processes and tools"

Filed under: Automation No Comments
21Sep/09Off

New to Ruby? Learn with Robots…

If you're new to Ruby and want a fun way to learn more about the language, try out RRobots. RRobots is a simulation environment for robots that have a scanner and a gun, can move forward and backwards and are entirely controlled by ruby scripts. You create your own robot to do battle with others.

It's fun, but more important than that, it challenges you to take advantage of some of Ruby's language features. It also gets you comfortable with a lot of things you'll be doing it you're writing custom automation code (like nested looping, variable management, etc...).

Categories

Authors

Pages

Quick Testing Tips load time improved by PHP Speedy Quick Testing Tips load time improved by PHP Speedy