Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is there any way to automate the test of an applet using perl?

0 views
Skip to first unread message

lofenee

unread,
Jul 14, 2008, 9:59:59 AM7/14/08
to
Can I?


Joost Diepenmaat

unread,
Jul 14, 2008, 10:23:20 AM7/14/08
to
"lofenee" <lof...@gmail.com> writes:

> Can I?

Apparently not.

http://www.catb.org/~esr/faqs/smart-questions.html

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

Sherman Pendley

unread,
Jul 14, 2008, 11:50:23 AM7/14/08
to
"lofenee" <lof...@gmail.com> writes:

> Can I?

There's no way that I know of. Testing an applet would mean being able
to load a JVM, run the applet, and call its methods. Neither of the
web client modules I'm aware of (LWP and WWW::Mechanize) can do that.

There's a JVM module, if "offline" testing of your applet without its
surrounding HTML context is sufficient:

<http://search.cpan.org/~alknaff/Jvm-0.9.3/Jvm.pm>

I really wonder though, what's the point of using Perl to test Java?
There are plenty of native Java unit-testing tools, so why not simply
use one of those? I like Perl as much as the next guy (or gal), but
jumping through hoops to use it instead of a much easier solution in
another language is just plain silly.

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net

Ben Morrow

unread,
Jul 14, 2008, 12:27:19 PM7/14/08
to
[please include your question in the body of your post as well as the
Subject. Some of us don't read Subjects.]

Quoth "lofenee" <lof...@gmail.com>:
> Can I?
[test a java(?) applet using Perl]

You may be able to do this with WWW::Selenium, although as Sherm said
it's probably better not to.

Ben

--
The cosmos, at best, is like a rubbish heap scattered at random.
Heraclitus
b...@morrow.me.uk

lofenee

unread,
Jul 14, 2008, 9:41:04 PM7/14/08
to
> There's no way that I know of. Testing an applet would mean being able
> to load a JVM, run the applet, and call its methods. Neither of the
> web client modules I'm aware of (LWP and WWW::Mechanize) can do that.
>
> There's a JVM module, if "offline" testing of your applet without its
> surrounding HTML context is sufficient:
>
> <http://search.cpan.org/~alknaff/Jvm-0.9.3/Jvm.pm>

I found a module Java.pm, which claims the ability to access the local and
remote JVM.
But I don't know whether or how it works.

>
> I really wonder though, what's the point of using Perl to test Java?
> There are plenty of native Java unit-testing tools, so why not simply
> use one of those? I like Perl as much as the next guy (or gal), but
> jumping through hoops to use it instead of a much easier solution in
> another language is just plain silly.
>
> sherm--
>
> --
> My blog: http://shermspace.blogspot.com
> Cocoa programming in Perl: http://camelbones.sourceforge.net

As i have little knowledge of Java. If appropriatly here, can you give me
some instruction about auto-testing of an java applet other than perl?

> [please include your question in the body of your post as well as the
> Subject. Some of us don't read Subjects.]
>

> [test a java(?) applet using Perl]

Yes.


Sherman Pendley

unread,
Jul 14, 2008, 9:51:33 PM7/14/08
to
"lofenee" <lof...@gmail.com> writes:

> As i have little knowledge of Java. If appropriatly here, can you
> give me some instruction about auto-testing of an java applet other
> than perl?

JUnit is very popular, and integrated in a number of IDEs, such as
Eclipse and NetBeans:

<http://junit.sourceforge.net/>

JUnit is so popular that it's spawned an entire family of unit testing
tools, including one for Perl called Test::Unit:

<http://search.cpan.org/~mcast/Test-Unit-0.25/lib/Test/Unit.pm>

lofenee

unread,
Jul 14, 2008, 10:46:21 PM7/14/08
to
> JUnit is very popular, and integrated in a number of IDEs, such as
> Eclipse and NetBeans:
>
> <http://junit.sourceforge.net/>
>
> JUnit is so popular that it's spawned an entire family of unit testing
> tools, including one for Perl called Test::Unit:

Well, JUnit does fit the unit testing. But it seems not for function test,
during which
the applet is loaded and run from the browser, rather than from IDE.

Actually, without the automation tool, I have to test every function
manually
by clicking the button, popup the menu, select each item from droplist...
So,
I need a tool to do most of that automatically.


lofenee

unread,
Jul 14, 2008, 10:56:54 PM7/14/08
to
> [test a java(?) applet using Perl]

Yes.

> You may be able to do this with WWW::Selenium, although as Sherm said
> it's probably better not to.

It seems WWW::Selenium not supported applet testing. It can not locate
the widget in the applet.


0 new messages