• 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

Testing database-heavy using TestNG

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does TestNG provide any support for testing database-heavy applications? (Including testing of database stored procedures).
 
author
Posts: 40
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Yavor,

no, database-testing is outside the scope of TestNG, which is a general purpose testing framework.

However, it gives you a little bit more than JUnit in terms of support for integration/end-to-end tests in general, so you can organize your tests better. Thanks to features like groups, dependent test methods or timeouts, you can make your tests fail fast and have a more precise information about the real bug. TestNG also supports running test methods with many threads which you might find useful.
 
Greenhorn
Posts: 5
IBM DB2 Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Tomek Kaczanowski

Does TestNG provide memory related bugs while testing using TestNG?
-----------------
Raj.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
TestNG itself doesn't support database-related testing, but there's a facility called dbUnit that does. I use dbUnit extensively with jUnit - among other things it allows me to ensure that I have valid JPA QL statements in my DAOs, since QL is interpreted and cannot be validated at compile-time. I also use it at a higher level for testing table interactions.

If I haven't crossed my wires, TestNG is especially popular in conjunction with dbUnit.
 
Tomek Kaczanowski
author
Posts: 40
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Raj,

Raj Java Raj wrote:
Does TestNG provide memory related bugs while testing using TestNG?


I'm not sure what do you mean by "memory related bugs"... Could you rephrase your question, please?
 
Tomek Kaczanowski
author
Posts: 40
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

Tim Holloway wrote:If I haven't crossed my wires, TestNG is especially popular in conjunction with dbUnit.


In fact dbUnit is closely related to JUnit, however it is possible to use it with TestNG as well. And BTW. you could also try Unitils which, among other impressive stuff, gives some support for database testing.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic