Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing a form tester.
Message
From
26/06/2006 15:41:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Writing a form tester.
Miscellaneous
Thread ID:
01131812
Message ID:
01131812
Views:
62
I have started working on a program to go through the forms in my project and quickly run them one by one, as a test. I made some class changes and I want to look for anything unusual. Below is my first try at this. It's adapted from another one I use to clear object code out of forms.

Some of my forms abort themselves by returning .F. in the load method or the Init method if certain conditions are not met. That is by design, however if that happens this harness program stops on READ EVENTS and waits for something to happen. I guess I don't know how to make it keep going.
*run each of the forms for icgoil project.
Close Tables All
Close Databases All
Clear All
Release All
Set Classlib To
Public nCount, cFile, cFile2, cSrch
Clear
Cd c:\Development\icgoil\Forms
nCount = Adir(MyArray, '*.scx')
If nCount > 0
	For i = 1 To nCount
		Cd c:\Development\icgoil\Forms
		cFile = Juststem(Alltrim(MyArray(i,1)))
		?cFile
		cFile2 = cFile+'.scx'
		If File(cFile2)
		TRY 
			Wait "processing ..."+' - ' +cFile Window Nowait
 			DO FORM &cFile
			READ EVENTS

		CATCH TO oException
		DEBUG 
		SUSPEND 
		ENDTRY 
		CLEAR EVENTS 
		Endif
	Endfor
Endif
	

Use

Close Databases All
Close Tables All
Set Classlib To
Clear All
Release All
Jim Newsom
IT Director, ICG Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform