• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Urgent: open connection test in JTest

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,
We recently purchased the JTest product. I found it good as far as specification goes. But I'm not able to catch up some of the errors that I really prefer JTest be doing rather than anything else. For example...in my one program, to test it, I open the connection and never closed it. I thought JTest would pick it up. But after running static and dynamic test on that file , it found NO errors!!! How is this possible?
Is there any way I can catch such issues like connection not closed etc. using JTest? Please suggest as it is really important.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shyamal,
welcome at the Ranch!
I would advice you to not put the word "urgent" into the subject of your posts; not doing so will probably give you *more* answers, as many feel about it like cheating (after all, we *all* want our questions to be answered, and we all do so voluntarily; if you want to hurry someone, you should think about paying for it).
Regarding your question - well, how should JTest know that you *want* to close the connection (a JDBC connection, I guess)?
Actually, any automatically generated suite of tests can only be rudimentary. There is no magic in testing - a comprehensive suite of tests simply requires some investement of work (such investment typically pays back manyfold, though).
You should probably look into using JUnit to define test cases (as far as I know, JTest can execute JUnit tests). Testing for closing connections is a little bit more tricky than the average test, but certainly doable (using mock objects, for example).
 
author & internet detective
Posts: 41860
908
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
Ilja makes good points about not relying on JTest for dynamic analysis (auto generated tests.) However, the connection issue should be caught during JTest's static analysis.
I remember seeing a rule about this. Check that the rule is enabled and at a high enough severity. By default, only severity levels of one and two are checked. You need to check in the global test parameters, project test parameters and class test parameters to check the rule is enabled.
The other thing to check is that JTest is really using the latest version of the file. If you have browser integration, you need to start JTest from within the IDE again. If you just press start again, it will run the analysis on the old code.
 
Shyamal Shah
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for response guys. I figured out configuration was done in wrong way. And after that my static analysis did pickup the connections that were not closed. As far as "urgent" message is concerned, I aplogise...didnt realize that it is considered offensive. lesson learned and fully appriciate your response.
 
reply
    Bookmark Topic Watch Topic
  • New Topic