2014-05-21 19:00:00 UTC

Specflow vs Selenium


What are the pros and cons of Specflow vs Selenium?

I'm evaluating Specflow vs Selenium. Our project involves development/test efforts leading to a Web application (.net) that interacts with a windows application (Windows Service) to ultimately communicate with a field-deployed device (such as a handheld vending machine, traffic camera and similar transportation/fleet devices). 

We would like to have a suite of nUnit test code bases, most preferably integrated with a UI-enabled test tool. 

Guest
55 Answers

author avatar
Vendor

Hello fellow members of this community,

Thanks so much for your suggestions. I hadn't proceeded with my automation plans since the posting of this question but now I am having to make a decision and accordingly coming back to the enquiry only now. It is interesting to note that there appear to be two schools of thought a) Use Selenium and b) Use Spec-flow with the a) line of suggestion stemming primarily from lack of exposure to Specflow possibly because its use is still not widespread. We do have a requirement to maintain reusable framework suitable for repeated regression testing. The idea is to integrate the framework to our agile-delivered incremental builds of the windows application so that sanity test scenarios will be automatically run during installation of every new version. So I may just go with SpecFlow.

Ian, just to clarify why we are not comparing apples to oranges, pls note that the journey that we envisage for the tool to make is to execute unit test codebase before and as part of navigating across different pages/features of the application driven purely by a record and playback-based actions. Both Specflow and Selenium seem capable of doing that as a nUnit developed codebase could be invoked from the test tool UI.

2014-06-14 08:34:16 UTC
author avatar
Vendor

Specflow and Selenium are really targeted at different requirements so difficult to make a meaningful comparison. (Sort of like comparing a car and a boat.)

· Nunit - make sure the code does what it should.

· SpecFlow - make sure that the individual user requirements (features) are met.

· Selenium - make sure that the user journey is correct.

2014-05-26 15:15:12 UTC
author avatar
Consultant

Hi,

SpecFlow is a .NET based testing tool and follows the BDD methodology from
the start, as it employs Cucumber to create and deliver results. As you
have mentioned that you are going to test on an application built on .NET,
this would suit your purposes nicely, as the developers themselves will
also know how to handle and work on any issues with the tests and can
incorporate them into their Unit tests also.

Selenium is a robust and stable framework for creating tests and can be
overlaid with Cucumber along with other xUnit test frameworks to provide
you with the same set of functionality and features. The only difference
here is that SpecFlow already contains the required features and
functionality.

Overall, if you wish to ease work and also have a maintainable framework
for future use, I would recommend you to SpecFlow with Cucumber over
Selenium with Cucumber. They have a good site with all the required forums
and FAQs and a sensible community for feedback and solutions.

Selenium is a good framework, and if you have prior experience with it then
it makes better sense to use it, but if not, pick up SpecFlow for your .NET
application testing.

UI with Web and App tests can all be easily created and integrated within
the SpecFlow tests.

Cheers

2014-05-25 01:45:06 UTC
author avatar
Vendor

I haven't used Specflow so cannot compare it with Selenium.

Selenium is good for testing web applications i.e. applications accessed
via web browser. And for writing unit test cases, I would say use TestNg as
it has some more advance features than JUnit e.g. concept of data provider.

Essentially, use the TestNg framework to write both, UI tests (selenium
webdriver) and unit tests.

Hope this helps.

2014-05-22 17:23:21 UTC
author avatar
Vendor

Selenium is a very popular scripting language today and what most people are using. That will do what you want. To automate the tests and also repurpose for performance there are tools like Appvance that do this with Selenium.

2014-05-22 14:59:33 UTC
Find out what your peers are saying about Apache, Micro Focus, Neotys and others in Performance Testing Tools. Updated: May 2020.
419,794 professionals have used our research since 2012.