Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I need to develop a Windows desktop application (win32 API) which will use drag & drop extensively in many formats, including my own. I need to test it, for example, with CF_TEXT dragging, CF_RTF, CF_DIB, CF_METAFILEPICT, and many others.

The tool needs to have the following features:

  1. Displaying the content of DataObject dragged into it with all available format viewers.
  2. Allows preparation of a few samples of different clipboard formats together in a single DataObject, ready for dragging into my app.
  3. Allows including my own format names into the formats list of the testing tool.
share|improve this question
    
what programming language are you using? –  Smith Apr 21 '11 at 8:05
    
@Smith: С++ and Delphi –  Andrew Apr 21 '11 at 8:12
    
If you are a MSFT shop, then there are a couple of GUI automation options available with VS2010. –  Job Sep 18 '11 at 15:24
add comment

3 Answers

I've had some experience writing automated tests for windows GUI application which used drag & drop.

At first we've tried TestComplete but quickly outgrew it both feature and performance wise as the testing project became unmanageable with constantly increasing complexity.

Then we've developed an application plugin intended specifically for testing (capturing and reporting state in convenient way) and doing keyboard/mouse emulation. This worked well for simple cases (table-like windows, trivial use cases) but for complex interface elements test code became quite messy.

So, we've directed our efforts to developing a thin layer abstracting the GUI with comprehensive integration test suite utilizing it and leaved mouse dragging to humans. Considering value/effort ratio this approach turned out as the best.

To sum this up, I suggest to avoid solutions which try to emulate humans (sending mouse/key events, clicking buttons, etc.) at all costs.

P.S. Just some personal experience which may be useful. YMMV.

share|improve this answer
add comment

I am not confident on my answer, I want to help. I've seen a video from Roy Oshehove, and the tools here: http://www.typemock.com/. In one of the presentations, he build a test by doing a file operation and collecting all API calls to kernel/ui etc. After they got dumped, they could be scripted at will.

I am an CLI/web "person" and have no experience in that area

share|improve this answer
add comment

Rational Test Suite combined with Rational Robot can do this, but may be overkill for the scope you define. A simple alternative would be to extend a test tool that does not have these features specifically with external scripts written in something like AutoIt and capture the formatted log/console output back into your testing software.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.