Are there any good mutation testing tools for ruby 1.9 and RSpec2?

半世苍凉 提交于 2019-12-03 09:47:59

问题


I used to use Heckle, but it is incompatible with ruby 1.9 because of issues with ParseTree. I've looked for alternatives, but the only thing that looked promising was Chaser, and that did not have any clear documentation that I could use to see if I could make it work with RSpec. It seems to have Test::Unit dependencies.

So - is anyone out there using any cool tools to really check the quality of your tests?

Alternatively - are there any coverage tools that provide better than c0 coverage? This would kind of help solve the same problem. I'm using cover_me at the moment, but it is c0, like rcov.


回答1:


Have you looked into the Mutant gem?

It works with Rspec.

There is a nice tutorial here

$ gem install mutant-rspec

$ mutant -I lib -r your_library --use rspec "YourClass#method_to_mess_with"



回答2:


Chaser also works with a mutation testing framework exemplor: exemplor-chaser.

Unfortunately, the creator of chaser has the attention span of a goldfish and isn't maintaining it any more. He's kind of interested in mutant, and also in seeing if heckle can be modified to use ruby_parser rather than ParseTree.



来源:https://stackoverflow.com/questions/8252826/are-there-any-good-mutation-testing-tools-for-ruby-1-9-and-rspec2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!