From: Steve F. <st...@ok...> - 2001-12-14 10:54:41
|
Radirs <ra...@re...> said: > Iam using MockObjects in our project. We have made a mock system > (database) and are populating this MO by inputting data in to the > MockResultSet and stuff like that.And all these MO codes resides in the test > method of the test class(written for the class under test) and the test is > working fine. That's nice to hear. > Requirement : > To get the data from the Mock system (remember the MO > coding[instantiation and initialization] is done in the test class) and > display on to the browser using jsp's.(similar to getting the values from > the database and displaying on to the screen). What do you want to test by viewing JSP's in a browser? This sounds more like an integration test. The MO approach is intended for unit testing individual classes, or small clusters of classes. If you want a substitute database, there's one included in the mock objects extensions source tree as well as other options such as cloudscape. > My Questions are : > 1) Is there any way this(refer Requirement) can be done?if yes, How this can > be accomplished? > 2) Are there any steps to be followed ,specific to MO,if we need to > integrate MO into any propreitary framework? I don't understand what this means. Could you give me an example? Steve |
From: <kr...@da...> - 2001-12-15 12:37:32
|
Steve: Thanks for ur reply. Your Question: "What do you want to test by viewing JSP's in a browser?" Answer: I wanted to know whether i can reuse the data which i have intialized in the mockobjects as a substitute for database.( for which u have replied that it cant be done). You have also said abt a substitute database in "mock objects extensions source tree". Where can i find this ? Thanks, Kris. |
From: <kr...@da...> - 2001-12-15 12:38:01
|
Steve: Thanks for ur reply. Your Question: "What do you want to test by viewing JSP's in a browser?" Answer: I wanted to know whether i can reuse the data which i have intialized in the mockobjects as a substitute for database.( for which u have replied that it cant be done). You have also said abt a substitute database in "mock objects extensions source tree". Where can i find this ? Thanks, Kris. |
From: Tim M. <tim...@po...> - 2001-12-17 07:48:19
|
Just to clarify a small point - of course you can use MockObjects to populate the state of many objects - we do this for some of our "system tests" were we want to run a little more end to end (note these are not acceptance tests - something inbetween where we are testing linkages between objects). By passing values in - there is no reason why some master object high up in your chain can't be given a load of populated mock objects so that you can have a more end to test running. If you want that to be something that you look at in a browser that should be fine. Just remember that you mock objects are very basic objects that don't do much. If you find yourself adding extra behavior to them so that you can view different things in the browser then you are going beyond the bounds of mock objects and are probably writing a simple database. Of course you can take the basic mock implementations and turn them into something else - just please dont confuse everyone by calling it a mock database. Just use some common sense with this stuff and you should be ok. Tim > -----Original Message----- > From: moc...@li... > [mailto:moc...@li...]On Behalf Of > Steve Freeman > Sent: 14 December 2001 10:54 am > To: moc...@li... > Cc: ra...@re... > Subject: Re: [MO-java-dev] Need help on MockObjects !!! > > > > Radirs <ra...@re...> said: > > Iam using MockObjects in our project. We have made a mock system > > (database) and are populating this MO by inputting data in to the > > MockResultSet and stuff like that.And all these MO codes resides > in the test > > method of the test class(written for the class under test) and > the test is > > working fine. > > That's nice to hear. > > > Requirement : > > To get the data from the Mock system (remember the MO > > coding[instantiation and initialization] is done in the test > class) and > > display on to the browser using jsp's.(similar to getting the > values from > > the database and displaying on to the screen). > > What do you want to test by viewing JSP's in a browser? This sounds > more like an integration test. The MO approach is intended for unit > testing individual classes, or small clusters of classes. If you > want a substitute database, there's one included in the mock > objects extensions source tree as well as other options such as > cloudscape. > > > My Questions are : > > 1) Is there any way this(refer Requirement) can be done?if yes, > How this can > > be accomplished? > > 2) Are there any steps to be followed ,specific to MO,if we need > to > > integrate MO into any propreitary framework? > > I don't understand what this means. Could you give me an example? > > Steve > > > > _______________________________________________ > Mockobjects-java-dev mailing list > Moc...@li... > https://lists.sourceforge.net/lists/listinfo/mockobjects-java-dev > |