Jay Harris's blog on coding .Net, automation, and improving quality through code. RSS 2.0
 Friday, September 21, 2007
Scott Hanselman posted an entry yesterday about Managing Multiple Configuration File Environments with Pre-build Events. His design uses pre-build events in Visual Studio to copy specific configuration files to the default file name, such as having “web.config.debug” and a “web.config.release” configuration files and the pre-build copying the appropriate file to “web.config” based on which build configuration you are in. This is a great idea, but large web.config files can get tedious to maintain, and there is a lot of repeated code. Even using include files as Scott suggests would help, but major blocks, such as Application Settings, may have to be repeated even though only the values change. This exposes human error, since an app setting may be forgotten or misspelled in one of your web.config versions.
At Latitude, we manage this problem through NAnt. One of our former developers, Erik Nelsestuen–brilliant guy–authored the original version of what we call “ConfigMerge”. Essentially, our projects have no web.config under source control. Instead, we have a web.format.config. The format config is nearly identical to the web.config, except all of the application settings and connection strings have been replaced with NAnt property strings. Rather than have a seperate web.config for each environment and build configuration, we simply have NAnt property files. Our build events (as well as our automated build scripts) pass the location of the format file and the location of the property file and the output is a valid web.config, with the NAnt property strings replaced with their values from the environment property file.
It’s simple. It only takes one NAnt COPY command.
default.build
<project default=”configMerge”>
  <property name=”destinationfile”
    value=”web.config” overwrite=”false” />
  <property name=”propertyfile”
    value=”invalid.file” overwrite=”false” />
  <property name=”sourcefile”
    value=”web.format.config” overwrite=”false” />
 
  <include buildfile=”${propertyfile}”
    failonerror=”false”
    unless=”${string::contains(propertyfile,
      ‘invalid.file’)}” />
 
  <target name=”configMerge”>
    <copy file=”${sourcefile}”
      tofile=”${destinationfile}”
      overwrite=”true”>
      <filterchain>
        <expandproperties />
      </filterchain>
    </copy>
  </target>
</project>
 
For an example, lets go with a partial web.config, just so you get the idea. I’ve stripped out most of the goo from a basic web.config, and am left with this:
web.confg
<configuration>
  <system.web>
    <compilation 
         defaultLanguage=”c#”
         debug=”true”
    />
    <customErrors 
    mode=”RemoteOnly” 
    /> 
  </system.web>
</configuration>
In a debug environment, we may want to enable debugging and turn off custom errors, but in release mode disable debugging and turn on RemoteOnly custom errors. The first thing we will need to do is create a format file, and then convert the values that we want to make dynamic into NAnt property strings.
web.format.config
<configuration>
  <system.web>
    <compilation 
         defaultLanguage=”c#”
         debug=”${debugValue}”
    />
    <customErrors 
    mode=”${customErrorsValue}” 
    /> 
  </system.web>
</configuration>
Next, we need to make NAnt property files, and add in values for each NAnt property that we’ve created. These property files will include the values to be injected into the web.config output. For the sake of simplicity, I always give my property files a ‘.property’ file extension, but nant will accept any file name; you can use ‘.foo’ if you like.
debugBuild.property
<project>
   <property name=”debugValue” value=”true” />
   <property name=”configMergeValue” value=”Off” />
</project>
releaseBuild.property
<project>
   <property name=”debugValue” value=”false” />
   <property name=”configMergeValue” value=”RemoteOnly” />
</project>
Finally, we just execute the NAnt script, passing in the appropriate source, destination and property file locations to produce our environment-specific web.config.
nant ConfigMerge -D:sourcefile=web.format.config -D:propertyfile=debugBuild.property -D:destinationfile=web.config
web.config output
<configuration>
  <system.web>
    <compilation 
         defaultLanguage=”c#”
         debug=”true”
    />
    <customErrors 
    mode=”Off” 
    /> 
  </system.web>
</configuration>
And that’s all there is to it. This is extendable further using the powers of NAnt. Using NAnt includes, you can put all of your base or default values in one property file that’s referenced in your debugBuild.property or releaseBuild.property, further minimizing code. You can use Scott’s pre-build event idea to have each build configuration have its own NAnt command to make mode-specific configuration files.
Feel free to use the above NAnt script however you like; but, as always YMMV. Use it at your own risk.
Enjoy.
Friday, September 21, 2007 9:00:26 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
NAnt | Tools
 Friday, June 22, 2007

