• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Junits for SpringWebApplication which is running at a remote weblogic server???

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have a doubt in debugging a SpringWebApplication running at a remote weblogic server.

is it possible to debug a SpringWebApplication running at a remote weblogic server? How to write a junit(from my local eclipse IDE)
to test the appln running remotely? because we cant deploy it locally,but its up and running in remote server,kindly help me out in
this.


Thanks,
Sundar

 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


is it possible to debug a SpringWebApplication running at a remote weblogic server?



Yes, as long as you are running a relatively recent version of Java and you can set the command-line options (and restart) the server you can remotely debug the application running on the server through Eclipse.


How to write a junit(from my local eclipse IDE) to test the appln running remotely?



You won't use JUnit by itself to do this - JUnit is just a unit testing framework - you'll need something that provides in-container testing (like Jakarta Cactus) or something that makes requests through the web frontend (like HttpUnit or Selenium ). However, I really wouldn't recommend this, because....


because we cant deploy it locally



1.) Why? I really can't visualize a good reason for this... Is the application specifically tied to Weblogic in some way, and you don't have enough licenses? Is it business/"security"/bureau"crazy" reasons?
2.) Unit tests shouldn't require a deployment anyway - and one of the big benefits of using Spring for DI/IOC is that your code is just a plain old java object, and can be tested in isolation outside of a "deployment only" container.
 
author & internet detective
Posts: 42135
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sundar,
While remote debugging is certainly possible, it is much faster and less error prone to test locally. Even if there is a WebLogic license shortage, why can't you deploy to Tomcat or JBoss locally. A nice thing about Dependency Injection is that you can inject stubs for any calls to the "outside world" (LDAP, WebLogic parts) that do not exist on your local machine. That way you know the bulk of the application works before deploying remotely.
 
sundaresan ganapathy
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for the suggestions given,i will work on your points an get back to u.

Regards,
Sundar
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Am using oracle weblogic with Junit.Here am using my webapplication as jar and added in junit application.while running login testcase am not able to get the datasource and connection which is already registered or configured in server (oracle weblogic) its giving NullPointerException

Do you know how to get the datasource from server oracle weblogic

Thanks,
Sathya
 
reply
    Bookmark Topic Watch Topic
  • New Topic