|
From: Johannes N. <joh...@gm...> - 2008-08-04 09:55:41
|
visual testing is a road you don't want to go down. I would recomend reading about the presentation model pattern as it gives a nice abstraction to test from our experience On Mon, Aug 4, 2008 at 11:53 AM, Ian Tyrrell <Ia...@mo...> wrote: > Are you wanting to test a custom visual component, or is it that your > class under test uses a visual component? > > If you give me a bit more context then I could probably put together an > example. > > > > It's important to understand that ASUnit is a unit testing framework, not > an integration testing framework. > > It is designed to help verify behavior of a single unit of functionality in > your application, typically at single class/method level. > > > > It's not really appropriate if you want to test the end-to-end > functionality of your application. > > > > If you want to verify that when a user clicks a button a request is made to > the server, this would be an integration test. > > > > You could however write several unit tests that cover the individual > components involved in the above scenario: > > · A test to verify that when a user clicks your button class a > click event is dispatched. > > · A test to verify that the consumer of your button event performs > a particular action (e.g. invoking a service). > > · A test to verify that a particular service call makes a request > with particular parameters. > > > > Testing visual components has it's own challenges as you are usually bound > to concrete dependencies (flash core classes, library assets), flash 8 made > it more feasible technically to verify visual states (using BitmapData) but > I would be very clear about what I'm wanting to test and whether ASUnit can > actually help me achieve this. > > > > I'm happy to help you with a specific example, but it's a bit difficult to > give you an abstract example that would actually be useful. > > > > Thanks, > > > > Ian > ------------------------------ > > *From:* asu...@li... [mailto: > asu...@li...] *On Behalf Of *Uno Dos > *Sent:* 03 August 2008 17:55 > *To:* Mailing List for the users of AsUnit > *Subject:* Re: [Asunit-users] Testing Event Driven Architecture > > > > I am in the same boat as Mudit - but am sure once I see a working example > of unit testing on a traditional component (i.e. a SimpleButton) that > changes a state or a value when pressed, and then changes it back when > pressed again - this will give me something to work with. > > Uno > > 2008/7/23 Ian Tyrrell <Ia...@mo...> > > Hi Mudit, > > Do you have an example of what you're trying to test? > > The ease of testing will be based on how interdependent the components > of your architecture are. You should be aiming to reduce dependency on > concrete implementations (using interfaces and abstract classes). > > If you are happy to post an example of what you're having difficulty > with, I can try to help. > > Thanks, > > Ian > > > -----Original Message----- > From: asu...@li... > [mailto:asu...@li...] On Behalf Of mudit > tuli > Sent: 23 July 2008 05:26 > To: asu...@li... > Subject: [Asunit-users] Testing Event Driven Architecture > > I am new to AsUnit, and I followed few tutorials on how to unit test. > But I am somewhat confused on how to unit test with AsUnit an Event > based architecture ! > > ------------------------------------------------------------------------ > - > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > > -- j:pn \\no comment |