> Can I?
Apparently not.
http://www.catb.org/~esr/faqs/smart-questions.html
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
> 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
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
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.
> 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>
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.
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.