You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Felix Schumacher <fe...@internetallee.de> on 2019/09/28 12:24:17 UTC
Eclipse and hamcrest
Hi all,
when I currently try to run the test TestJSONPostProcessor in eclipse as
a junit test, it complaints about a missing method
org.hamcrest.CoreMatchers.anyOf(...)
I suspect that this is a result of too many hamcrest implementations/the
wrong order of those implementations.
Felix
Re: Eclipse and hamcrest
Posted by Vladimir Sitnikov <si...@gmail.com>.
Mark>From previous experience I would suggest switching to assertj
I had something like that in my mind, however, it seemed too much to switch
to another library for one or two use cases only.
I think behind the lines of enabling Kotlin-based tests, however, that is a
bit different story.
Vladimir
Re: Eclipse and hamcrest
Posted by Mark Collin <ma...@lazeryattack.com>.
From previous experience I would suggest switching to assertj. It’s not pulled in by as many things so you are less likely to get wierd dependency conflicts and it provides useful output when things don’t match.
Also it’s a fluent api so easy to discover the various matcher methods.
Really worth having a look at IMHO
Sent from my iPhone
> On 28 Sep 2019, at 13:51, Vladimir Sitnikov <si...@gmail.com> wrote:
>
> I was a bit puzzled with java-hamcrest as well.
>
> It looks like we should exclude it: (see
> https://github.com/hamcrest/JavaHamcrest/issues/183#issuecomment-441154016
> and
> http://hamcrest.org/JavaHamcrest/distributables#upgrading-from-hamcrest-1x )
>
> Felix, would you please check if adding org.hamcrest:hamcrest:2.1
> and org.hamcrest:hamcrest-library:2.1 solves the problem?
>
> Vladimir
Re: Eclipse and hamcrest
Posted by Felix Schumacher <fe...@internetallee.de>.
I am not really looking at replacing hamcrest with something different
(at the moment).
Felix
Am 28.09.19 um 20:56 schrieb Graham Russell:
> If we were looking at replacements I like Google Truth, it's like AssertJ
> but often with better error messages and with both the code reads more
> naturally than Hamcrest imo e.g.
>
> assertThat(result).isEmpty();
>
> Almost as good as Spock ;)
>
> result.isEmpty()
>
> On Sat, 28 Sep 2019, 17:30 Felix Schumacher, <
> felix.schumacher@internetallee.de> wrote:
>
>> Am 28.09.19 um 17:46 schrieb Vladimir Sitnikov:
>>>> duplicate classpath entries (
>> https://github.com/gradle/gradle/issues/10393
>>> ).
>>>
>>> Is it fixed in Gradle 5.6.2?
>>> Should we update then?
>> I think it is fixed in 5.6.2. And when I change the properties to
>> gradle/wrapper/gradle-wrapper.properties, it seems to generate the
>> classpath entries only once.
>>
>> Felix
>>
>>> Vladimir
>>>
Re: Eclipse and hamcrest
Posted by Graham Russell <gr...@gmail.com>.
If we were looking at replacements I like Google Truth, it's like AssertJ
but often with better error messages and with both the code reads more
naturally than Hamcrest imo e.g.
assertThat(result).isEmpty();
Almost as good as Spock ;)
result.isEmpty()
On Sat, 28 Sep 2019, 17:30 Felix Schumacher, <
felix.schumacher@internetallee.de> wrote:
>
> Am 28.09.19 um 17:46 schrieb Vladimir Sitnikov:
> >> duplicate classpath entries (
> https://github.com/gradle/gradle/issues/10393
> > ).
> >
> > Is it fixed in Gradle 5.6.2?
> > Should we update then?
>
> I think it is fixed in 5.6.2. And when I change the properties to
> gradle/wrapper/gradle-wrapper.properties, it seems to generate the
> classpath entries only once.
>
> Felix
>
> >
> > Vladimir
> >
>
Re: Eclipse and hamcrest
Posted by Felix Schumacher <fe...@internetallee.de>.
Am 28.09.19 um 17:46 schrieb Vladimir Sitnikov:
>> duplicate classpath entries (https://github.com/gradle/gradle/issues/10393
> ).
>
> Is it fixed in Gradle 5.6.2?
> Should we update then?
I think it is fixed in 5.6.2. And when I change the properties to
gradle/wrapper/gradle-wrapper.properties, it seems to generate the
classpath entries only once.
Felix
>
> Vladimir
>
Re: Eclipse and hamcrest
Posted by Vladimir Sitnikov <si...@gmail.com>.
>duplicate classpath entries (https://github.com/gradle/gradle/issues/10393
).
Is it fixed in Gradle 5.6.2?
Should we update then?
Vladimir
Re: Eclipse and hamcrest
Posted by Felix Schumacher <fe...@internetallee.de>.
Am 28.09.19 um 14:41 schrieb Vladimir Sitnikov:
> I was a bit puzzled with java-hamcrest as well.
>
> It looks like we should exclude it: (see
> https://github.com/hamcrest/JavaHamcrest/issues/183#issuecomment-441154016
> and
> http://hamcrest.org/JavaHamcrest/distributables#upgrading-from-hamcrest-1x )
>
> Felix, would you please check if adding org.hamcrest:hamcrest:2.1
> and org.hamcrest:hamcrest-library:2.1 solves the problem?
That problem seems to be solved with hamcrest:2.1 another problem are
duplicate classpath entries (https://github.com/gradle/gradle/issues/10393).
Felix
>
> Vladimir
>
Re: Eclipse and hamcrest
Posted by Vladimir Sitnikov <si...@gmail.com>.
I was a bit puzzled with java-hamcrest as well.
It looks like we should exclude it: (see
https://github.com/hamcrest/JavaHamcrest/issues/183#issuecomment-441154016
and
http://hamcrest.org/JavaHamcrest/distributables#upgrading-from-hamcrest-1x )
Felix, would you please check if adding org.hamcrest:hamcrest:2.1
and org.hamcrest:hamcrest-library:2.1 solves the problem?
Vladimir