Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Applet GUI testing automation

Reply
Thread Tools

Applet GUI testing automation

 
 
lofenee
Guest
Posts: n/a
 
      07-16-2008
I wonder if java.awt.robot can be used to test an applet without changing
any source code?



 
Reply With Quote
 
 
 
 
Evans
Guest
Posts: n/a
 
      07-16-2008
On 16 Jul, 10:42, "lofenee" <lofe...@gmail.com> wrote:
> I wonder if java.awt.robot can be used to test an applet without changing
> any source code?


'without changing any source code?' what does that mean?

Yes, you can use robot class to test your GUI if you want, but there
are other tools on the market for GUI testing. A google search will
spit out hundreds.

--
Evans
http://www.javawug.org
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      07-16-2008
On Jul 16, 7:42*pm, "lofenee" <lofe...@gmail.com> wrote:
> I wonder if java.awt.robot can be used to test an applet without changing
> any source code?


Do you?

Can the applet be loaded in the AppletViewer?

(If the answer to my second question is 'yes', then
the answer to your question is certainly 'yes'. My
first suggestion might have been 'dump Robot for
JUnit or JFCUnit', but it seems they cannot handle
applets.)

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-16-2008
On Jul 16, 7:57*pm, Evans <onyx...@gmail.com> wrote:
> On 16 Jul, 10:42, "lofenee" <lofe...@gmail.com> wrote:
>...
> 'without changing any source code?' what does that mean?


I expect the OP is referring to the applet itself.

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
Evans
Guest
Posts: n/a
 
      07-16-2008

> > 'without changing any source code?' what does that mean?

>
> I expect the OP is referring to the applet itself.
>
> --
> Andrew Thompsonhttp://pscode.org/


Thanks Andrew, just got in the office - still haven't had my morning
coffee

--
Evans
http://www.javawug.org
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-16-2008
On Jul 16, 8:56*pm, Evans <onyx...@gmail.com> wrote:
> > > 'without changing any source code?' what does that mean?

>
> > I expect the OP is referring to the applet itself.

...
> ...just got in the office - still haven't had my morning
> coffee


Don't sweat it. The OP can always apply for a
'full refund' if they are dissatisfied with any
answers they receive.

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
lofenee
Guest
Posts: n/a
 
      07-16-2008
>Do you?

By 'without changing any source code', I mean no need to add extra code
to the applet or even to change it to an application.

>Can the applet be loaded in the AppletViewer?


>(If the answer to my second question is 'yes', then
>the answer to your question is certainly 'yes'. My
>first suggestion might have been 'dump Robot for
>JUnit or JFCUnit', but it seems they cannot handle
>applets.)


>--
>Andrew Thompson
>http://pscode.org/


Is there any difference from applet being loaded by the browser
while loaded in the AppletViewer?
If there is no significant difference, my anwser is yes.

If the applet is loaded in the AppletViewer, can Robot obtain
the handler of it?


 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-16-2008
On Jul 16, 10:44*pm, "lofenee" <lofe...@gmail.com> wrote:
...
> Is there any difference from applet being loaded by the browser
> while loaded in the AppletViewer?


Yes. I have just been developing applets that
use the JSObject that simply do not work in the
AppletViewer. There are a lot of other reasons
applets might fail in the AV, but perhaps you can
'short circuit' the entire Q/A process by actually
testing the applet (to which you have not provided
an URL) in the AV yourself.

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-16-2008
On Jul 16, 10:44*pm, "lofenee" <lofe...@gmail.com> wrote:
..
> If the applet is loaded


(presumably - successfully)

>..in the AppletViewer, can Robot obtain
> the handler of it?


I am not sure what you mean by 'handler'*.

The original point I wanted to make is simply that
you might *if necessary* load the applet (for whose
code we do not even have, let alone can change) in a
'helper' applet that ensures the AppletViewer is in a
fixed location/size to allow the Robot to do its work.

Explain what you mean by 'handler' and I might go
into more detail.

* An SSCCE often helps me understand.

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
Alex.From.Ohio.Java@gmail.com
Guest
Posts: n/a
 
      07-16-2008
On Jul 16, 5:42 am, "lofenee" <lofe...@gmail.com> wrote:
> I wonder if java.awt.robot can be used to test an applet without changing
> any source code?


Robot can be used to test anything which involves mouse, keyboard and
screen. It, actually, takes control over your mouse, keyboard and have
ability to have screen shots. It's your real mouse, not mouse inside
Applet or your Java application.
You can even write your own VNC server using Robot.

Unfortunately, allowing computer to have control over your mouse/
keyboard is not good idea. That's the reason why Robot is not used for
tests.

Alex.
http://www.myjavaserver.com/~alexfromohio/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GUI automation tool (windows) Alex Barna Python 26 08-11-2010 10:45 PM
Windows GUI automation question Axel Etzold Ruby 1 08-19-2009 04:59 PM
optionparser to gui automation? Mark Noworolski Ruby 5 03-25-2008 07:33 PM
Supressing the ctrl-c and other keys during word automation in automation apondu ASP .Net 0 07-19-2007 09:10 PM
ECS: Elements of C++ Style Automation Testing ECS Automation Administrator C++ 0 11-16-2004 11:24 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57