What is current status of CATCH?

200 views
Skip to first unread message

Mateusz Łoskot

unread,
Apr 8, 2013, 3:15:37 PM4/8/13
to catch...@googlegroups.com
Hi,

Within SOCI project (http://soci.sf.net), we are
looking to rewrite our tests using one of available
testing frameworks. On the course of lengthy discussion, we have decided [2] to use CATCH.

So, I'd like to ask some obvious questions:

1. What is the current status of CATCH?
Is the wiki [3] up to date?
Should the first release be expected any time soon?
Or, is the code in Git considered as production-ready?

2. Have the big breaking chances arrived yet?
How seriously disruptive they would be?
Shall we wait or can we start using CATCH?

3. For development version of SOCI, we are thinking
about hosting the catch.hpp inside our Git reposiory.
Is this a good idea or perhaps Git submodule is better
option? For release, we will deploy copy of catch.hpp, of course.

4. Considering farer-than-nearer future plans in SOCI,
any plans about mocking techniques within CATCH? Or,
has anyone got any experience with third-party
mocking tools used with CATCH?

[1] https://sourceforge.net/mailarchive/message.php?msg_id=30636351 
or
http://soci.6940.n7.nabble.com/soci-users-Using-a-unit-testing-framework-tt3439.html
[2] https://sourceforge.net/mailarchive/message.php?msg_id=30699061
[2 ]https://github.com/philsquared/Catch/wiki

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net

Phil Nash

unread,
Apr 8, 2013, 3:41:38 PM4/8/13
to catch...@googlegroups.com
HI Mateusz,

Thanks for posting here. Much easier than following up on Twitter!
And thanks for choosing Catch.

I'll try and answer your questions:

1. CATCH is still under active development. It's in everyday use in many places, including a number of banks. I believe it is basically very stable. I'm still working on features, but I now do that on an Integration branch, so if I do break anything it generally gets fixed before going to Master.
My plan is that my next push from Integration to Master will being it up to 1.0! The main thing holding me back is changes in the reporter interface. I want to stablise that before encouraging people to use it (this only impacts you if you need to write your own reporter).
For most purposes CATCH has been "production ready" for some time.
The wiki is mostly up-to-date. It needs another pass (will try to get to that this week), and there are still some big holes. Note that the command line reference is now fully documented within the CATCH executable (run with -? for details).

2. The "breaking changes" you refer to are probably around my plans to change the TEST_CASE and SECTION macros to use differing numbers of arguments, as well as adding tags. Additionally I knew I was going to be changing the reporter interface.
I believe I've been able to make all my macro changes without breaking compatibility. I've done this by (a) deprecating the hierarchical naming style and 2nd arg as description. The 2nd arg can now contain tags, leaving the 1st arg to be the natural language description-as-name. (b) I've introduced variadic macro support (for compilers that support them) so 1 and even 0 argument forms are accepted.
The reporter changes are nearly done, as mentioned. I've included a LegacyReporterAdapter in case you have already written code against the old interface. I don't know how many people have done that, but I don't think it was many.
So. In summary, we're pretty much done with the "breaking changes". Don't let that threat hold you back any more.

3. I used to recommend git submodules, but when I introduced the single-header distribution I realised there was no real need for it (they can introduce their own headaches). Just directly include that header in your project and refresh it manually whenever you want to take the latest, It's just one file, so not much hassle. builds.catch-lib.net has direct links to the latest single header versions, now.

4. No current plans to build mocks into Catch itself. I often use Catch in Objective-C with OCMock and it works quite well. I know some people have tried using it with GoogleMock - with varying success. GoogleMock tends to assume GoogleTest is around too - I think they have some shared dependencies. I've not yet tried any other mocking frameworks. Turtle is high on my list of things to look into!

I hope this answers your questions

Mateusz Łoskot

unread,
Apr 8, 2013, 6:29:15 PM4/8/13
to catch...@googlegroups.com
On Monday, April 8, 2013 8:41:38 PM UTC+1, Phil Nash wrote:
>
> I'll try and answer your questions:
>
> 1. CATCH is still under active development. It's in everyday use in many
> places, including a number of banks. I believe it is basically very stable.
> I'm still working on features, but I now do that on an Integration branch,
> so if I do break anything it generally gets fixed before going to Master.

Sounds good, so there always is a stable version available in Git.


> My plan is that my next push from Integration to Master will being it up to
> 1.0! The main thing holding me back is changes in the reporter interface. I
> want to stablise that before encouraging people to use it (this only impacts
> you if you need to write your own reporter).

I see. Yes, this is a secondary feature for us.

> 2. [...]

> So. In summary, we're pretty much done with the "breaking changes". Don't
> let that threat hold you back any more.

That's very good news indeed.


> 3. I used to recommend git submodules, but when I introduced the
> single-header distribution I realised there was no real need for it (they
> can introduce their own headaches). Just directly include that header in
> your project and refresh it manually whenever you want to take the latest,
> It's just one file, so not much hassle.

Sounds sensible, I'm inclined to host the file then.


builds.catch-lib.net has direct
> links to the latest single header versions, now.

Nice! Not yet JavaScript-like way of doing things, but we're close ;-)


> 4. No current plans to build mocks into Catch itself.

I see.


> I often use Catch in
> Objective-C with OCMock and it works quite well. I know some people have
> tried using it with GoogleMock - with varying success. GoogleMock tends to
> assume GoogleTest is around too - I think they have some shared
> dependencies. I've not yet tried any other mocking frameworks.

I have no experience with gtest or gmock, so good to know.


> Turtle is high on my list of things to look into!

It's high on my list too, so I'll share my experience when I come to test it.

Phil, that's all I needed to know. We're set to start moving our
tests, we don't have detailed timeline, but it should happen sooner
than later, so I will likely be back with questions soon :-)
Thank you!

Phil Nash

unread,
Apr 8, 2013, 7:02:46 PM4/8/13
to catch...@googlegroups.com
Not yet JavaScript-like way of doing things, but we're close ;-)

Give me a chance! ;-)

I do plan to build that out into a full-on landing page for the project. Most people should never need to hit the GitHub page.
But it's a start, as you say :-)

Let me know when you need to do custom reporters. I think the new interface is already stable enough (the big change was towards a more robust struct based interface). It's not documented anywhere yet, of course!

The other thing I forgot to mention that may still be subject to change is if you write a custom runner. If you just want to Execute-Around Catch::Main that's fine, but if you want to instantiate your own Runner and interact with that it may still change yet.

Regards,

[)o
IhIL..
Reply all
Reply to author
Forward
0 new messages