The api seems very similar to AssertJ (https://github.com/joel-costigliola/assertj-core), both of which are a massive improvement over raw JUnit. I've been using AssertJ for probably 8 months and it's fantastic. Does Truth solve some problems that AssertJ does not?
Your case would be stronger if contrasted with modern JUnit, that is, `assertThat` + Hamcrest, rather than older constructs such as `assertEquals` or `assertTrue`. Yours is still a better API, but you make a bit of a strawman case against JUnit.
Artem, I wrote it and it was inspired by FEST, but I wrote it outside Google, and donated it to Google. I know it's 5 years later, but I feel the need to set the record here, since we evaluated FEST and Hamcrest and AssertJ is a FEST fork. We desired some degrees of extensibility not offered by FEST, and our first preference would have been to use an existing framework. We chose otherwise despite our own self-caution not to merely do NIH.
Any recommendation on how to use assertWithMessage? For instance assertWithMEssage("Check orange is present") or assertWithMessage("Orange is missing")
The api seems very similar to AssertJ (https://github.com/joel-costigliola/assertj-core), both of which are a massive improvement over raw JUnit. I've been using AssertJ for probably 8 months and it's fantastic. Does Truth solve some problems that AssertJ does not?
ReplyDeleteHi, I use AssertJ too and I have the same question that Steve.
ReplyDeleteHi!
ReplyDeleteHave you ever try to use rspec ruby gem through jRuby?
In my opinion, rspec has the most advanced testing dsl language.
Regards, Karlo.
Your case would be stronger if contrasted with modern JUnit, that is, `assertThat` + Hamcrest, rather than older constructs such as `assertEquals` or `assertTrue`. Yours is still a better API, but you make a bit of a strawman case against JUnit.
ReplyDeleteExactly this! Also, did you try to work with the JUnit project to get this integrated or this just an other Google NIH project?
Deletelooks like just an other Google NIH project
DeleteArtem, I wrote it and it was inspired by FEST, but I wrote it outside Google, and donated it to Google. I know it's 5 years later, but I feel the need to set the record here, since we evaluated FEST and Hamcrest and AssertJ is a FEST fork. We desired some degrees of extensibility not offered by FEST, and our first preference would have been to use an existing framework. We chose otherwise despite our own self-caution not to merely do NIH.
Deletecan we use this with test automation using selenium webdriver
ReplyDeleteSounds interesting. What advantage does this have over hamcrest?
ReplyDeleteAny recommendation on how to use assertWithMessage? For instance assertWithMEssage("Check orange is present") or assertWithMessage("Orange is missing")
ReplyDelete