• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1001
  • Last Modified:

Is there a good automation tool available for code written in FoxPro

A few years ago I was challenged to automate a FoxPro application.  It was a real cluster****; I spent more time working around low-level objects than the testing would have been worth.  I have been asked to consult on a similar project.  Does anyone have experience with a tool which handles FoxPro low-level objects correctly?
0
jamiemi1
Asked:
jamiemi1
  • 4
  • 3
  • 2
  • +2
2 Solutions
 
pcelbaCommented:
I don't know what you mean by "FoxPro low-level objects" but Visual FoxPro itself is the best tool you can use to create data processing automation servers.

Simply create a set of classes having OLEPUBLIC property and call these classes from other Windows tools.

An example of FoxPro Automation server is here: http://fox.wikis.com/wc.dll?Wiki~FoxOLEAutomationExample
and also here: http://msdn.microsoft.com/en-us/library/aa975573(VS.71).aspx
and here is the whole article: http://members.cox.net/claude.fox/
0
 
JF0Commented:
This is one of the most important threads I started here and it has got me so far in automating foxpro tasks: http://www.experts-exchange.com/Microsoft/Applications/FoxPro/Q_21554922.html 
0
 
jamiemi1Author Commented:
Let me clarify.  By automation, I mean test automation.  Not necessarily record / playback, but a test automation tool which can communicate with the low-level FoxPro objects.  It must be able to discern what a GUI object is (visibility) and have the ability of sending it instructions.  For example, it must be able to recognize common GUI objects (edit, combo, list, tree, etc.) and be able to play back instructions (type into edit, select from combo or list.)  The idea is to allow a tester to create scripts which mimic human behavior against the GUI.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Olaf DoschkeSoftware DeveloperCommented:
It's not that every foxpro app is OLE automatable. But your clarification makes me think in the direction of a tool like Fox Runner (http://fox.wikis.com/wc.dll?Wiki~FoxRunner). Never used it myself, though. It's simpler to do programmatic testing of non gui classes the unit test style (there is FoxUnit available), which surely is only an option, if you have source code. We do human testing of the application on top of that.

Bye, Olaf.



0
 
CaptainCyrilCommented:
I have written many automation tools in VFP/FoxPro for Excel, PowerPoint and Word.

I have also written many time calculations, clicks, crash tests of websites in VFP. I open hundreds of WebBrowser controls simultaneously and launch the application and login as different users and run stuff on the web calculation and test how long it takes. There are many applications written in Python that work on FireFox but I chose to do it in VFP since the things I could do in VFP is just beyond any other language.

I have not seen any tool better than FoxPro. The thing is you have to have a good knowledge of FoxPro.
0
 
pcelbaCommented:
Yes, the FoxRunner should do the job.

A free option is to record key sequences in VFP application and execute them as keyboard macros. See PLAY MACRO command in VFP help for more details.
0
 
Olaf DoschkeSoftware DeveloperCommented:
It depends on the availability of the application source code. If you only have the EXE and your job is to programmatically test this EXE you can simulate mouse clicks and use Windows API functions like Sendkey() or Windows Sendmessage API to send keystrokes to foxpro forms, which are normal winforms with a HWND window handle.

But you will not be able to adress the inner form object structure, unless the application developer offers OLE public classes for automation.

Bye, Olaf.

0
 
jamiemi1Author Commented:
There seems to be a lack of understanding as to what constitutes test automation.
0
 
Olaf DoschkeSoftware DeveloperCommented:
Test automation is not main expertise, but I know what it is. Nevertheless I don't understand what you mean by "handles FoxPro low-level objects correctly".

From another process (test automating application like Foxrunner) you can't get at the running foxpro objects. It's not working like with ActiveX controls, which you can attach to from the outside eg via their HWND.

Could you perhaps name a tool you use normally?

Bye, Olaf.
0
 
jamiemi1Author Commented:
WinRunner, QuickTestPro, Seque Silk, QARun, Test Partner, etc.
0
 
Olaf DoschkeSoftware DeveloperCommented:
OK, in the german wikipeadia entry on WinRunner for example I see it supports a) recording of mouse movements, clicks etc. That mode would also work with a foxpro application. But it also supports a context sensitive recording. Eg it can record the test user clicked a button with a certain name and no matter if that button is repositioned in a new applcation release version the recorded test script would be able to click that button again.

Is that what you mean?

For such a feature to work an application must use specific windows forms controls that can be inspected from an outside process like the test tool is towards any application.

Foxpro has it's own set of controls. It is written in C++, so indeed the foxpro controls are based on the same controls any c++ app would use, but they are unique anyway. To support data binding in foxpros sepcial way foxpro has control properties or fields unique to it. Also vfp is drawing it's controls itself. Since vfp7 it's using gdiplus for drawing, but it still does so and so an external app will not see the typical textbox or command button objects for such context sensitive recording of application usage.

The only language that might attach to the control objects of a seperate foxpro application process would be foxpro, so FoxRunner is the only candidate.

As I already said I haven't used that tool. I downloaded the manual from http://www.cal.de/e/prod_foxrunner4.html and checked the installation and usage sections. It works from inside, so it needs to be integrated into the application you want to test. That's what I suspected, you can't attach to the objects from outside the foxpro process.

Bye, Olaf.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now