Thread: [Java-gnome-developer] java-gnome and 'acceptance tests'
Brought to you by:
afcowie
From: Sean C. <exc...@gm...> - 2005-02-13 02:19:29
|
Hey there, I'm working on a project called JetGet, a download manager written in java-gnome. I recently added a link to it on the java-gnome screenshots page. My post now, is to let you know I've an AT (acceptance test) framework in place for java-gnome in JetGet. AT's are executable text documents that specify the funcionality of a program, and can be written by customers, designers, testers or indeed nearly anybody because they are written in almost plain english. My framework interprets the document and creates a junit test suite which either passes or fails depending on wheither the AT passes or fails. (so integration with eclipse/intellij etc.. is very nice) So, for example... take this application: http://www.thecentric.com/images/jetget4.png This AT successfully passes for this application: TestTableIsEmpty downloadTable true UserSelectsMenuItem mnuNewDownload UserInputsText txtUrl http://www.thecentric.com/ UserInputsText txtSaveAs /home/sean/thecentric.index.html UserClicksButton btnOkButton TestTableIsEmpty downloadTable false TestTableRowItem downloadTable 0 "/home/sean/thecentric.index.html" "http://www.thecentric.com/" "5 K" "0.0%" The AT syntax is generally VERB CONTROLNAME PARAMETERS... This has many advantages over simply 'unit testing'. In commercial applications it lets you potentially put the owness on the customer to specify required functionality through AT's. It also gives you a one button click platform testing and regression testing. Anyone think this may be useful to them? Cheers Sean |
From: Mark H. <mh...@ti...> - 2005-02-13 10:32:46
|
It's not useful for any of the projects I'm working on now, but I can see how many people would find this useful. However, it would be even better if you had a ui for writing the tests. The ui application could load a glade xml file, find all the widgets in it and add click event handlers. Then you would click on a widget and see a window with appropriate actions for that control (e.g. user enters text for text boxes). This way you don't have to remember the widget names or syntax of the test files. -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... |
From: Sean C. <exc...@gm...> - 2005-02-13 16:17:51
|
Hey Mark, I've kinda just implemented what you suggested, I've a 'developer' system property which can be true or false. If it's true it will output your actions in a session to an acceptance test file. I've got the action orientated commands like UserSelectsMenuItem, UserInputsText, UserClicksButton etc... working. However I've no way yet to insert the Test commands, that will probably need a UI. Obviously this makes writing AT's for regression testing, or writing AT's to test existing functionality easier. However ideally, I see the AT's being written up front and the development being acceptance test driven. You know your finished when the AT passes. Great idea though, thanks. Sean On Sun, 13 Feb 2005 10:32:12 +0000, Mark Howard <mh...@ti...> wrote: > It's not useful for any of the projects I'm working on now, but I can see how > many people would find this useful. However, it would be even better if you had > a ui for writing the tests. > > The ui application could load a glade xml file, find all the widgets in it and > add click event handlers. Then you would click on a widget and see a window with > appropriate actions for that control (e.g. user enters text for text boxes). > > This way you don't have to remember the widget names or syntax of the test > files. > > -- > .''`. Mark Howard > : :' : > `. `' http://www.tildemh.com > `- mh...@de... | mh...@ti... > |
From: Jeff M. <ku...@gm...> - 2005-02-13 13:30:16
|
On Sun, 13 Feb 2005 02:19:25 +0000, Sean Coughlan <exc...@gm...> wrote: > Hey there, > > I'm working on a project called JetGet, a download manager written in > java-gnome. I recently added a link to it on the java-gnome > screenshots page. I saw the screenshot. It looks quite nice! > My post now, is to let you know I've an AT (acceptance test) framework > in place for java-gnome in JetGet. > > AT's are executable text documents that specify the funcionality of a > program, and can be written by customers, designers, testers or indeed > nearly anybody because they are written in almost plain english. > > My framework interprets the document and creates a junit test suite > which either passes or fails depending on wheither the AT passes or > fails. (so integration with eclipse/intellij etc.. is very nice) Is this based on fit? I have read a little about fit and it sounds quite similar. -- Jeffrey Morgan "The highest reward for a man's toil is not what he gets for it, but what he becomes by it" - Jon Ruskin |
From: Sean C. <exc...@gm...> - 2005-02-13 16:31:36
|
I looked at FIT before doing this and ended up using something called exactor instead: http://exactor.sourceforge.net/ It provided the framework and was very easier to integrate into my ide, and to write java-gnome plugin commands. Sean On Sun, 13 Feb 2005 08:30:06 -0500, Jeff Morgan <ku...@gm...> wrote: > On Sun, 13 Feb 2005 02:19:25 +0000, Sean Coughlan <exc...@gm...> wrote: > > Hey there, > > > > I'm working on a project called JetGet, a download manager written in > > java-gnome. I recently added a link to it on the java-gnome > > screenshots page. > > I saw the screenshot. It looks quite nice! > > > My post now, is to let you know I've an AT (acceptance test) framework > > in place for java-gnome in JetGet. > > > > AT's are executable text documents that specify the funcionality of a > > program, and can be written by customers, designers, testers or indeed > > nearly anybody because they are written in almost plain english. > > > > My framework interprets the document and creates a junit test suite > > which either passes or fails depending on wheither the AT passes or > > fails. (so integration with eclipse/intellij etc.. is very nice) > > Is this based on fit? I have read a little about fit and it sounds > quite similar. > > > -- > Jeffrey Morgan > > "The highest reward for a man's toil is not > what he gets for it, but what he becomes by it" > - Jon Ruskin > |
From: Andrew C. <an...@op...> - 2005-02-13 21:40:40
|
On Sun, 2005-13-02 at 02:19 +0000, Sean Coughlan wrote: > This AT successfully passes for this application: > > TestTableIsEmpty downloadTable true > > UserSelectsMenuItem mnuNewDownload > UserInputsText txtUrl http://www.thecentric.com/ > UserInputsText txtSaveAs /home/sean/thecentric.index.html > UserClicksButton btnOkButton > > TestTableIsEmpty downloadTable false > > TestTableRowItem downloadTable 0 "/home/sean/thecentric.index.html" > "http://www.thecentric.com/" "5 K" "0.0%" Although I'm not a Mac OS X user, yesterday at a Linux Australia board meeting someone was describing "Newton Script" or "Apple Script" or "Apple Talk" - a scripting framework where, if I understood correctly, the entire desktop and any application is easily and totally available for scripting. I gather it is [conceptually] along the lines of Such-in-such-application->File Menu->Save Item->(/tmp/filename.txt) which is what you've developed, it seems. [Since we were meeting at jdub's place, he mentioned that there is a quiet movement in this direction; the accessibility toolkit gives all the hooks that are needed, so this sort of thing should be possible in GNOME...] So, if nothing else, Sean, if you're looking for further inspiration, you might check out what Mac OS X has in this area. *I* for one am desperately in need of automated testing for presented UI elements. I can and do Unit Test the infrastructure underneath, no problem, but once Windows are fired up, it's difficult indeed to do further automated tests. Great work, Sean! AfC Sydney -- Andrew Frederick Cowie Helping you succeed at flawlessly executing Massive Changes and Upgrades to your Mission Critical Systems http://www.operationaldynamics.com/ Sydney New York Toronto London |
From: Joao V. <jvi...@ya...> - 2005-02-18 13:40:34
|
I'm trying to specify a color here with gdk.Color.... but, the object takes a 16bit for red/green/blue (a 48bit pixel? That's totally odd to me...). So, how do i convert a basic RGB (8 bit each color) to that 16bit convention? Cheers, J.V. __________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/ |
From: Joao V. <jvi...@ya...> - 2005-02-18 13:58:56
|
Ok... if i multiply the 8bit color by 257 i think i get the color i want. But i think i'll submit a bug on this... Cheers, J.V. --- Joao Victor <jvi...@ya...> escreveu: > I'm trying to specify a color here with gdk.Color.... but, the object takes a 16bit for > red/green/blue (a 48bit pixel? That's totally odd to me...). So, how do i convert a basic RGB (8 > bit each color) to that 16bit convention? > > Cheers, > J.V. _______________________________________________________ Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis |