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

B

Ben Morrow

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

Quoth "lofenee said:
[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
 
L

lofenee

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--

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.
 
L

lofenee

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.
 
L

lofenee

[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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top