• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unit testing logic / EOF
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unit testing logic / EOF


  • Subject: Unit testing logic / EOF
  • From: Jean-François Veillette <email@hidden>
  • Date: Thu, 22 Nov 2007 16:12:50 -0500

I'm relatively new to unit testing, junit, selenium and all that stuff.
I've built simple test so far for logic that didn't involve database operation and didn't invole much of eof in fact.


I have to modify an existing project and would like to start building test cases for it, slowly but surely building a test library.
Trying to build test for logic related to registration and membership management.
For example, when I do invoke registerNewUser("New User Name"), I would like to make sure that an invoice object is created, with the correct type and amount in it, depending on the current cost grid, which will depend on the current date (system pref).


I have looked at wounittest and the mockeditingcontext. it is interesting ... but since I'm so new to all of this, I'm not even sure I really understand how it can really be useful for me. At least I can't get to write a test that doesn't just look like « assertEqual(2, 2) » and really test the logic, verifying new objects and relationships.

When I'm thinking about the fact that I'm going to test the membership movements (across many groups), I think in term of a graph of sequential operations, where each node is a new state with check points, and each childs are optional operations that can be done from that point.
How do you handle such situation ?
If each node become a test (@Test), then just having the objects context ready will be quite challenging. How do you build a test from the result state of a previous test ?


If you have sample code showing more than the basic test (even if I can't compile, at least if I can understand), that would be great !

How many of you are using junit ? wounittest ? testng ?

In this first step, I'm not yet interested in component testing (ERSelenium), we have enough logic code to test before the user interface layer come to play.

- jfv

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Unit testing logic / EOF
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Nested NSArray of Strings - Generics - WO5.4
  • Next by Date: Re: Unit testing logic / EOF
  • Previous by thread: Re: VelocityEOGenerator - files in Finder but not in Eclipse project
  • Next by thread: Re: Unit testing logic / EOF
  • Index(es):
    • Date
    • Thread