• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Effective Unit Testing - Couple of Questions

 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lasse Koskela and thanks for your book. I have 2 questions:

a) Does the book also discuss different frameworks available for unit testing and their comparison?
b) Does the book go into datastore side and to generate test data? For e.g. suppose there is method that receives certain rules and it goes to database and validates data against the rules. It returns objects containing data that meets the rules. How to generate minimum data in database for testing all rules (any coding techniques to generate data). Is these any example on this or am I talking about something too specific here?

Regards

 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Varun,

I'm afraid the answer would be no on both counts.

I've tried to focus on concepts that are applicable across test frameworks (and programming languages for the most part). Most examples use JUnit and there's a couple of appendices to introduce JUnit for those who are new to it. While I think they are a decent introduction to someone who's used another test framework before (perhaps with a different programming language), it certainly wasn't a primary goal to teach JUnit or compare it to alternative frameworks.

Regarding test data and databases, those topics have been largely cut out by the explicit focus on unit tests, isolated tests written for individual objects or small clusters of objects – tests that explicitly try to avoid hitting a database or any other external component that's not in the test's control.
 
Varun Chopra
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply Lasse. I understand the focus part. Best wishes.
 
reply
    Bookmark Topic Watch Topic
  • New Topic