ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Butler <jeffgbut...@gmail.com>
Subject Re: Begin book addresses mock object testing only (alternatives?)
Date Wed, 08 Jul 2009 21:25:33 GMT
Yes - I mean building from source.  The Ibator build includes hundreds of
tests that utilize DAO, JUnit, Spring (in some cases), and hsqldb.  If you
are looking for code examples, then either of the builds offers a wealth of
examples.  Both run from the command line.
Jeff Butler




On Wed, Jul 8, 2009 at 4:28 PM, David Brown
<dbrown@sexingtechnologies.com>wrote:

> Hello Jeff, thanks for the reply. I'm not sure what you mean by the IBatis
> builds (build IBatis from source?). In any case I accepted the Clinton Begin
> advice (challange) and I built the JPetstore. I'm not confident in the use
> of in-memory DBs even if it is hsql. And, my requirements are for: MySQL.
> This being said I re-configured the JPetstore app to use MySql. I ran all 3
> .sql files to setup the MySql instance with a JPetstore database. I deployed
> the jpetstore.war to TC but invoking the url:
> http://localhost:8080/jpetstore only evokes the server 500 error (See
> included stacktrace). I did not have this issue with the hsql version of
> JPetstore. If the IBator build means something deployable or buildable on
> the command-line please advise, David.
>
>
> org.apache.jasper.JasperException: An exception occurred processing JSP
> page /common/../common/IncludeTop.jsp at line 62
>
> javax.servlet.ServletException: javax.servlet.jsp.JspException: Exception
> creating bean of class com.ibatis.jpetstore.presentation.CatalogBean: {1}
>
>
>
>
> ----- Original Message -----
> From: "Jeff Butler" <jeffgbutler@gmail.com>
> To: user-java@ibatis.apache.org
> Sent: Wednesday, July 8, 2009 1:03:00 PM GMT -06:00 US/Canada Central
> Subject: Re: Begin book addresses mock object testing only (alternatives?)
>
> You could look at the Ibatis or Ibator builds - they both unit test with
> JUnit against a "live" database (hsqldb).
> The Ibator build uses generated DAO layer, JUnit, hsqldb - seems like just
> what you are asking for.
>
> Jeff Butler
>
>
> On Wed, Jul 8, 2009 at 12:52 PM, David Brown
> <dbrown@sexingtechnologies.com>wrote:
>
> > Hello Begin, Goodin and Meadors, having read (and reread) the Begin book,
> > and in particular, the ch. 13 Unit testing only seems to cover the use of
> > Mock objects. I don't dispute the need and usefulness of Mock objects but
> I
> > would like to JUnit test my iBatis/MySql development using a live
> database.
> > I know this is discussed briefly in the book but I don't see any
> real-world
> > examples that apply to what I am trying to test. Please reply with links
> or
> > directives to examples of DAO layer JUnit testing of iBatis against a
> live
> > database. The most valuable example would test against two tables with
> > references and contraints e.g. primary key auto-generation and a FK
> > reference to the generated key. My current efforts only return test
> errors
> > (not failures). Regards, David.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> > For additional commands, e-mail: user-java-help@ibatis.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

Mime
View raw message