What scripting tool can I use for automated testing of Delphi programs? [closed]

試著忘記壹切 提交于 2019-12-22 04:13:12

问题


I'm looking for a tool for automated testing. I will use scripting for testing, rather than just automating, which means that it can't just send some key-presses. It needs to examine the app's window to see if it was updated correctly. The cheaper the better, with no downside limit on cost. ;-)

I need a real language, with functions, variables, loops, branching, etc., and the apps are developed in Delphi.

I need to be able to focus controls*, wait for windows to appear, search for controls/windows, send keyboard input and check that various windows/controls have changed state (e.g a button is now disabled, a text box contains the correct text, a dialog box opens, etc.).

I used to use AutoIt a few years ago and am now coming back to scripting. I wondered if there has been any new development while I was gone.

Any suggestions?

* I do not want to move the cursor to absolute coordinates in case the app's layout changes. This quote from Wikipedia explains why:

Regression testing becomes a problem with GUIs as well. This is because the GUI may change significantly across versions of the application, even though the underlying application may not. A test designed to follow a certain path through the GUI may not be able to follow that path since a button, menu item, or dialog may have changed location or appearance.


回答1:


Autoit does everything you listed. I use it for the same porpoises all the time. Also, Delphi is good in the sense that uses standard windows controls which makes it very easy to hook into.




回答2:


I believe you just described TestComplete by SmartBear Software.




回答3:


I've had some success with sikuli, which has the advantage of being python (jython) code. It is built on top of OpenCV, and uses a full image processing engine to pattern match parts of the screen. It also contains editors and functions for screenshots, waiting on changes, as well as keystroke and mouse injection.




回答4:


Something different from my other answer: PyWinAuto

It has full scripting (because it's Python), it uses control names instead of X, Y coordinates, it waits for windows and you can send keypresses. And it's free.

The downsides should be obvious :)




回答5:


To automate a delphi application main problem i found was that the any testing tools (QTP with delphi addon , Test Complete , Testanywhere, autoit, sikuli) they all dont detect any Tlabels and Tlist and and other components, which for an application build in delphi forms a prominent part of the UI. Even to do func based testing we need to ultimately examine a component in the front end to see whether a func is giving right out. Even to right a script to automate we need to first be able to detect and add the object to the repository.

We have an application in which we have heavy dependency on a lot of third party components. I have tried to check feasibility with almost all the tools available in market. The top two tools in market were of no use.

  1. QTP with Delphi addon is of no use even in there website they have openly mentioned it wont support many classes build in delphi.

  2. TestComplete its better than QTP where in it detects many components menu components and if i remember correctly grid etc.

Then after few googling i found

  1. TestAnywhere which was certainly better in detecting the thirdparty build components. Only problem i found with this was that it was not detecting Tlabel classes and some components dont remember which.

When i speak of detecting components it may be partial or fully ie some tools were able to detect that there is a component at XY co-ordinates but failed to get the component classes or details (like components property name etc) without which it was difficult in automating and writing a script.

Rest all was more or less combination or subset of these above there.

Still Searching !!!!!!!!!!!




回答6:


With TestComplete, if you compile your app as an open app - i.e. include their libs, it makes your app super inspectable. Great for testing, probably not best for security. Test complete was the best, it is just TOOOO expensive for my budget.

The scripting in it is great, the understanding of Delphi is great. The pricetag is just not great, especially if you are trying to get traction for GUI testing within an org, like it sounds like you are.



来源:https://stackoverflow.com/questions/7863869/what-scripting-tool-can-i-use-for-automated-testing-of-delphi-programs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!