Assertions

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

Assertions

Postby peter.pfeifer » Thu Jan 28, 2010 5:36 am

Hello there,

I'm just investigating the WindowTester. And I after playing around for a while a question regardind the "Inspector" came to my mind.

Wouldn't it be possible to inspect and add assertions based on the properties of the underlying widget? E.g using the Inspector on a text control the Isnpector should show up with possible choices like:

[] hasLength
[] hasText
[] ...

For a grid it should show up with e.g:
[] hasRecordCount

CellItem of a grid (n,m):
[] hasValue
[] isEnabled (in inline editing mode)
[] isDisabled (in inline editing mode)

Wouldn't you think extending the inspector would be quite handy, in order to reduce the amount of manually added assertions?

Is it possible to contribute own Conditions via ExtensionsPoints?

Regards,

Peter
peter.pfeifer
 
Posts: 2
Joined: Thu Jan 28, 2010 5:26 am

Re: Assertions

Postby Phil Quitslund » Thu Jan 28, 2010 10:01 am

Hi Peter,

Great questions.

First, you asked
Wouldn't it be possible to inspect and add assertions based on the properties of the underlying widget?


and this is almost what we do. Instead we surface all the assertable properties of the associated widget locator. We have tried to support the interesting properties of the widgets in their locators, but clearly there are some we've missed. If you can enumerate the ones that matter for you, we'll be happy to investigate implementing condition factories for them. Incidentally, while you're exploring conditions, you might find this doc to be a good jumping off point:

http://downloads.instantiations.com/WindowTesterDoc/integration/latest/docs/html/reference/conditions.html

Next you asked
Is it possible to contribute own Conditions via ExtensionsPoints?


and at the moment there is no way to plug in your one condition factories. As a general rule, we would like to support all the interesting ones in a first class way since what interests you will likely interest someone else. Let us know what's missing and we can see about adding support in. If this is not feasible, let's explore a plug-in story next.

Thanks for the inquiries!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Assertions

Postby peter.pfeifer » Thu Jan 28, 2010 10:05 pm

Hello Phil.

Your quote
Instead we surface all the assertable properties of the associated widget locator


leads me to anaother question, perhaps a more detailed one.

Since we are heavily using the nebula grid it would be nice for us to inspect values of certain cells or even the item count (record count as we call it) of the grid at all. E.g. we are trying to add a new record, save it, refresh/requery the content of the grid and then check if the recordcount has got a certain value. Would this be possible, if we associate the nebula grid with a specific widget locator. If so, could you please point me to a snippet which shows me how to implement and associate such a widget locator?

Regards,

Peter
peter.pfeifer
 
Posts: 2
Joined: Thu Jan 28, 2010 5:26 am

Re: Assertions

Postby Phil Quitslund » Fri Jan 29, 2010 9:59 am

Hi Peter,

Here's a document on putting together custom widget locators:

http://downloads.instantiations.com/WindowTesterDoc/integration/latest/docs/html/programmer/core/Creating%20a%20Custom%20Locator.html

At this time there is not a way to contribute locators to our recorder story but this describes the runtime piece.

If you start to go down this path and hit snags, please let us know and we'll be happy to help!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest