« Return to Thread: Begin book addresses mock object testing only (alternatives?)
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@...>
To: user-java@...
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@...>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@...
> For additional commands, e-mail: user-java-help@...
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...
« Return to Thread: Begin book addresses mock object testing only (alternatives?)
| Free embeddable forum powered by Nabble | Forum Help |