GUI vs commands for testing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GUI vs commands for testing

Luc J. Bourhis
Hi,

the GUI elements corresponding to the commands listed in section "20.4 Unit Testing" of the documentation are, I think, as follow:

debug-all-tests(): Menu Bar Item "Debug All Tests"
debug-clicked-tests(): ?????
debug-current-tests(): Menu Bar Item "Debug Tests at Cursor"
debug-failed-tests(): Menu Bar Item "Debug Failed Tests"
debug-last-tests(): Menu Bar Item "Debug Tests Again"
debug-selected-tests(): Button "Debug Tests" in Testing Panel.
debug-test-files(loc=None): Menu Bar Item "Debug Tests in Current File"
 
Is that correct? About the last one, "debug-test-files(loc)", it does not get listed when executing "Command by Name", so I'm unsure.
And then what about debug-clicked-tests()? I can't quite figure out what it does from the documentation, and it is not listed by "Command by Name" either.
By the by, there is a "c" missing in the documentation of that "debug-clicked-tests()".

Finally, is there a way to determine which command correspond to a GUI element in general?

Best wishes,

Luc J. Bourhis

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: GUI vs commands for testing

Wing IDE Support
On 5/17/13 8:46 PM, Luc Bourhis wrote:
> Is that correct? About the last one, "debug-test-files(loc)", it does not get listed when executing "Command by Name", so I'm unsure.

The debug-test-files is only listed if the active file is a test file.

> And then what about debug-clicked-tests()? I can't quite figure out what it does from the documentation, and it is not listed by "Command by Name" either.

The debug-clicked-tests command is essentially an internal command used
for the editor context menu in Wing 5, which has a Debug Test item if
the file is a test file.  I call it an internal command because is isn't
very useful except for responding to mouse clicks.

> Finally, is there a way to determine which command correspond to a GUI element in general?

In general, there isn't because there isn't necessarily a one-to-one
correspondence between commands and GUI elements.  A lot of menu items
are implemented as commands, but not all are.  There are also commands
that aren't directed associated with any GUI element.

Cheers,

John
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide