BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to run an individual module

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE
View previous topic :: View next topic  
Author Message
phimalaya
Guest





PostPosted: Fri Jun 23, 2006 1:23 am    Post subject: how to run an individual module Reply with quote



hi,
i have a jsp application built in jbuilder 2006. it is a complete app and
upon running it is configured to show me the log in jsp when.
now out of the complete package, i want to test a module which has a "main"
method. what should i do?

thx
Back to top
Paul Furbacher [TeamB]
Guest





PostPosted: Fri Jun 23, 2006 8:12 am    Post subject: Re: how to run an individual module Reply with quote



phimalaya wrote:

Quote:
i have a jsp application built in jbuilder 2006. it is a complete app and
upon running it is configured to show me the log in jsp when.
now out of the complete package, i want to test a module which has a "main"
method. what should i do?

It's not really clear what you are trying to do. Part of
the reason is that you are using the words "module" and
"package" in ways which are confusing. "Web module",
I would understand. But what's a module in this case?
Is it a class? A set of classes? The Web module itself?

Are you asking how to unit test a particular class?
Why, in a Web app, would you have a class which has
a "main()" method? If you have added the "main()"
method so that you can run the class to do testing,
that's not a best practice. You should write a
TestCase for that class, and run that test case
via a runtime configuration.

If the class depends upon servlet-related classes,
you will have to mock both the container and the
servlet-related classes. Spring has some very nice
servlet mock objects. (http://springframework.org)


--


Paul Furbacher (TeamB)

Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Back to top
phimalaya
Guest





PostPosted: Fri Jun 23, 2006 5:57 pm    Post subject: Re: how to run an individual module Reply with quote



thanks for your response. i found the solution.

"Paul Furbacher [TeamB]" <pfurbacher (AT) mac (DOT) com> wrote in message
news:449b5c45$1 (AT) newsgroups (DOT) borland.com...
Quote:
phimalaya wrote:

i have a jsp application built in jbuilder 2006. it is a complete app and
upon running it is configured to show me the log in jsp when.
now out of the complete package, i want to test a module which has a
"main" method. what should i do?

It's not really clear what you are trying to do. Part of
the reason is that you are using the words "module" and
"package" in ways which are confusing. "Web module",
I would understand. But what's a module in this case?
Is it a class? A set of classes? The Web module itself?

Are you asking how to unit test a particular class?
Why, in a Web app, would you have a class which has
a "main()" method? If you have added the "main()"
method so that you can run the class to do testing,
that's not a best practice. You should write a
TestCase for that class, and run that test case
via a runtime configuration.

If the class depends upon servlet-related classes,
you will have to mock both the container and the
servlet-related classes. Spring has some very nice
servlet mock objects. (http://springframework.org)


--


Paul Furbacher (TeamB)

Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.