I saw this post earlier today and gave it some thought. It’s the kind of automation challenge that gives you pause. I have some thoughts on this, and provide a recommendation.
There are always two questions in software development (that’s what automation is – software development).
- Can we?
- Should we?
The answer to the first question is usually yes. We can do just about anything in software (that’s why we must test – because we can do anything in software). The second question is much more important.
In my opinion, there might be a few information objectives but verifying drag and drop would not be high on my list. Indeed, I may not even decide to automate it. From the description, the drag and drop is a means to an end. It is a method to deliver the business value of the application.
Let’s say the application is used to create flow charts, or a living room layout or a swim lane diagram. These are the business intents and this is where I’m expected to invest my testing resources. Regardless of how components are placed on to the drawing panel, my information objectives might be, in my opinion, to verify that the drawing panel saves correctly, or to verify that it is recalled and rendered faithfully, to verify the application on multiple screen sizes, or secondary features operate correctly (a secondary feature might be to calculate the area of the living room layout).
In my opinion, the solution is not one to demonstrate how well we can use technology to exercise an application. I have seen thousands of hours wasted on those kinds of solutions. The solution might be the answer to the second question. The answer might come to light when we collaborate with our project team and our business team members to learn about their concerns.
Should we pursue a cool technical solution that provides some information about the product? Or, should we investigate business intent, business concerns, testing objectives, and collaborate on an automated solution?
My recommendation is to dispense with a search to automate drag and drop. In my opinion, what is really needed is a method to create the component and place it on the drawing panel. The drawing panel shouldn’t care how a component arrives, and the drag and drop can be exercised by a handful of manual tests.