CruiseControl.Net 1.3 was released this morning. To me, most important was the new Build Queue functionality, stopping multiple projects from building at the same time. If ProjectB depends on ProjectA, and they both get code changes committed at the same time, they will fail from contention. Either ProjectA will fail because it can’t delete its old assemblies (because ProjectB has a lock on them) or ProjectB will fail because it can’t find the ProjectA assemblies (because ProjectA deleted them in its rebuild).

No more.

I’m so excited that I am already upgrading our servers!

Friday, June 22, 2007 9:19:30 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Tools | CruiseControl.Net | Continuous Integration
 Thursday, October 19, 2006

The day is here: Internet Explorer 7 released this morning, though it is only available to users running Windows XP SP2 or Windows Server 2003. Though it does not yet appear on the list of available updates through Windows Update, you can download it from Microsoft.com. [ News: ZDNet | CNet ] In a CNet review, the reviewing editor notes how the browser is still not compliant with standards set by W3C and recommends switching to Firefox.

“IE 7 was Microsoft’s one chance to leapfrog ahead of the competition, but the company has only barely caught sight of the current front-runners. For more features and greater security, switch to Mozilla Firefox.” ~ CNet [ article ]

There is already a version branded by Yahoo! that includes the Yahoo! toolbar, links to Yahoo’s tools (like Yahoo! Mail), and the default homepage set to Yahoo. Of course, Yahoo! is catching some flak, since it released its “optimized” version prior to Microsoft’s own official release. [ ZDNet ]

Mozilla plans to release Firefox 2.0 in the coming weeks. You can download the current beta, Firefox 2.0 RC3, or the current public release, Firefox 1.5.0.7, from Mozilla.com. [ v2.0 RC3: download | release notes. v1.5: download | release notes ]

Thursday, October 19, 2006 9:39:24 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Mush | Tools
 Tuesday, October 17, 2006

Both NAnt and NAntContrib released version 0.85 on Sunday. The changes to NAnt from 0.85 rc4 only include a few bug fixes. NAntContrib has added the ability to specify the encoding on SQL files. All-in-all, not much has changed since 0.85 rc4, but that is a good thing, since it indicates the version is finally ready for release. The first release candidate was made available nearly two years ago.

Despite the minimal changes in the final package, consider upgrading just to get rid of the ‘release candidate’ tag.

NAnt v0.85 [ homepage | download | release notes ]
NAntContrib v0.85 [ homepage | download | release notes ]

Tuesday, October 17, 2006 9:42:02 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
NAnt | Tools
 Monday, October 09, 2006

For those that missed the announcement last week (like I did), the latest version of CruiseControl.Net has been released.

I plan on checking it out this week, then possibly upgrading our Build environment on Saturday. There are some modifications that I am really excited about:

  • Log4Net is used. (Default: Rolling file appender for logging server output.) If the traditional Log4Net configuration block is included in the application configuration file, I will probably change that to the ADONet appender, instead.
  • Users can volunteer to fix a broken build. How sweet is that!?!
  • <prebuild /> section allows custom tasks to run prior to the build. This one is a big bonus; previously, if something went wrong with the build, often the external log files (NUnit, FXCop) from the previous build would get included in the current build’s report. Now the prebuild can give them the boot.
  • Caching is used on WebDashboard. We have some huge log files and some not-so-powerful build servers. Sometimes it takes the machine a while to process the XSL. I am hoping that caching will help with that.
  • WebDashboard can stop and start projects. I am very excited about the ability to pause individual projects without having to modify the setup or stop the entire service.

This seems like a nice package (Release Notes). I am eager to pull it down and give it a go.

One gotcha that everyone should be aware of: Old versions of the dashboard and CCTray are incompatible with the new version of the service, so both will need to be replaced. Give your development team a heads-up, so they know to replace their tray installation as soon as the new server version is installed and online.

Monday, October 09, 2006 9:51:12 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Continuous Integration | CruiseControl.Net | Tools
 Friday, July 28, 2006

