Archive for March, 2007

There are two games that have been in nearly every version of Windows. Solitaire is still king of the casual games market because of it’s easy accessibility and common rules knowledge. Minesweeper is the lesser-known sibling that doesn’t quite see as much play, but was my first game choice to write a QA Wizard Pro script to play.

I picked Minesweeper because the rules and ability to determine the board state are relatively straightfoward. It’s also conveniently available on nearly every Windows machine. The board state being random, it’s tricky for an automated tool to cheat at by performing the same actions every time and still win, so it takes some amount of AI logic to figure out what to do. (That means it’s interesting enough for me to actually write something and complete it.)

——————–

So, to get started:
1. Download the Broom script and workspace from the Seapine Labs QA Wizard Pro Sample Scripts page.
2. Unzip the file to a directory of your choice.
3. Open the “Broom.qawwspace” workspace in QA Wizard Pro.
4. Import the included “Minesweeper.xml” into your application repository.
5. Run the “Broom.qawscript”, and watch it play.

(Note that these steps work on Windows XP; Windows Vista users will have to read the included directions and make some adjustments.)

——————–

How it works:
First, the script does a few calculations to determine where the Minesweeper window is, and where the tiles are in the game. We use the board pixel size (I know, a weak point, but good enough so far) to determine whether we’re playing a beginner, intermediate, or advanced game. I suppose I could do some math and support any custom game size, but I’m too lazy and this is script version 1.0.

We then enter the main game loop, which overall does this:
1. Get the whole board state into an internal array.
2. Figure out if we lost.
3. Find tiles we know are mines. Basically, if a number tile is next to exactly that many unknowns or mines, they must all be mines.
4. Find tiles we know are safe. Again, if a number tile is next to exactly that many mines, all other unknowns near it must be safe.
5. Click on those tiles we’ve determined, or click randomly if we could make no determinations.
6. If we haven’t won yet, keep looping.

The “get board state” step utilizes an external assembly to figure out pixel color since we don’t have an internal function to do that. I thought about putting more than just “GetPixel” into the external assembly, but really the point is both to show off the robustness of the QA Wizard Pro script language and serve as a nice challenging test of the language parser and script execution.

——————–

At the beginner level, it wins nearly all the time. It wins a good portion of intermediate level games, but next to none on expert. So, I’ve tried putting a loop around main() to keep retrying if it loses, and having it run for hours trying to win on expert. No such luck so far, maybe someone else will get there first. :)

Share on Technorati . del.icio.us . Digg . Reddit . Slashdot . Facebook . StumbleUpon

2 Comments

Tags:

Jolt logoTestTrack Studio won this year’s Jolt award in the Bug and Defect Tracking category. This is a quite an accomplishment as TestTrack Studio was only recently introduced (November 2006.) A lot of work went into designing and building TestTrack Studio and we are honored to receive the industry recognition.

Congratulations TestTrack team!

Share on Technorati . del.icio.us . Digg . Reddit . Slashdot . Facebook . StumbleUpon

No Comments

QA Wizard Pro, now announced. I guess that means that we can talk about it now. The “Pro” clearly means “more spirograph,” so that’s what we’ll have to provide for you.

In the Seapine Labs pages, there’s a couple Spirograph scripts I wrote that are available for download.
Spirograph drawing in progress...

The first, “Spirograph” takes the MS Paint paintbrush and draws a hypocycloid with it. This script expects a fixed image size of at least 750×750.

The second “SpirographImageSize” works similarly with MS Paint and draws a polar rose with it. Being a little fancier, it looks in the Image Attributes dialog to determine the maximum image size before drawing.

So, contact your favorite figure in Seapine Sales, get yourself a beta copy of QA Wizard Pro and start drawing. Or Peak will hook you up to play some music if that’s what you prefer.

Share on Technorati . del.icio.us . Digg . Reddit . Slashdot . Facebook . StumbleUpon

1 Comment

SSCM Auto Share

talks about Surround SCM on March 05, 2007

Works with Surround SCM 2009

It is easy in Surround SCM to share a file from one branch to another, this can be done in one line command inside a trigger. It is much more difficult to create a share from one repository to another repository in the same branch.

The difficulty comes in determining the share to repository location. While the repository paths are identical when sharing between two branches, they are different when sharing between two repositories in the same branch.

This script auto shares files based on input that determines the ShareFrom location and the ShareTo location starting at the repository root (project root) that you want to share.
Continue reading…

Share on Technorati . del.icio.us . Digg . Reddit . Slashdot . Facebook . StumbleUpon

No Comments

Tags: , ,

SSCM Get

talks about Surround SCM on March 05, 2007

About In Surround SCM, it is easy to create a Get trigger when you have a defined working directory. It is more complicated to perform a Get to any other location because the trigger requires a Get to path.

The SSCMGet program allows you to enter a path to perform a Get to. This path is the root location and should represent a root repository location in Surround SCM that the trigger recursively monitors for changes. The repository path is then used (without the mainline name) to determine the Get path for subdirectories.
Continue reading…

Share on Technorati . del.icio.us . Digg . Reddit . Slashdot . Facebook . StumbleUpon

No Comments

Tags: ,

SSCM Bug Merge

talks about Surround SCM, TestTrack Pro on March 05, 2007

SSCMBugMerge is a C# utility that allows users to perform specific delta merge operations from one Surround SCM branch to another using a TestTrack defect number. This program is intended to serve as an example of how similar applications can be written and is not intended for use in a production environment as-is.
Continue reading…

Share on Technorati . del.icio.us . Digg . Reddit . Slashdot . Facebook . StumbleUpon

2 Comments

Tags: , , , ,

Page optimized by WP Minify WordPress Plugin