January 13, 2006

Why it’s Good to Automate

Filed under: Automation, Scripting — Marcus Tettmar @ 1:21 pm

One of the best ways to learn to use a software product fully is to try to automate it. Testers and automators have to learn the software’s interface really well, possibly better than the people who wrote it. Ok, the developers know the algorithms better than anyone else, but it is the person automating it who knows the ins and outs, pitfalls and quirks of the interface.

We all know how badly designed some Windows programs are. And in these days of fancy hi-res graphics and snazzy toolbar buttons it’s easy for the designers to forget about shortcut keys and keyboard navigation. The most productive way to use a PC is to forget the mouse and learn the keyboard shortcuts. You can get things done much more quickly. Yet even the most experienced Windows users don’t know half the keyboard shortcuts that exist in Windows (tips for keyboard navigation in Windows could be a post for another day).

Knowing these shortcuts makes automation so much easier and more reliable. Automating an application by sending mouse events and mouse clicks is unreliable and depends on the screen resolution never changing. Although you can use relative mouse coordinates, sooner or later something is going to change and the button you want to click is not in the place it was when the script was created.

The automation/test engineer is the one who figures out the keyboard shortcuts and finds the simplest, most reliable way of navigating an application. People who automate applications regularly have a good understanding of the different ways to move around Windows and Windows applications. Automated Software Testing can help find issues in the interface just from the process of building the automated test, even before the test script has been run. Building an automation routine for an application will help you find those missing or duplicated shortcut keys and other objects that can’t be driven by the keyboard.
Automators spend so much time fiddling with the software’s interface that they will often become more knowledgeable than the “power-users”. Testers also have the great advantage of being allowed to try unusual scenarios that developers never think about or are too busy to try. They are allowed to break things!

So it goes both ways. Find out the windows keyboard shortcuts and the hot-keys for the application you’re scripting and you can create a better script. Build an application with good keyboard support and your application can be automated more easily. If it can be automated easily it will be easy to use!

January 11, 2006

Macro Scheduler and the Zebra Fish

Filed under: General — Marcus Tettmar @ 2:25 pm

What has Macro Scheduler got to do with Zebra fish? Well, it seems Macro Scheduler was used to automate some of the experiments written about in this book: The Zebrafish: Cellular and Developmental Biology

Amazing huh? Macro Scheduler has been used for all sorts of incredible things. Unfortunately I’m not always able to get permission to write about them and often I have no idea what people use Macro Scheduler for at all. If you have put Macro Scheduler to some novel uses I’d be thrilled to hear about it. Let me know.

I know that Macro Scheduler is used by Sirius Satellite Radio for automatically inserting audio files into radio broadcasts, and on a similar note the BBC has used it for automatically uploading recently recorded programs onto their website. A well known high street bank in the UK installed Macro Scheduler in their branches to simplify a process for the counter clerks that involved pulling information from one legacy system and typing it into another. Another bank uses Macro Scheduler to automate the production of financial reports every morning. It’s great to know how Macro Scheduler helps so many different kinds of businesses.

I remember learning of a very elaborate experiment at NASA which used Macro Scheduler. Now, Macro Scheduler macros can be made very reliable, but whether or not they went as far as to use Macro Scheduler for the Shuttle’s auto-pilot system I have no idea ….

January 10, 2006

Macro Scheduler Translation

Filed under: Announcements — Marcus Tettmar @ 3:57 pm

We should have a couple of language packs available on the site very soon. Japanese and Norwegian translations are done for the software and we have others in various states of completion. We’re keen to get any help we can, so if anyone would like to volunteer please step up. The help file is perhaps the biggest hurdle but it could be a group project so don’t feel you can’t offer to help just because someone else is already working on your language. The more people the better! We can give translators affiliate commission and a special link in the translated software so that they get credited for sales. Ones we really want to get finished off are Spanish and French versions. Details on how to help can be found at:
http://www.mjtnet.com/usergroup/viewforum.php?f=11

Chained AutoLogon Sequence

Filed under: Scripting — Tags: — Marcus Tettmar @ 3:46 pm

Someone recently asked if we could add a new feauture to AutoLogon that would allow several macros to be scheduled one after the other without logging off in between.  At present AutoLogon works at the macro level.  It logs in, runs the macro and then logs out again.  What if you want to schedule several macros, one after the other, and just log in before the first and log out again after the last?  Well one way you could do that right now is to use the Macro> function.  Create one main macro which calls all the other macros, one after the other, with the macro command.  Then schedule this main macro with AutoLogon enabled.  The macro would look something like:

Macro>%SCRIPT_DIR%\macroA.scp
Macro>%SCRIPT_DIR%\macroB.scp
Macro>%SCRIPT_DIR%\macroC.scp

If you need a delay between each one you can add a Wait> command.

We’ll look at adding more AutoLogon options in future.  Our priority at the moment is getting AutoLogon to work with Windows Vista which uses a different logon mechanism.  We will have AutoLogon working on Vista by the time Vista is officially released.

January 4, 2006

Macro Scheduler 8.0 Released

Filed under: Announcements, Macro Recorder — Tags: — Marcus Tettmar @ 1:53 pm

