开发者

What is the current state of BDD in C++?

So I found a few older questions asking about BDD frameworks for C++. CppSpec was recommended as a BDD-style framework, but the framework is not nearly as elegant as RSpec or even googletest.

I also saw mentioning of an article detailing Unit Testing C and C++ with Ruby and RSpec which sounded really interesting. However, the article states that there are a lot of limitations with using this method with C++. Has this gotten any better? If not with Ruby, has SWIG become better at interfacing C++ and Python? Could I then attach something like Cucumber?

The last thing that occurred to me was to use googlemock together with googletest (which I'm already using some for unit testing), though it still doesn't seem as elegant or quick as using Ruby or Python BDD frameworks.

I think the key to making BDD/TDD work is that writing tests should be quick and painless. I'm trying to introduce these and other development methods at work and I may need to convince peopl开发者_如何学Ce that writing tests can be short, sweet, and easy.

Update I just found out about Kross, which might work well because the application uses Qt and targets a Linux environment. Could this potentially be easier/better than SWIG?


Have you taken a look att Igloo?

We don't have nearly as many features as for instance googletest, but we created it with the intention that you shouldn't have to repeat yourself, and we took some inspiration from RSpec and NUnit, and tried to create something pleasant.

Disclaimer: If it's not obvious already, I'm one of the developers behind Igloo.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