Microsoft has announced that the upgrade to Internet Explorer 7 will be “high priority” in Windows Update, essentially forcing the upgrade on XP users everywhere (news.com). Microsoft has released a toolkit to disable automatic delivery of the browser upgrade, however this is a pro-active path; if a user does nothing, they are going to get the new version. My poor grandma (Usability: What Would Grandma Do?), who has no idea about any of this, is getting the upgrade. If you have Windows XP, and you have an internet connection, you pretty much are destined for this upgrade.

Now, I don’t think that is entirely a bad thing. Far too many people just blindly use this paperweight we call a computer. They don’t read manuals, they don’t educate themselves on this thing, they just start pressing buttons. When they get a phishing email about “Your bank account has been compromised. Please send me your account number and password so that I can fix it,” they reply with their credentials. “Click here and win an iPod” and they click. “Check out this email attachment of dancing babies” and they get yet another virus. Because of this we have to monkey-proof computers, and add far too many security checks on systems, and overall make developer-life a little more painful. So, I think this is a good thing. Yeah, I drank the Microsoft kool-aid, but I’m all for this automated upgrade to help make up for the swiss cheese that is Internet Explorer 6. I’m going to continue using Firefox as my browser, anyway, but if this makes my OS a little more secure…good!

But what does this mean to us, the development / testing community? Test now. Test often. In a few short months a few million people will unknowingly get IE7, and at that time we will no longer have any excuse about whether or not our systems work. Our stuff needs to work on IE7-Day. So download the beta, and start testing your web apps to make sure everything still works. Microsoft hasn’t been too browser-compliant in the past, and other than competition from Firefox I don’t see a lot of reason that they would start, so there is good reason to suspect things might break. Start testing now, or you will be scrambling in a few months when your help desk lights up like a Christmas tree.

Friday, July 28, 2006 7:30:43 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Tools
 Wednesday, May 31, 2006

Most of our VS.Net solutions contain hundreds of files (classes) organized neatly into dozens of folders (namespaces), but despite all of this organization the vertical content size of the Solution Explorer can get quite large. Finding a particular file when the majority of the tree is expanded is tedious and time-consuming, considering it should be a simple effort of less than five seconds. Fortunately, all of this is solved by the click of a button (assigned to handy macro).

The most useful macro for Visual Studio that I have ever encountered (and in the running for most useful VS tool, period) is the CollapseAll macro authored by one current and one former colleague, Dennis Burton and Mike Shields. In a quick XP effort, Dennis and Mike created a handy macro that recursively collapses the entire Solution Explorer tree down to just the solution and its projects.

With the tree collapsed, it is easy to find that desired file.

CollapseAll Macro for Microsoft Visual Studio.Net 2003
Dennis Burton & Mike Shields | Published with Permission

Imports EnvDTE

Imports System.Diagnostics

 

Public Module CollapseAll

 

    Sub CollapseAll()

        ‘ Get the the Solution Explorer tree

        Dim UIHSolutionExplorer As UIHierarchy

        UIHSolutionExplorer = DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object()

        ‘ Check if there is any open solution

        If (UIHSolutionExplorer.UIHierarchyItems.Count = 0) Then

            ‘ MsgBox(”Nothing to collapse. You must have an open solution.”)

            Return

        End If

        ‘ Get the top node (the name of the solution)

        Dim UIHSolutionRootNode As UIHierarchyItem

        UIHSolutionRootNode = UIHSolutionExplorer.UIHierarchyItems.Item(1)

        UIHSolutionRootNode.DTE.SuppressUI = True

        ‘ Collapse each project node

        Dim UIHItem As UIHierarchyItem

        For Each UIHItem In UIHSolutionRootNode.UIHierarchyItems

            ‘UIHItem.UIHierarchyItems.Expanded = False

            If UIHItem.UIHierarchyItems.Expanded Then

                Collapse(UIHItem)

            End If

        Next

        ‘ Select the solution node, or else when you click

        ‘ on the solution window

        ‘ scrollbar, it will synchronize the open document

        ‘ with the tree and pop

        ‘ out the corresponding node which is probably not what you want.

        UIHSolutionRootNode.Select(vsUISelectionType.vsUISelectionTypeSelect)

        UIHSolutionRootNode.DTE.SuppressUI = False

    End Sub

 

    Private Sub Collapse(ByVal item As UIHierarchyItem)

        For Each eitem As UIHierarchyItem In item.UIHierarchyItems

            If eitem.UIHierarchyItems.Expanded AndAlso eitem.UIHierarchyItems.Count > 0 Then

                Collapse(eitem)

            End If

        Next

        item.UIHierarchyItems.Expanded = False

    End Sub

 