The eagerly awaited new version of Macro Scheduler, version 8.0, was released this morning. We’ve added some really cool new features which allow macros to be scheduled even when Windows is logged out and automatically log back into Windows (or unlock the workstation) when needed. AutoLogon will automatically log into Windows, run the macro and then log out again. This means macros which require full access to the GUI, network resources, and user-level access rights can be scheduled to run even when Windows has been logged out or locked. We’ve also added new commands to get list box elements and tree nodes and improved existing script functions. The Macro Recorder has been improved, more debug functions have been added and we’ve added Unicode support so that double-byte characters can be sent to other applications … plus lots of other improvements. More info: Macro Scheduler 8.0
Thanks to everyone who helped beta test this major new release!

January 3, 2006

Image Recognition

Filed under: Scripting — Tags: — Marcus Tettmar @ 4:43 pm

When we are automating Windows applications we nearly always need to be able to detect new windows and wait for windows to open and close and be ready etc.  Unfortunately there are times when this is not possible.  Flash applications for example are just exposed as graphics and expose no windowed controls that we can grab a hold of.  Java applets are also a bit tricky as they use internal objects which Windows doesn’t know about.  Another tricky scenario is trying to automate Terminal Server or Citrix sessions at the client level.  The client just gets a graphical representation of the server’s screen.  There is no access to the objects that make up the user interface within the session unless you are on the server itself.  So we used to have to install Macro Scheduler on the server if we wanted to automate applications inside the session.  This is fine if we have access to install stuff on the server.  There are times when we don’t.

Another issue that came up recently was a customer that wanted to test the network lag time between a user entering some data into a Windows Terminal Server client and the server serving up the following page.  The conundrum is that if you install Macro scheduler on the server and make it wait for a new window there is no lag time since all the automation is happening locally to the server.  But on the client there is no way to know about the new window object.  Until now.

Enter the Macro Scheduler Image Recognition Library.   This includes functions that compare images and find images within larger images.  In other words we can compare screens and find objects within screens by searching for their image.   We can find and click on buttons and other controls and wait for the screen or parts of the screen to change based on what they look like.  This lets us automate applications graphically rather than having to know about windows and GUI controls.  In fact this is more analogous to how a user uses a computer.  The user watches the screen for changes in appearance and finds objects by looking at them with his eyes.  He looks at what he sees.  He doesn’t worry about window handles, x and y coordinates.  So the Image Recognition Library means we can automate any application regardless of the technology it uses to expose it’s interface.  It works at the graphical level of the screen.  You can download the Image Recognition Library at http://www.mjtnet.com/imagerecognition.htm

Note: Image Recognition is now native within Macro Scheduler and the separate library is no longer required.

December 30, 2005

Internet Macros

Filed under: General — Tags: — Marcus Tettmar @ 11:03 am

Ever since Macro Scheduler has supported VBScript it has been possible to control Internet Explorer directly via it’s ActiveX interface. Here are some examples:

http://www.mjtnet.com/usergroup/viewtopic.php?t=1511
http://www.mjtnet.com/usergroup/viewtopic.php?t=1461

However, this approach requires a fair amount of coding and, for complex IE scripting, a good understanding of the Document Object Model. That’s why we developed WebRecorder. WebRecorder is like a tabbed browser. As you surf WebRecorder watches what you click on and monitors form field entries and builds a script as you go. When you’re done you simply run the script in Macro Scheduler and the activity is played back. WebRecorder cuts out any need for coding and also copes better with nested frames where VBScript fails due to site scripting security limitations.

Macro Scheduler has supported VBScript, and therefore the ability to automate IE and do things like wait for pages to finish loading, and click on tags etc, since 1998. WebRecorder was introduced in 2004. As much as I hate to admit it there are other products out there that do similar things. So imagine how shocked I was the other day when I stumbled across a website for another macro product that claimed it had unique internet functionality that no other software had. It claims that it is the only macro product that can wait for a page to finish loading! That’s a pretty bold statement to make, and quite clearly untrue. I’m not even sure if that’s legal. If nothing else it is misleading and unhelpful.

I’ve always done my very best to make sure we can back up any of our marketing material. I do not believe in making claims that can’t be supported. At MJT we try our best to respond to queries as honestly and helpfully as possible and have been known to suggest an alternative product if we think ours isn’t suited to the customer’s needs exactly. So I was quite surprised to see a competitor making such blatently false statements. But I don’t see it doing them any favours. Software buyers are pretty savvy people these days and will see through hype like that. I hope.

December 29, 2005

Automated Software Testing

Filed under: Automation, Testing — Tags: — Marcus Tettmar @ 4:36 pm

People have been using Macro Scheduler for Automated Software Testing and Load Testing for years. I’ve often been asked the best way to do this, and I’ve finally gotten around to putting some articles together on how best to use Macro Scheduler for automated testing. You’ll find them here:
http://www.mjtnet.com/automated_testing.htm

Automated Software Testing:
http://www.mjtnet.com/AutomatedTesting.pdf

Automated Load Testing:
http://www.mjtnet.com/loadtesting.pdf