• 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
Re: JUnit for testing EOs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JUnit for testing EOs


  • Subject: Re: JUnit for testing EOs
  • From: Paul Hoadley <email@hidden>
  • Date: Tue, 27 Nov 2007 16:20:18 +1030
  • Resent-date: Tue, 27 Nov 2007 16:31:04 +1030
  • Resent-from: Paul Hoadley <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: WebObjects-Dev List <email@hidden>

Hi Chuck, Denis,

Thanks for the pointer to the other thread Denis. I had actually read that, but being both a WO and Eclipse novice, hadn't even registered it was relevant.

On 27/11/2007, at 2:42 PM, Chuck Hill wrote:

I'm running WO 5.4 on Leopard, Eclipse 3.3.1.1, WOLips 3.3.4667, and writing some tests with JUnit 4 shipped with Eclipse.

Unrelated to you question, I have moved to TestNG. I find it far easier to configure and use than JUnit. If you are just getting started with JUnit, it really is worth a long look.

I am just getting started, so I will take a look at TestNG.

I can't quite get any tests running which try to instantiate EOs. I get the stack trace appended below, leading off with "Unabled to find an EOClassDescription for objects of class net.logicsquad.am.model.auth.Country". I'm trying to follow the subsection "JUnit and Eclipse" in chapter 1 of "Practical WebObjects",

I think I might have a copy of that around here... :-)

:-)

but obviously the book is a few versions behind in all the tools. From the Run dialog, I select the test class > Classpath tab > then I've tried adding to both "Bootstrap Entries" and "User Entries" the folder /AM/build/AM.woa/Contents/Resources/Java, but I get no joy with either. Am I adding the right folder to the right place?

Add it to User Entries. It also needs to go above the other entries in the class path. If the model (or any other resource) is in a framework, you also need to add the Resources/Java dir for that to User Entries above the default stuff.

Hmm, well AFAICS I've done that:

PNG image




The models are not in frameworks. I am still getting "Unabled [sic!] to find an EOClassDescription".


(As an aside, do I need to go through this for every single test class I create?)

Not sure what you are doing there... I create a "AllTestsSuite.java" for each project and have that instantiate the test classes. So I only need to set up the launcher once for each project, for AllTestsSuite. Does that make sense?

Yes it does. I'm also pretty new to JUnit, and was just trying to get a single test class going.


To be honest, I'm not wedded to the idea of JUnit. If TestNG is simpler to get going, I'll go take a look at that instead.


-- Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/


 _______________________________________________
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: JUnit for testing EOs
      • From: Chuck Hill <email@hidden>
References: 
 >JUnit for testing EOs (From: Paul Hoadley <email@hidden>)
 >Re: JUnit for testing EOs (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: "No Instance available" on Leopard / WO 5.3
  • Next by Date: Re: Object with globalID could not be found in the database, when it is there ??
  • Previous by thread: Re: JUnit for testing EOs
  • Next by thread: Re: JUnit for testing EOs
  • Index(es):
    • Date
    • Thread