有没有好的ruby测试溯源解决方案?
我正在编写一些 ruby(不是 Rails)并使用 test/unit 和 shoulda 来编写测试。
是否有任何宝石可以让我实现从测试到设计/需求的可追溯性?
即:我想用测试的需求名称来标记我的测试,然后生成未测试或测试失败的需求报告等。
希望这对于 ruby 来说不是太冒险。
谢谢!
I'm writing some ruby (not Rails) and using test/unit with shoulda to write tests.
Are there any gems that'll allow me to implement traceability from my tests back to designs/requirements?
i.e.: I want to tag my tests with the name of the requirements they test, and then generate reports of requirements that aren't tested or have failing tests, etc.
Hopefully that's not too enterprisey for ruby.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
更新:此解决方案可作为 gem 提供:http://rubygems.org/gems/test4requirements
我不知道任何宝石,但你的需求是一个小实验的灵感,如何解决它。
现在是示例:
结果:
如果您认为这可能是您的解决方案,请给我反馈。然后我会尝试用它来构建一个宝石。
与shoulda一起使用的代码示例
Update: This solution is available as a gem: http://rubygems.org/gems/test4requirements
I don't know any gem, but your need was inspiration for a little experiment, how it could be solved.
And now the example:
the result:
If you think, this could be a solution for you, please give me a feedback. Then I will try to build a gem out of it.
Code example for usage with shoulda
使用 cucumber 你可以让你的需求成为测试,没有比这更可追踪的了:)
所以一个单一的需求是一个功能,并且一个功能有您想要测试的场景。
然后,您可以将用 ruby 编写的步骤定义映射到场景
With cucumber you can have your requirement be the test, doesn't get any more traceable than that :)
So a single requirement is a feature, and a feature has scenario that you want to test.
Then you have step definitions written in ruby mapped to the scenario