End Module

Based on code from Edwin Evans

Here, the macro is so popular that it is a part of our default developer’s build for every new machine, and is conveniently assigned to a toolbar button. The default button icon list contains an Up Arrow (in the Change Button Image menu when customizing the toolbar) that seems quite appropriate. That little button has saved us all from a lot of pain, five seconds at a time.

Wednesday, May 31, 2006 9:19:55 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Programming | Tools
 Tuesday, November 15, 2005

CruiseControl .Net 1.0 has been released. download | release notes

This is a must upgrade for anyone running v0.9 or earlier. There are many updates that I am excited about, most notably the overhaul to CCTray (the client-side build monitoring tool that sits in your system tray). Our developers have had to use Firefox’s CC.Net monitor extension to monitor multiple builds, simultaneously. No more.

We will be upgrading within the next week.

Tuesday, November 15, 2005 11:34:32 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Continuous Integration | CruiseControl.Net | Tools
 Saturday, November 05, 2005

MSIExec error code 1605 has been a thorn in my side for quite a while. When an MSI was command-line deployed by one user (manually deployed by me in the middle of the day), it couldn’t be uninstalled by another (automation during the nightly) due to the “Just Me” default. If I installed it through using the UI, and installed it for use by “Everyone”, then the nightly would build just fine. I needed a way to run an “Everyone” install from the command line, but Google wasn’t helping me out. Unfortunately, Microsoft does not seem to have a lot of documentation on this functionality, either.

It further frustrated me this morning when my nightlies were failing again, but only on one server. Of course, I manually deployed the package to this same server to a few days ago. I tried Google again, and this time hit pay dirt. Executing it with ALLUSERS=2 in the command line makes it available for everyone. Apparently, it forces an “Everyone” install for the UI, too.

Finally I can pull the thorn out.

MSIExec /i mypackage .msi … ALLUSERS=2

Saturday, November 05, 2005 11:06:26 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Continuous Integration | Tools
 Friday, October 28, 2005

“It compiles! Ship it!”

Microsoft has sent Visual Studio 2005 to the printers. That brings .Net 2.0 to the table in all of its glory. The official release date is still November 7, and though it is available now to all of us MSDN subscribers (though the site is too flooded to ping, let alone download), there is still some question on if the media will be ready in time to go in all of the pretty little VS05 boxes at your local Microsoft store.

Friday, October 28, 2005 12:40:03 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
ASP.Net | Programming | Tools
 Thursday, August 11, 2005

Hopefully this will save a few of you some time: I have created a registry entry that will create file associations and commands for your NAnt .build files. It will associate .build files as “NAnt Build Files” and create two commands for right-clicking a .build file in Explorer: “Edit” will open the file in Notepad; “Run” will execute the file in NAnt using a persistent command window (the window won’t disappear when the script is finished).

NAnt Build File Associations

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.build]
@=”build_auto_file”

[HKEY_CLASSES_ROOT\build_auto_file]
@=”NAnt Build File”
“EditFlags”=dword:00000000
“BrowserFlags”=dword:00000008

[HKEY_CLASSES_ROOT\build_auto_file\shell]
@=”Edit”

[HKEY_CLASSES_ROOT\build_auto_file\shell\&Run]
@=”Run”

[HKEY_CLASSES_ROOT\build_auto_file\shell\&Run\command]
@=”C:\WINDOWS\system32\CMD.EXE /k “C:\Program Files\NAnt\bin\NAnt.exe” -buildfile:%1″

[HKEY_CLASSES_ROOT\build_auto_file\shell\&Run\ddeexec]

[HKEY_CLASSES_ROOT\build_auto_file\shell\&Run\ddeexec\Application]
@=”NAnt”

[HKEY_CLASSES_ROOT\build_auto_file\shell\&Run\ddeexec\Topic]
@=”System”

[HKEY_CLASSES_ROOT\build_auto_file\shell\edit]
@=”&Edit”

[HKEY_CLASSES_ROOT\build_auto_file\shell\edit\command]
@=”C:\WINDOWS\system32\NOTEPAD.EXE %1″

