Skip to main content

jtharness used as an distributed application acceptance framework

2 replies [Last post]
pitonew
Offline
Joined: 2007-06-12

Hello,

I just tumble accross JTHarness.
I'm wondering if this tool could be used as a base to create test framework, to test a distributed application based on java.
basically, we need to :
- deploy the app's components in a distributed environement
- configure these components based on a scripted test plan
- execute the test plan
- gather results
- generate reports

say i have a JXTA based app, where each peer can provide, ask for certain services to each other via both cmdline clients, GUI based apps, or front end protocols queries.

is that thinkable, or is that out right impossible.

from the little i saw, it seems that jtharness, is well suited for API test, but could be twisted into a higher level application testing framework.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sergey_borodin
Offline
Joined: 2006-10-20

I'd say thats thinkable.
JT Harness provides basic testing facilities such as configuring test execution environment, results collection, report generation etc. Mechanism of test finding and execution are extendable. For example, you can look at https://cqme.dev.java.net/framework.html framework used for ME platforms testing. I didn't heard about any solutions for distributed apps testing.

If you're intresting in preparing such solution for your purposes, here are some key components to look at:
com.sun.javatest.Harness and it's start method - entry point to test execution start
com.sun.javatest.TestRunner - component, responsible for execution of set of tests
com.sun.javatest.JUnitTestRunner and com.sun.javatest.DefaultTestRunner - some implementations
com.sun.javatest.Script - abstraction for test scenario
StdTestScript, KeywordsScript, ReportScript, APIScript - some implementations.

Hope, this will help you,
thanks,
Sergey

bkurotsu
Offline
Joined: 2004-12-13

Almost any kind of test can be run under the harness, so I do not think there is any limitation that would stop you from doing what you want. What tends to make the difference is how much built-in support the harness and frameworks provide to you - to decrease the amount of code you need to write.

The harness can help decrease the work required for you to configure, gather results and generate reports. The details depend on how complex your scenarios are. But JT Harness would be able to bring them all together under a single user interface.

Reporting is customizable - there are HTML, plain text and XML formats now, but you can write your own output format. Execution and results gathering are completely customizable - you need to write code to do this of course; this is as simple or complex as your problem domain.

You might want to look at the provided tutorial in the binary to see if you like the user interface and built-in capabilities (reports, monitoring, ...).

Also look at our related java.net projects to see what other people have done - especially ME Framework/cqME.

We can help answer any specific questions you have about JT Harness capabilities here. ME Framework questions are best posted to their forum.

Brian