2

I've been thinking about acceptance testing and would like to gain a clearer understanding of how it can be automated (and fitted into a Continuous Delivery pipeline, for example). I have a desktop application written in Java, a messenger application. If I want to automate acceptance tests, how do I go about it? Here is an example manual test: "User A is messaging user B when the server crashes. Switching to a failover server, verify that the chat can be resumed where it left off and all chat functionality still works as expected in the client"

Can JUnit be used for automated acceptance and system testing like this? I've also heard of Selenium but I gathered it was only for web applications?

I understand the concept of unit testing with JUnit, but I'm lost as to how higher level testing of a desktop application's functionality can be automated. Some tests may involve interaction with the GUI, like sending messages to other clients, but others will involve server-side stuff like server crashes and so on. I've been thinking that it's probably possible to do this using JUnit and the application's code, maybe with some scripting involved (Perl, Ruby etc.) to launch the tests?

Amoeba
  • 1,573
  • 4
  • 19
  • 25
  • This could be hard. You can automate windows applications in a n umber of ways. From something like free like AutoIt, to full on and expensive test automation suites. Having said that, I'd hope for my unit tests to cover all the scenario you described. – Tony Hopkinson Jan 17 '14 at 21:12

1 Answers1

2

There are several software solutions that come at a cost for this. Some serious ones are QTP (now UFT), TestComplete, Ranorex, SilkTest. They should all have trial software available. If the Java application was written in Swing/AWT, Jemmy may be worth checking out. As Tony Hopkinson mentioned, AutoIt may fit, and is very fast to use. Selenium is great, but is only for web testing as far as I know. Automating a UI is very important for automated testing and complements acceptance testing because of its interaction with the end-user. Unit tests overlap a lot, and may cover functional integrations depending on how you organize them and have enough of them, but they are two different approaches with two different purposes.

Also, if you were using Swing, found this thread which may help: http://www.coderanch.com/t/96035/Testing/Automated-Swing-Testing

user176692
  • 780
  • 1
  • 6
  • 21