Posted by jstrazzere on August 9, 2010 at 2:17 PM in QA
The Automated Testing Institute is running their 2nd Annual "ATI Automation Honors" competition.
From the ATI website: The industry's original set of awards dedicated to software test automation is again looking to crown industry leading tools, resources and practitioners with automation's top honor. That means it's time for all of you to get busy! The ATI Automation Honors awards rely on industry practitioners to identify which tools, resources and people are the best, which have the most significant upgrades and/or which are setting the trends that will help to take software test automation to the next level in the coming year.
Last year SQAForums.com won the best software testing website award. This year they are nominated in the "Best Automated Testing Forum" category.
I don't think there's much doubt that SQAForums is the best for supporting virtually every test automation tool that exists. With their individual tool-specific forums, as well as their general automation forums, everyone can find a handy home for helpful hints, tips, in-depth product reviews, and the kind of product support you can't even get from the vendors' sites.
That's why I'm voting for SQAForums. Won't you join me? To vote, go to http://www.automatedtestinginstitute.com/home/index.php?option=com_jforms&view=form&id=10&Itemid=183 Any comments on this article? Email Me
Previously I noted how I had written my original tests with Fitnesse to use the TestRunner and access Fitnesse in a way that worked, but as I recently discovered is no longer supported. Oh well, so I update my tests. Which was necessary anyway, since on the Build Machines where these tests would be run Fitnesse is not going to be running, and if it was I shouldn't need to usurp it for my tests. So I moved over to using the RESTful method, which I had a hard time with earlier, but now is so insanely simple I wonder why I had a hard time with it before.
Without futher ado, here is the RESTful method to run Fitnesse tests.
First I set up my variables, I've also added in an archive file now, so I can keep track of my results, the RESTful results are nice so I actually output each test into its own results file, and I make an aggregate to be an archive. Eventually I will get rid of the individual results and keep the archive around - this also let's me go onto any machine that ran a test and see how things have been going. The Arrays I have are suites that I set up in Fitnesse to contain my tests, I have one for QA that I would run, and a Smoke suite that is a selected set to verify the build worked.
# Get the current directory
Push-Location
.
# Variables for the script
# This location should not change, since its the standard checkout location
Then I still run my check on whether Fitnesse is running, it doesn't really need to be running anyway; so I decided that since REST only runs as needed then I was going to shut down Fitnesse if it was going.
# CheckFitnesseProcess determines if Fitnesse is running, if Fitnesse is not running
# then the script continues. The current test configuration does not require Fitnesse
string]$filter = $null
if ((Get-Process java -ErrorAction SilentlyContinue) -ne $null) {
Get-Process java | ForEach {
# use WMI API to get process details
$filter = "Handle='" + $_.Id + "'"
$wmip = Get-WmiObject Win32_Process -filter $filter
# CommandLine property has AppPool name; grab name using contains
if($wmip.CommandLine.contains("fitnesse")) {
# Uncomment the next line for debugging
# Write-Host "Found this java process: $wmip.CommandLine `n"
$fitRunning = $true
# Saving the Process ID to stop the process later,
# using a Global as I could not get this work if I declared
# the variable at the beginning.
$Global:fitProcess = $_.Id
}
}
}
if ($fitRunning -eq $false) {
# All is good
}
if ($fitRunning -eq $true) {
Write-Host "Fitnesse is running, it's best if its not - shutting it down...`n" -ForegroundColor Red
# Stop the Fitnesse process
Stop-Process-Id $fitProcess
}
}
}
I'm going to skip the Help function, if you need that it should be in my previous post, the important one is the Main function.
function
main()
{
# Need to be in the Fitnesse directory to access TestRunner, and
# the Fitnesse batch file in case Fitnesse needs to be started
cd $fitnesseLocale
#Check and see if Fitnesse is running
CheckFitnesseProcess
foreach ($test in $testArray)
{
# Start the test
$myDate = Get-Date Write-Host "`nRunning $test`n"
# Build RESTful URL
$testLink = $test +"?" + $testType +"&format=text"
# Get the output from TestRunner so we can scrape it for test passes and fails
$testResults = & $Java "-jar" "$fitnesseJar" "-c" "$testLink"
Write-Host "Completed $test`n"
# Write-Host "Test Results..."
# Scan through the output, then display the results
# Dump $testResults out to a File
$testFile = $test + $myDate.Day + $myDate.Month + $myDate.Year + $myDate.Hour + $myDate.Minute + ".txt"
$testResults | Out-File "$testResultsDir\$testFile"
# Print out date to an archive file
$testDate = "Last run time: " + $myDate.Day + "/" + $myDate.Month + "/" + $myDate.Year + " at " + $myDate.Hour + ":" + $myDate.Minute
$testDate >> "$testResultsDir\$archiveFile"
foreach ($line in $testResults)
{
if ($line -match "\A\.\s"){
# This is a Pass
Write-Host $line -ForegroundColor Green
# Output to archive file
$line >> "$testResultsDir\$archiveFile"
}
if ($line -match "\AX\s") {
# This is an Exception, a warning but not a Failure
Write-Host $line -ForegroundColor Yellow
# Output to archive file
$line >>
Posted by jstrazzere on July 29, 2010 at 12:55 PM in Life
I was listening to NPR's All Things Considered on the way home from work last evening. They've been running a series called "Summer Jobs", and they have had some really unusual ones. So I thought I'd share one of my summer jobs, too.
I'm running Fitnesse with SharePoint and in trying to automate my tests I ended up wrapping everything up in PowerShell, this is my first full script that handles all the tests I wanted to do.
First set up all the variables needed.
[string]$fitnesseJar = "fitnesse.jar" [string]$fitnesseClass = "fitnesse.runner.TestRunner" # Need to get the local machine here, it will be where Fitnesse runs [string]$serverName = $env:COMPUTERNAME [string]$portName = "8080" # These are needed for the CheckFitnessProcess function, placing them here $fitRunning = $false # Since we need to manipulate this variable in a few different functions, its Global [int]$Global:startTries = 0 # Set Java executbale to use within PowerShell $Java = "java.exe" # Use a Test Array to be able to bundle all the tests $smokeArray = ( "FitNesseTestPageName1" ) $qaArray = ( "FitNesseTestPageName2" )
I use a function to check if Fitnesse is running, I wanted to only run it when I needed to and since this script can be automated I cannot be sure that Fitnesse will always be running
# CheckFitnesseProcess determines if Fitnesse is running; in which case # it jumps down to running the tests, as long as Fitness is running the Check does # not need to do anything else. # If Fitnesse is not running then the script attempts to start it, does a # check to make sure that Fitnesse started then runs the test. If this script # starts Fitnesse then it will attempt to clean up after itself and stop # Fitnesse by doing a check on $startTries, if this is > 0 then this script # started Fitnesse and can shut it down, otherwise it leaves the existing # process running # Adapted from: http://odetocode.com/Blogs/scott/archive/2006/07/17/5330.aspx function CheckFitnesseProcess { param ([string]$AppPoolName="") $ProcessId = $null if ($AppPoolName.ToUpper() -ne $NOT_PASSED) { [string]$filter = $null if ((Get-Process java -ErrorAction SilentlyContinue) -ne $null) { Get-Process java | ForEach { # use WMI API to get process details $filter = "Handle='" + $_.Id + "'" $wmip = Get-WmiObject Win32_Process -filter $filter # CommandLine property has AppPool name; grab name using contains if($wmip.CommandLine.contains("fitnesse")) { # Uncomment the next line for debugging # Write-Host "Found this java process: $wmip.CommandLine `n" $fitRunning = $true # Saving the Process ID to stop the process later, # using a Global as I could not get this work if I declared # the variable at the beginning. $Global:fitProcess = $_.Id } # The next statement was put in to check for the processes, there was a problem # when updating Java that the process find command did not work, if this happens # again just uncomment the Write-Host line to find out what is going on, otherwise # this just gets bypassed but caught later on. if ($fitRunning -eq $false) { # Uncomment the next line for debugging # Write-Host "Did not find a Java/Fitnesse Process. Found $wmip.CommandLine `n" } } } if (($fitRunning -eq $false) -and ($Global:startTries -lt 3)) { # Don't need to note that we have had 0 attempts if ($Global:startTries -gt 0) { # Need to give Fitnesse some attempts at starting, 3 is a good max Write-Host "Fitnesse is not running, have tried to start $Global:startTries time(s),`n" } $Global:startTries++ startFitnesse } if (($fitRunning -eq $false) -and ($Global:startTries -eq 3)) { # At some point we need to give up starting it Write-Host "Fitnesse is not running, tried to start $Global:startTries time(s).`n" Write-Host "Strike Out!" -ForegroundColor Red Write-Host "Looks like Fitnesse cannot be started or found,`n" Write-Host "check the server and try again.`n" # Go back to where we started Pop-Location exit; } if ($fitRunning -eq $true) { # Success!! Write-Host "Fitnesse is good to go.`n" -ForegroundColor Green } } }
Then I needed something to start Fitnesse, this uses the Fitnesse Batch script that comes with many of the installs
function startFitnesse() { Write-Host "Attempting to start up Fitnesse...`n" # Starts the Fitnesse process using the batch configuration file # Not sure we need the runAs Admin but that can be adjusted Start-Process -FilePath fitnesse.bat # Giving it time to wake up Start-Sleep -Seconds 2 # Need to check that the process actually started, do the check again CheckFitnesseProcess }
Every script needs a help option
function myHelp() { Write-Host "The Fitnesse Tester understands the following command line arguments:`n" Write-Host " qa - will run the QA Test Suites, a long set of tests`n" Write-Host " smoke - which will run the Build Smoke Tests, a short set`n" Write-Host "`n Running this script with no arguments will display this message`n" }
Then there is the main and rest of the script that runs everything
function main() { # Need to be in the Fitnesse directory to access TestRunner, and # the Fitnesse batch file in case Fitnesse needs to be started cd $fitnesseLocale #Check and see if Fitnesse is running CheckFitnesseProcess foreach ($test in $testArray) { # Start the test Write-Host "`nRunning $test`n" # Get the output from TestRunner so we can scrape it for test passes and fails $testResults = & $Java "-cp" "$fitnesseJar" "$fitnesseClass" "-v" "$serverName" "$portName" "$test" Write-Host "Completed $test`n" Write-Host "Test Results..." # Scan through the output, then display the results # Dump $testResults out to a File $testResults | Out-File "$test.txt" foreach ($line in $testResults) { if ($line -match "Assertions:") { # Write-Host "$line" # Do a regular expression to get the Assertion info # Example: Assertions: 8 right, 0 wrong, 0 ignored, 0 exceptions $line -match ":\s(?\d+)\sr.*(?\d+)\sw.*(?\d+)\si.*(?\d+)\se.*" # Send a summary of the results to the console Write-Host "Passed: "$matches.right -ForegroundColor Green Write-Host "Failed: "$matches.wrong -ForegroundColor Red Write-Host "Ignored: "$matches.ignores Write-Host "Exceptions: "$matches.exception -ForegroundColor Yellow } } } # Go back to where we started Pop-Location # Stop the Fitnesse process so we don't leave things running # But only if this script started it, which means $startTries is > 0 if ($Global:startTries -ge 1){ Write-Host "`nSince this script started Fitnesse, it'll be shut down now.`n" Stop-Process -Id $fitProcess } }
# Check command line values to see what test is running if ($args -eq "smoke") { $testArray = $smokeArray Write-Host "Running Smoke Test.`n" } elseif ($args -eq "qa") { $testArray = $qaArray Write-Host "Running QA Test Suite.`n" } elseif ($args -eq "check") { $testArray = $checkArray Write-Host "Running Check Suite.`n" } else { myHelp exit; }
# Run main main
I've moved onto REST but in case anyone else is trying to work with the TestRunner and PowerShell you have something you can start with, and not have to work it all from the beginning like I did.
For some reason my last couple of blog posts have disappeared? Including the one that mentioned that I've moved my blog to: http://dancedwiththetester.blogspot.com/
I've been learning a lot about SharePoint over the past 9 months, the project I am working on is to bring a non-profit health community onto SharePoint and increase the offerings the non-profit has and to expand the social networking. My work is revolving around testing the conversion of the site, making sure that what we end up with is going to be equivalent with what is currently in place. It's interesting work and I've had some interesting tasks over the past few months. Some of the more difficult work has been dealing with SharePoint and its eccentricities in order to assure that what we end up with is what was asked for.
Web Parts are like little applications that SharePoint uses to do all kinds of work, this could be anything from displaying a document library to a search result. While they are like little applications Web Parts are quite different and aren't very testable on their own, I haven't seen much on them regarding Unit Testing yet and with their reliance on SharePoint data its probably not that easy. Mostly the plan is to test the Web Parts in an exploratory fashion, when they are ready and added to pages they will be used and abused to put them through their paces. Not the way I'd like to do it, but I am also pulling some information from the Microsoft page on how to test Web Parts.
Automation with SharePoint is kind of tough, not that its difficult to work with, but the page layouts and Web Parts don't always make things run smooth. Web Parts can update like Ajax driven pages will, some of the ID's given by SharePoint for page elements can also be cryptic or dynamic. It's not impossible, I have done tests with Selenium, Fitnium and Fitnesse after some time to work out the issues in calling page elements. It just seems to take more time than it should.
The Social Networking aspects make things a little hard to automate everything, it would be nice to free myself up for other work but that's more a dream than a reality. Testing Discussion Groups, Comments and Ratings means eyes need to be on the page as things are done in order to verify that SharePoint responds properly.
When trying to find errors there are two important places to look:
ULS Logs - Get the Microsoft ULS Log Viewer, if there is something happening real time, this is the place to see it happen. Access to the SharePoint server under test is required to get this to work though.
Event Log - the Event Log is where alot of the captured errors go, if the Developers have not set this up in the code they should otherwise you lose and important resource.
I'll be putting in more links to some of the material I have captured over the past few months.
' ' CreateFile - Create a file of arbitrary length ' ' Author: Joe Strazzere '
Function CreateFile(location$, Length) Local MyStr$, Target, Main1000, Main100, Remain, Index
MyStr$=""
Target = Length Main1000 = Target / 1000 Main100 = (Target mod 1000) / 100 Remain = Target mod 100
Index = 0 While Index < Main1000 MyStr$ = MyStr$ + "JSS.................................................................................................JSS.................................................................................................JSS.................................................................................................JSS.................................................................................................JSS.................................................................................................JSS.................................................................................................JSS.................................................................................................JSS.................................................................................................JSS.................................................................................................JSS................................................................................................." Index = Index + 1 Wend
Index = 0 While Index < Main100 MyStr$ = MyStr$ + "JSS................................................................................................." Index = Index + 1 Wend
Index = 0 While Index < Remain MyStr$ = MyStr$ + "." Index = Index + 1 Wend
Posted by jstrazzere on May 10, 2010 at 5:06 PM in QA
This week marks the 10-year anniversary of my joining SQAForums "The online community for software testing & quality assurance professionals". The site is completely free, can be found at http://www.sqaforums.com and is owned and administered by A.J. Alhait.
From the SQAForums site:
The most popular Software Testing and Quality Assurance discussions site, with over 50 forums that cover almost every area in software testing, quality assurance and quality engineering.
If you are looking for place to get help or support on any software testing tool, you've found the only place! Simply ask our 180,000+ Members for almost anything, and you'll be surprised at the amount of help you can get here which you cannot get anywhere else.
SQA Forums - "The online knowledge bank for Software Test professionals... Will you be withdrawing or making a deposit today?"
Over the years, I've posted almost 10,000 times, read many, many thousands of thoughtful and helpful posts, and learned quite a lot from some very smart and experienced professionals.
At SQAForums, I currently moderate:
The Automated Testing forum
The WinTask forum
The Software Testing Interview Questions forum
The Oracle e-Test forum
The Oracle e-Load forum
The Knights of the QA Republic Round Table forum (for Moderators only)
If I've helped anyone along the way as well, then I'm very pleased to have done so, although I know that I have received far more than I have given.
Thank you, A.J.! I've gotten a lot out of the past 10 years, and I hope to continue here for many more. You've given the QA community an extremely valuable resource!
If you aren't already a member - what are you waiting for?
The next LTG is
on the 12th May 2010 and will be at: LVPO Bar in Soho. 50 Dean Street
London, W1D 5BQ 020 7255 8617 http://www.lvpo.co.uk/location/ Closest tubes are:
Leicester Sq and Piccadilly Circus
Happy Hour is from 5pm-8pm.
The
plan: I'll be there from about 5:30pm and we have the basement room
booked until 10pm.
Currently no sponsor, if you're interested in
sponsoring then let me know.
Posted by jstrazzere on April 22, 2010 at 3:21 AM in QA
Due to a faulty virus definition update, machines running Windows XP Service Pack 3 using the faulty definitions will delete svchost.exe, causing many key Windows services to fail to start. This Windows file is being mistakenly detected as W32/wecorl.a. Failure to start svchost.exe causes Windows to automatically reboot.
National software glitch
Hundreds of thousands of computers disabled
A huge disruption
Strangely similar to a widespread virus outbreak
Software update caused the anti-virus program to misidentify a harmless file (svchost.exe) as infected
A chain of uncontrolled restarts and loss of networking functionality
Shut down the State of Vermont's computer network
Many hospitals postpone elective surgeries
Organizations who had to shut down for business until this is fixed.
According to Ars Technica it "Would be trivially detected with even basic QA, which makes the regularity of such problems perplexing"
According to Amrit Williams (a former director of engineering with McAfee) it shows "a complete failure in their quality control process"
McAfee says:
We are investigating how the incorrect detection made it into our DAT files and will take measures to prevent this from reoccurring.
Mistakes happen. No excuses. The nearly 7,000 employees of McAfee are focused right now on two things, in this order. First, help our customers who have been affected by this issue get back to business as usual. And second, once that is done, make sure we put the processes in place so this never happens again.
Of course many of you are asking how the faulty DAT made it past our quality assurance checks. The problem arose during the testing process for this DAT file. We recently made a change to our QA environment that resulted in a faulty DAT making its way out of our test environment and onto customer systems.
To prevent this from happening again, we are implementing additional QA protocols for any releases that directly impact critical system files. In addition, we plan to add capabilities to our cloud-based Artemis system that will provide an additional level of protection against false positives by leveraging an expansive whitelist of critical system files.
And in his blog, technology writer Ed Bott tells us that he received a document from an anonymous source that appears to be a pre-scrubbed (and perhaps more telling) version of what appears on the McAfee blog.
Among the interesting nuggets:
"Specifically, XP SP3 with VSE 8.7 was not included in the test configuration at the time of release."
Posted by jstrazzere on April 6, 2010 at 12:17 PM in Life
For our Spring vacation this year, my wife and I decided to go back to Florida.
This time we went to Longboat Key, a beautiful barrier island on the west coast of Florida, surrounded by the Gulf of Mexico and Sarasota Bay.
The weather was perfect, the beaches were wonderful.
We stayed at a really nice Inn
Each morning we took long walks
Each day we spent time in the sun, in the ocean, in the pool
Each evening we watched the sun set over the Gulf of Mexico
We took in a Grapefruit League baseball game - the Red Sox crushed the Orioles in Sarasota (go Sox!)
We spent some time shopping and eating at St. Armands Circle
We went to Siesta Key Beach - home of "The Best Sand in the World"
We went to some really nice restaurants
One thing I experimented with this year - no reading!
Usually, I bring at least 3 books for vacation reading. But this year I wanted to try something different. Rather than bringing the usual reading material, I loaded up my iPod with podcasts. Not bad! Some really interesting lectures and discussions about science, politics, sports. I think next vacation, I will go back to bringing books, but will also continue with the podcasts. Oh, and I need a different set of earbuds. The ones that come with the iPod get uncomfortable (at least for me) after a while.
A truly wonderful vacation. One of the most relaxing vacations I can remember.
Posted by Tony on Wednesday 31 March 2010 at 13:09
On Saturday (27th March) I went to a RapidFTR CodeJam.
RapidFTR is Rapid Family Tracing and Reunification. It has been created
in order to help rescue agencies looking after kids in disaster areas.
It'll store personal and medical details which will help children get proper
medical attention and reunite them with their family but also just as
importantly help keep them safe from human traffickers.
It’s a good cause and if you can spare some of your time then please have a
look for more details here: http://wwww.rapidftr.com.
I was of course late and so missed the meet n greet but it was a pretty good
turn out which is great. It must have been 20(ish) people in London and a couple of guys in New York with who we were video
conferencing.
For a lot of people the majority of the day was spent on environment
setup. I had real trouble getting it setup on my Ubuntu netbook and it in
fact took all day.
Lessons learnt from the environment setup:
1. If you are tired don't leave it until 12:30am to setup your environment then
stop halfway through because the setup guide is not quite working for your
version of Linux.
2. If you are going to a CodeJam the next day do not install a theme on your
netbook at 1am, get it half working then go to bed. It'll cause you performance
issues the next day.
3. Prepare a VM to use for your environment setup; it'll make life much easier.
4. Just because there is a guide for a Linux environment setup don't assume
it's been tried with different versions of Linux.
5. Keep a note of the steps you tried during the setup so that when you do get
it working you can write a guide for other people.
Silly things really, I should have known better.
The Devs worked in pairs working in 25min increments, took a 5min break then
worked another 25 then a 5 min break, it seemed to work well.
Although the environment setup was tricky it was good to hear different people,
strangers really, working together in pairs on their stories. A few
stories were actually completed which is great.
I was absolutely useless that day as it took me forever to get up and
running. I aim to be able to add some value as the project progresses
though by brushing up on my Ruby so I can help with the code and with testing.
The idea of the testers/QAs floating about helping people with their tests was
put forward but I felt this might distract if the Devs were in flow.
Details about development are here: http://www.rapidftr.com/developer
I aim to knock up a setup guide for Ubuntu over the next few days to make the process
quicker.
It's a good way (as cheesy as this sounds) to help make the world a better
place, brush up on your skillset and meet and work with new people.
London Tester Gathering - 14th April - LVPO Bar - Sponsored by Microsoft Visual Studio 2010 and Electromind.
Hello All,
We have a venue for the next London Tester Gathering: LVPO Bar in Soho. 50 Dean Street London, W1D 5BQ 020 7255 8617 http://www.lvpo.co.uk Closest tubes are: Leicester Sq and Piccadilly Circus
Happy Hour is from 5pm-8pm. Half price wine and cocktails, bottles of beer are £2.50.
The plan:
I'll be there from about 5:30pm and we have the basement room booked until 10pm.
Posted by Tony on Wednesday 24 March 2010 at 13:20
My wife is taking part in a
skate-a-thon to raise money for Shelterbox, if you’re able to help out please
sponsor her:
Hello
all,
I will be taking part in
Skaiti for Haiti - a 24 hour sponsored
skate-a-thon on April 10-11th. Proceeds will go to Shelterbox, a disaster relief
charity, which provides aid not just to Haiti but to any area that has been
affected by disaster.
Then, for the Testing and QA community, she posed these thought-proving questions:
So, would it be possible to simplify the concept of software testing into one word? If you had the same tagline to fill, what word would you use that encapsulates what software testing brings to its customers?
I answered:
Our Product is ... Insight
To me, the insight we provide may lead to warmfuzzies, or confidence, or peaceofmind, or assurance (some of the other possibilities suggested in the thread). But it may also lead to starkterror.
Either way, we show "what is", not "what makes people feel good".
We don't omit the bad news, in order to spare people's feelings, although we carefully choose our words to provide information and not blame.