Hi all I've created a branch on github where I've started using Spock - https://github.com/ham1/jmeter/tree/spock - I can create a PR if that's more useful.
Test compilation works with ant and I can run tests run via my IDE (IntelliJ), however, I haven't yet been able to figure out how to run these as part of `ant test`. Does someone, with more experience of ant, have some time to look at the code and help get it fully working? I've created two tests, one which replicates an existing test and one for a new class. I really like Spock's given/when/then test structure and built-in Mock/Spy/Stubs. It is also possible to mock static Java methods with Spock and PowerMock (see: https://dzone.com/articles/mocking-static-methods-groovy). Thanks Graham On 19 December 2016 at 11:47, Felix Schumacher < [email protected]> wrote: > Am 18.12.2016 um 15:46 schrieb Graham Russell: >> >> Felix >> >> I really like using spock. >> >> I'm not sure how to get it working with ant, but I'm sure it's doable. I >> should have some time in the new year to try adding some spock tests if >> that's useful? > > That would be great. > >> >> Please see: >> https://mechanitis.blogspot.com/2013/12/spock-data-driven-testing.html and >> the two other posts in that series (not my blog) for some of the reasons I >> like it. > > > Will have a look, thanks. > > Felix > >> >> Thanks >> >> Graham >> >> On Sun, 18 Dec 2016, 20:30 Felix Schumacher, < >> [email protected]> wrote: >> >>> Am Dienstag, den 13.12.2016, 22:36 +0100 schrieb Philippe Mouawad: >>>> >>>> On Sunday, December 11, 2016, Felix Schumacher < >>>> [email protected]> wrote: >>>> >>>>> Hi all, >>>>> >>>>> Philippe has brought up the potential usage of a mocking framework >>>>> in >>>>> another thread. That is something I too would like to see used in >>>>> our >>>>> tests. He has linked mockito 2 as a candidate. I think a strong >>>>> contender >>>>> would be jmockit (http://jmockit.org/) or (additionally) something >>>>> like >>>>> spock (http://spockframework.org/). >>>>> >>>>> What do you think? >>>> >>>> I have a little experience with mockito2, not with other, so it's >>>> hard to >>>> answer. >>>> Some elements that might be useful: >>>> >>>> - https://www.openhub.net/p/spock >>>> - https://www.openhub.net/p/jmockit >>>> - https://www.openhub.net/p/mockito >>>> >>>> >>>> Maybe we should take a place where we want to introduce it and make >>>> an >>>> example with the 2 or 3 implementations to give us some ideas >>> >>> Now that builds.apache.org/analysis includes jmeter stats, we can see, >>> that jdbc needs a few more tests :) So I think it would be a good idea >>> to test mockito and jmockit on some jdbc test elements. >>> >>> I haven't used spock before, so I don't really know, what we would have >>> to do in order to use it. >>> >>> I will open a bug enhancement to add a mocking framework. We could add >>> patches there, or add PR to it. >>> >>> Regards, >>> Felix >>>> >>>> >>>> >>>>> Felix >>>>> >>>>> >