[HKEY_CLASSES_ROOT\build_auto_file\shell\edit\ddeexec]

[HKEY_CLASSES_ROOT\build_auto_file\shell\edit\ddeexec\Application]
@=”NOTEPAD”

[HKEY_CLASSES_ROOT\build_auto_file\shell\edit\ddeexec\Topic]
@=”System”

Use this code/file at your own risk. I offer it as is, without any support. By downloading this file or using this code you take full responsibility for any repercussions that it may have on your computer.

Thursday, August 11, 2005 12:46:23 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
NAnt | Tools
 Wednesday, July 27, 2005

Must Have Tools

  • Notepad2: A vital, essential, notepad replacement. Color-codes your text using syntax schemes identified by the file’s extention. I followed Scott Hanselman and “renamed ‘Notepad2.exe’ to ‘n.exe’ which saves me a few dozen ‘otepad’s a day.”
  • PsExec: [blog entry] Execute remote applications, remotely. Great for installing an MSI on a remote box without resorting to Remote Desktop. Also great for launching solitaire on your buddy’s machine and harrassing him for slacking at work.

Testing Tools

  • Screen Hunter 4.0 Free: [blog entry] Free screen capture tool that is a requirement in any tester’s toolbelt.
  • Watir: [blog entry] Web Application Testing In Ruby. An automated functional testing tool for automated browser tests in IE. Scripts are written in Ruby.

Continuous Integration Tools

  • CruiseControl.Net: Monitor your source. Can be used to manage automated builds, build status, and reports from NUnit, FXCop, etc.
  • NAnt: Free build tool for .Net. Use with CruiseControl.net to automatically build nightlies or whenever a code change occurs.
  • NantContrib: An extention for NAnt. Adds some useful tasks that NAnt does not include, such as integration with VSS.
Wednesday, July 27, 2005 1:07:10 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Mush | Tools

Scott Hanselman is my new hero. He is filling the hole—the one thing preventing Watir from becoming real competitor in the automated functional test market: script recording. Watch out Mercury; by creating WatirMaker, Scott is opening the flood gates, and Watir is going to come pouring through.

This changes everything.

I started out my career as a developer, but as I noted in an earlier blog, I get much more enjoyment from breaking things than I do building things, so I jumped ship. With my development experience I can delve in to making some rather wicked scripts for QTP, LoadRunner, and lately, Watir. However, my testers don’t share my skill set. My biggest hurdle in ousting QTP and making Watir our standard is the lack of recording; I can not expect every tester to start coding away in Ruby. It should come as no surprise that when I opened Scott’s blog this morning, I was so excited that I nearly wet myself.

It is a work in progress, but soon Scott hopes to have a fully functional recording tool for Watir. With WatirMaker, my testers can hit a button and start clicking away in IE; the tool will happily watch like a little kid on the sidelines, learning every move. My testers can all adopt Watir with open arms, and we can wave goodbye to that Mercury maintenance contract.

The only thing left to say is: “Scott…thanks!”

Wednesday, July 27, 2005 12:55:50 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Programming | Testing | Tools | Watir
 Tuesday, July 26, 2005

In code deployment, it is often necessary to perform tasks that must be executed locally on the destination box, such as installing through an MSI or installing assemblies to the GAC through GACUtils. Thankfully, there is a way that this can all be done remotely, with any process, as long as it can be accessed through a command prompt. The destination computer will think that you are working on it directly, though it may just be your NAnt script doing the work for you.

SysInternals publishes a tool called PsExec. It allows you to execute a program remotely on a remote machine. To the remote machine the process is running locally. Because of this, you can use traditional command line tools to run programs and utilities, such as GACUtil to install a new assembly to the GAC on a remote box–a feature that most other options don’t support.

PSExec \MyServer "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\GACUtil.exe" "C:\bin\MyAssembly.dll"

Note: the paths are all ‘local’ paths on \\MyServer, just as you would enter from a command prompt in an RDP session to MyServer. You will also need to customize the paths to include whatever location and framework version your remote machine uses.

As for me, because our web applications make thorough use of the GAC, our only deployment method is a VS.Net Deployment project to create a MSI. We have NAnt scripts that upload the MSI to remote machines then execute PsExec run the installation (MSIExec) in unattended mode. It has brought our deployment time down from a manual 30-45 minutes to an automated 15 minutes, and allows code managers to spend those 30-45 minutes doing something else. We save even more time when we deploy to production, which contains an 8-server web farm.

