On Sat, Aug 31, 2013 at 2:41 AM, Claude Warren <[email protected]> wrote:
> My strategy for building the new Junit 4.11 tests is: > > 1. Tag the source tree and check it out. > 2. Migrate all tests from Junit 3.x to 4.11 while moving them to > packages that match the packages of the class under test. > 3. For interfaces the tests must take a parameter so that implementers > can easily run/extended the standard tests against their implementation. > 4. For complex interfaces (e.g. ones that return other interfaces > defined in Jena) test suites must be constructed that will test all of > the > returned interface. > 5. Reuse the classes implemented for testing where appropriate > (e.g. com.hp.hpl.jena.graph.RecordingListener) > 6. Mock classes for which a testing implementation does not currently > exist where required. (e.g. the mock TransactionHandler above). > 7. Diff tag and current trunk (assuming that new tests have been added) > 8. Add new tests to account for the diff. > 9. Repeat 7 through 9 until there are no changes. > 10. Work with development team to ensure orderly transition to new > tests. > 11. possibly redo steps 7 through 9 to account for any possibly missed > changes. > 12. Document how to extend the classes to make life easier for > implementers. > I can be the guinea pig on this as this is something we're interested in. Cheers, Mike > > I have not tagged the source tree yet and am looking through the existing > tests to ensure that I understand how to convert the patterns that have > been used to the 4.11 version. > > I have some code that I have not yet checked in to the new test branch. > > Claude > > > > On Fri, Aug 30, 2013 at 5:39 PM, Andy Seaborne <[email protected]> wrote: > > > On 30/08/13 17:04, Claude Warren wrote: > > > >> In the above case (from the graph testing suite): > >> > >> > >> TransactionHandler th = Mockito.mock( TransactionHandler.class ); > >> Graph g = Factory.**createGraphMemWithTransactionH**andler(th); > >> Assert.assertEquals( th, g.getTransactionHandler() ); > >> > >> > > Claude, > > > > I was asking for a wider overview of what is your proposed testing > > strategy. > > > > But I do not understand what you are talking about here - do you mean > some > > new work you have or the jena-core test suite? There is no call to > > createGraphMemWithTransactionH**andler I can find in the graph testing in > > jena-core or in Experimental/new-test. > > > > I am just trying to understand what mocking facilities here. > > > > Andy > > > > > >> > >> On Fri, Aug 30, 2013 at 4:50 PM, Andy Seaborne <[email protected]> wrote: > >> > >> Claude, > >>> > >>> I don't understand what is being mocked. Could you explain a bit about > >>> the > >>> intention/design you have for the testing. I guess I'm lacking > context. > >>> > >>> Andy > >>> > >>> > >>> > >>> On 30/08/13 16:37, Stephen Allen wrote: > >>> > >>> I'm a big fan of Mockito, so I'd like to see it added. > >>>> > >>>> -Stephen > >>>> > >>>> On Thu, Aug 29, 2013 at 1:38 PM, Claude Warren <[email protected]> > >>>> wrote: > >>>> > >>>> I am rewriting the test cases for JUnit 4.x (4.11 currently) and am > >>>>> thinking about adding Mockito to mock some of the objects in the > tests. > >>>>> For example testing that > >>>>> > >>>>> Graph g = Factory.****createGraphMemWithTransactionH****andler(th); > >>>>> > >>>>> g.getTransactionHandler(); > >>>>> returns the same transaction handler. > >>>>> > >>>>> Does anyone have a problem with adding Mockito the the test build? > >>>>> > >>>>> -- > >>>>> I like: Like Like - The likeliest place on the web< > >>>>> http://like-like.xenei.com**> > >>>>> Identity: https://www.identify.nu/user.****[email protected]< > https://www.identify.nu/user.**[email protected]> > >>>>> <https://**www.identify.nu/user.php?**[email protected]< > https://www.identify.nu/[email protected]> > >>>>> > > >>>>> LinkedIn: http://www.linkedin.com/in/****claudewarren< > http://www.linkedin.com/in/**claudewarren> > >>>>> <http://www.**linkedin.com/in/claudewarren< > http://www.linkedin.com/in/claudewarren> > >>>>> > > >>>>> > >>>>> > >>>> > >>> > >> > >> > > > > > -- > I like: Like Like - The likeliest place on the web< > http://like-like.xenei.com> > Identity: https://www.identify.nu/[email protected] > LinkedIn: http://www.linkedin.com/in/claudewarren >
