开发者

MSpec and SpecFlow when to use which? What are the advantages/disadvantages of either?

开发者 https://www.devze.com 2023-03-01 09:24 出处:网络
I am trying to get started with BDD and found a view blog posts about MSpec and SpecFlow. I\'m currently not quite sure when I would use which and what the advantages/disadvantages of either framework

I am trying to get started with BDD and found a view blog posts about MSpec and SpecFlow. I'm currently not quite sure when I would use which and what the advantages/disadvantages of either framework are.

Looking at the documentation it seems that MSpec uses the context specification style whereas SpecFlow uses Given/When/Then style. I don't really mind either but I would like to know if there are any pitfalls to watch out for further down the track w开发者_StackOverflow中文版hen the project/test suite grows.

Basically some real world advice/feedback of someone who uses it in their every day work would be great.


So I've used both. I like the mspec workflow in away because its an easier sell for me to speak to users and say.

"When logging in" "I should return to the page I requested"

When I've worked for organisations that have bought more into active collaboration (read agile) I've used the Given When Then pattern. That organisation was used to user stories so they were used to a more rigid style of specification. Also we were using more than one tool to feed the specs into. so the 'text only' feature files could be reused between tools.

In my own projects I use SpecFlow for the 'outside' and 'mspec' for inside of tests. If I was to give someone advice it would be to use specflow if non technical people are writing the outside specs and mspec if a developer is writing the.

Bad points: Mspec is class explosion SpecFlow is a slower workflow Good points: Mspec is a more natural language Specflow is better for reusability for steps.

The bottom line is they work well together.


One disadvantage of mspec is you cannot run in parallel whereas with specflow runner you can. That is a big performance issue.

0

精彩评论

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

关注公众号