Test automation tool/libraries/framework for C++ GUI desktop windows apps

11,990

Solution 1

Open Source Tools

White is a .NET based UI automation tool that can automate win32 applications among others types. As long as the controls used in your app expose their content/behaviour using Windows' standard UIAutomation hooks then you should be able to use it to do what you need.

UIAutomation Verify is another CodePlex project that works with the same APIs to automate UIA compliant UIs.

Visual Studio

Finally if you have access to it then Visual Studio 2010 has scripted UI test functionality built in Premium/Ultimate editions - Coded UI Tests. This supports .NET, native and web applications with record/replay and scripting functionality.

Solution 2

We use Sikuli and have been quite happy with it. It works outside of the various automation APIs so it handles non-standard UIs very well.

Solution 3

I agree with Robert that QTP is sometimes not the best tool, especially when you want it to wait for the desktop application to finish its processing. QTP commands are not synchronous, meaning that QTP does not wait until the previous command finishes execution before moving to the next call. We had a lot of issues with this. We are now planning to write a c# dll that can do this for QTP and include that in our QTP programs to make QTP to dynamically wait until the Desktop application finishes its processing. Currently, to my knowledge, no such wait functionality is supported by QTP.

Also, coming back to the object recognition issue, We did have a lot of issue with this and took the alternative route of invoking commands using Mnemonics through keystrokes in QTP. As Simon has already mentioned, this could be due to non-exposure of the GUI elements. We did not have much control in this regard and so we did not investigate further on this.

Share:
11,990

Related videos on Youtube

Robert
Author by

Robert

Updated on May 31, 2022

Comments

  • Robert
    Robert about 2 years

    unfortunatelly I have a GUI desktop application running on Windows and compiled using Borland C++ compiler. I know it's a very old technology, but that's the life. The company I work for have lots of free licences for QTP. But to be honest I don't like this tool and I want to change it with some open source alternative.

    I have an experiance with automation Web services using Selenium, and some java swing applets. I created my tests based on Java/JUnit. I'm wondering if I can create some tests in Java to test my C++ application - that would be great. If that's not possible if I can use any C/C++ libraries to create my own test framework.

    That shouldn't be unit tests. I want to create rather a suite of functional tests. I want to be able to localize objects like buttons, tables, cells, etc., perform action like clicking, changing focus, etc.

    In addition I have access to source. But this is rather an old spaghetti code and I don't have much experiance with C++ apps.

    What do you suggest?

  • Robert
    Robert about 13 years
    I'll look for a White/UIAutomation Verify soon. But can you refer any java libraries to test c++ apps?
  • Simon Steele
    Simon Steele about 13 years
    @Robert Sorry, I haven't used/heard of any Java based tools for testing Win32 applications.
  • Robert
    Robert about 13 years
    Someone already started automation with QTP, but there is a problem with recognizing the objects in this tool, there are lots of hacks, performance and unstability problems. I don't like QTP's IDE and VBS. I prefer rather rather java code, because we have objective language, I had some experianced with it and it's not a problem to join another libs.
  • Robert
    Robert about 13 years
    I don't think my company will pay for another commercial tool so I'll rather choose open source libraries.
  • neuro
    neuro about 13 years
    +1: excellent !!! I've dreamed for a long time of such a tool ^^ The MIT done it !!!
  • Robert
    Robert about 13 years
    Sikuli looks nice but there are two problems: 1) After I try to find an object or create a region ide minimalize and I can't do anything. Am I doing something wrong? 2) Second problem is that I was expecting rather something else. I want to programm tests rather than click on graphics. I was trying to bind sikuli with java but the documentation is pure in my opinion and I don't know how to e.g. find a editable text field next to lable Username or button with label, etc. etc. Is it possible with Sikuli?
  • Yauheni Sivukha
    Yauheni Sivukha about 10 years
    Here is the example of automating windows Notepad with White: github.com/slmoloch/Notepad.TestSuite
  • Robert
    Robert about 9 years
    I don't work in this project any more, but I remember that .NET/White/UI Automation did the job. We had some custom controls we were not able to easily automate. Some hacks were necessary in the original code. Also we had to simulate some system calls in order to trigger some actions in GUI.