titaniumbunker.com

Evil geniuses and world domination are 2 of our goals... we also like Dr Who

AWTomation Update

no comment

You may remember in a previous post, that I was looking at an automation system for an internal application.  Today I stumbled across the the Java robot class.  It is described in the help page as

This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed.

So this seems like it might be a contender until I read this blog post.

We have found that this approach is dangerous.

  • Robot tests are very fragile, breaking any time the GUI layout changes.
  • If the user moves the mouse while the tests are running, the Robot continues clicking, sometimes on the wrong application.[11]

[11] One programmer reported that the Robot sent a partially completed email because it clicked on the send button of the mail client instead of a button in the application being tested.

  • Since the tests run so quickly, it can be impossible to stop the tests once the Robot gets confused and starts clicking on other apps and typing characters that show up in other windows.

If you really feel that you could use some Robot tests, consider naming them differently than other tests. You might have a collection of RobotTest*.java tests. You can then run them independently of other tests, if you are extremely careful to avoid touching the mouse while the tests run.

So based on that I think I’m going to stick with my reflection based library.

AWTomation Service

1 comment

Regular readers of the site might notice that I keep almost deliberately tight-lipped about where I work for real.  That’s right dear reader – Although we live in the bunker – it ultimately doesn’t really pay the bills.  Nope, to do that we engage ourselves within various industries.

 

I’ve always been a little cagey about talking about employers, and I sort of feel that Titanium Bunker is my thing, and I don’t want to muddy the waters between a ‘professional’ career, and the funny little projects I work on at home.

But I’ve recently been working on a project for my employer that I find personally interesting, and thought I’d write about it here.   Now – to clarify : My employer has not asked me to work on this directly, rather this is a project that I am working on because I think that it will ultimately add value to the business, and it’s also an interesting problem to solve.

So here’s that problem.


Read more..

Categories

Archives

Tags