Tuesday, July 26, 2005 10:39:49 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
ASP.Net | Tools
 Monday, July 25, 2005

If you are anything like me, you probably have the latest version of Internet Explorer and/or Firefox on your machine.
If you are anything like me, you have clients that don’t. They are often still supporting Internet Explorer 5, or some archaic version of Netscape.

Though it is a little dated, I found a rather helpful post on semicolon, today. The post on multiple Internet Explorer versions in Windows discusses stand-alone versions of Internet Explorer available through an Internet Explorer browser archive from evolt.com. The post goes one step further, identifying a defect in IE where every version uses common registry settings causing it to always identify itself as v6, even if you are using a different version. The post contains a workaround; drag this Version bookmarklet to your links toolbar, and when you click it, it will show your actual version.

I would also like to take his post one step further. The full browser archive, which semicolon does not mention. Not only does evolt include Internet Explorer, but seemingly every browser ever available, such as Netscape Navigator, Opera, and Lynx.

Monday, July 25, 2005 12:59:37 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Testing | Tools
 Friday, July 15, 2005

In case you haven’t heard of it yet, Watir is the greatest thing to hit automated functional testing since…well…ever. Watir (pronounced “water”), or Web Application Testing In Ruby, is an open source automated functional testing tool powered by Ruby. My company has been living off QuickTest Pro, and it is not much of a leap to Watir. Much like QTP, it automates an instance of Internet Explorer and navigates its way around your web site, however unlike QTP, it doesn’t hijack your computer when you do it; with Watir, the IE window doesn’t have to be the foreground window, so you can get something else done while your test is executing. Watir also allows various checks much like QTP, but though programming includes the capability of checking much more, such as object hierarchy or object style. (Yes, Watir can make sure that your validation messages are red!)

Your money manager will love Watir, too. Our switch from QTP will save us thousands of dollars per year from Mercury’s annual support costs. For a moment, I think our company president’s pupils turned to dollar signs like a cartoon.

If you are like me, and spend your QTP days in ‘Expert’ view (Source code), you will pick Watir up quickly. I even find it better than QTP. Additionally, since it is just a source code file, edited in Notepad if you like, it can be stored in your favorite source control application AND (this is a big ‘and’) your developers can execute the automated tests themselves without proprietary software like QTP. Its easy integration with NUnit will also tie your automated functional tests in with applications like Nant and CruiseControl.

More Information
Read all about Watir.
Read Bret Pettichord’s (a Watir creator) blog entry about Watir.

Friday, July 15, 2005 1:19:59 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Programming | Testing | Tools | Watir
 Wednesday, May 11, 2005

Screen Hunter 4.0 Free - www.wisdom-soft.com
Screen Capture Tool
Cost: Free

Quite possible the most essential task for any tester is taking a snapshot of the current screen to give their developer a visual representation of the logged error. The classic Windows hotkey, [Alt] + [PrtScn], will take a screen capture of the entire active window. However, sometimes the text on a link is spelled wrong, a button uses the wrong icon, or an error message displays in the wrong style; in these scenarios an entire screen grab is overkill and often confusing. Yet there are few things that a tester can do about that short of opening up MS Paint or Macromedia Fireworks and cropping the image, completely wasting valuable time and causing pointed comments from the Project Manager about diddling in Photoshop.

Screen Hunter 4.0 Free allows you to capture the important pixels quickly and effortlessly. Tap F6 (The default hotkey, but it can be modified), and your cursor changes to a cross-hair. Click-drag a box around whatever you want to capture, and it’s done. Instantly cropped screen capture for your bug-tracking pleasure.

The developers will be happier, too.

Wednesday, May 11, 2005 1:46:01 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Reviews | Testing | Tools
Navigation
Lansing Day of .Net, 21 June 2008 - I'll be there!
Archive
<May 2008>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
Local Blogs
Other Blogs I Read
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Jason Harris
Sign In
Statistics
Total Posts: 63
This Year: 3
This Month: 1
This Week: 0
Comments: 1
All Content © 2008, Jason Harris
DasBlog theme 'Business' created by Christoph De Baene (delarou)