Spec UI are reasonably testable as well, this tutorial contains a sub section 
doing just that:

  
https://medium.com/@svenvc/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999

But testing dialogs is indeed a challenge ;-)

On 30 Sep 2014, at 11:32, Usman Bhatti <usman.bha...@gmail.com> wrote:

> Tx Marcus.
> I'll have a look at what this infrastructure already offers to see if I can 
> use it directly or with some enhancements.
> 
> usman
> 
> On Tue, Sep 30, 2014 at 11:22 AM, Marcus Denker <marcus.den...@inria.fr> 
> wrote:
> 
> On 30 Sep 2014, at 11:00, Usman Bhatti <usman.bha...@gmail.com> wrote:
> 
> > Hi all,
> >
> > Is there anything in Pharo that supports UI testing?
> > What I would like to achieve is to be able to simulate a click, select a 
> > menu item, input some text in text fields, Ok/Cancel button click, and some 
> > other basic task for the automation of my tests.
> >
> > With Glamour, I can simulate transmissions programatically and then test 
> > for the display values in the presentations or dig the resulting morph 
> > structure to test for specific information. The problem with dialog boxes 
> > is that once launched, I cannot perform anything in the system because my 
> > test code is active only when dialog boxes get their intended input and are 
> > validated.
> >
> > So, if there is anything for simulating testing "scenarios" (click on 
> > second button -> select third menu item -> fill up text field -> select 
> > color -> ok button -> test fourth PanelMorph in the window ), it would be 
> > really helpful and make my testing much more productive.
> >
> 
> There is UITestCase (see the subclasses), e.g.
> 
> testSimulateClick
>         "self run: #testSimulateClick"
> 
>         morph := TextMorph new contents: ''; openInWorld.
>         morph simulateClick.
>         self assert: morph hasKeyboardFocus.
> 
> 
> But it definitely needs more e.g. for pressing buttons and things like that.
> 
>         Marcus
> 


Reply via email to