views:

84

answers:

2

Title says it all. It appears to be extremely difficult to design a generic test harness for Pro Series because of the way forms are invoked, etc.

The problem I face is that while I can invoke each form, and the logic for the form is (generally speaking) logically separated in a different class, there is to my knowledge no way at this time to simulate input into the fields of the form. In other words, you can invoke the various methods that make up the business logic in the "cmpmyformnamefs" object, but you can't open up the form, feed it input events, and trace the outcome.

  1. Are there any FoxPro programmers out there that have done unit tests on class libraries?
  2. Same question as in (1), but this time, class libraries that happen to be MDI forms?
  3. Is there a generic test harness you can recommend that allows me to load classes and start calling them?

Just how do you do it?

+1  A: 

I used to specialize in SBT/ACCPAC and the Pro Series, customization and support. They have such a cluster-#@J*() of code, classes, derivations it IS quite difficult to understand just the elements itself, let alone forcing a script to force going through.

I still have contact with a prior client running ACCPAC/Pro Series and will see if they will allow me in to see if I can come up with SOME solution, but otherwise, I wouldn't plan on it...

DRapp
"They have such a cluster-#@J*() of code, classes, derivations it IS quite difficult to understand just the elements itself, let alone forcing a script to force going through." - and here I was beginning to believe that 'everyone else' was right when they said "you're just doing it wrong" and other baloney. ;) Hard to explain just how BIG that cluster is to other people who are used to code check-ins and unit tests, when I live with manual patches done with *file copies*.
Avery Payne
+3  A: 

Unit testing of business logic and business objects in class libraries can be done with FoxUnit (from Visionpace). It is free too. The download is available from http://www.foxunit.org/Default.aspx?tabid=24

As for testing the user interface, this has always been a challenge for FoxPro developers and the apps they generate. Microsoft created a test harness that is available with the product, but it was extremely buggy and unreliable. One of the OS updates also broke it if I am recalling my history correctly.

There is a third-party product called FoxRunner. I personally have not used it, but it might be something for you to look into. Maybe one of their sales or support people know developers with experience testing out SBT/Accpac. It is a commercial product that runs 449 (not sure if US Dollars or Euros). http://www.cal.de/e/prod_foxrunner1.html

Rick Schummer