Alternative to Capybara for Specflow - cucumber

I am planning of using Specflow for .NET. I come from a RoR background, and I have used Cucumber and Capybara. From what I have heard, Specflow is similar to Cucumber; however, does it have features that Capybara provides?
Thanks!

Coypu is the answer, I think: https://github.com/featurist/coypu

I ended up using Watin engine to simulate browser. Watin runs mainly on IE.
In some occasions, I do not need the overhead of launching an entire browser to run my specflow tests. In those cases, I use SimpleBrowser (headless browser).

As I understand it Capybara is using Selenium as the web driver. You may want to check out an article on developers who are using Selenium with SpecFlow.
http://blog.jsolutions.co.uk/?p=112

Related

What are the benefits of using Chromeless and Puppeter Over Selenium?

We are looking to replace our Selenium approach to automated web data collection and have been recommended Puppeteer or Chromeless.
One of the things I like is the ability to go headless with chrome running on AWS lambda. That reason was sold as the main reason for going with Chromeless or Puppeteer. However, I see posts online indicating that the same can be done with Selenium. If that is true, what over advantages do Chromeless and Puppeteer offer over Selenium ?
We are going to be using NodeJS
Having used both Selenium and Puppeteer, these would be my observations as to why it's currently being recommended so highly:
Puppeteer is really easy to configure and execute. No setting specific drivers required. Just write your test scripts, point node towards your scripts and watch it go. Everything even runs in parallel!
It's a zero setup framework in that it comes bundled with the version of Chromium which it runs best with.
Another benefit is speed. Puppeteer is really fast since it uses headless Chrome.
It integrates very nicely with other popular test frameworks such as jest and mocha.
Using Puppeteers API is really straightforward. Everything is simple to write, easy to understand and basically allows for simple user interactions to be automated using a single line of code.
It's really easy to debug your automation scripts. Simply set headless to false and turn slowMo up from 0 to, say, 250 and you can easily see what's going on and fix any problems you may have.
It's easy to pick up and use no matter what your previous experience levels: on the team I'm working on, everyone (even those with no real automation test script writing experience) has found working with Puppeteer a really nice and relaxed experience. Everyone is getting the grasp of it within a few minutes of basic research and getting scripts running quickly and with no hassle or stress.
It should be noted that Selenium does do everything that Puppeteer does (and vice versa) but that's not the point of Puppeteer. Puppeteer allows for a team to build a large library of automation scripts very quickly using an easy to use API and get tests running now rather than having to deal with building ultra-robust test frameworks which work cross browser and / or cross device.
If you really must have cross browser testing then Selenium or perhaps InternJS (a personal favourite of mine) are still the choices to make.
Puppeteer only supports executing tests on Chrome but, at the end of the day, it's much better to have a lot of tests running (even if it's just on Chrome) as opposed to having none.

can we automate silverlight screens using watir?

Can we automate silverlight screens using watir? On the home page of watir, it's written that watir can automate any web application no matter what platform it is built on. But I read that it doesn't support applets or microsoft silverlight. Please help me regarding this. If we can automate silverlight screens, then please tell how?
No, watir can not automate anything inside browser plugin.
Content inside plugins such as Flash and Silverlight is not really exposed inside the DOM and so is difficult to test with Watir. However there are other tools you can use in combination with Watir such as Sikuli (use Jruby in that case to run watir, cucumber etc and use them in combination with Sikuli which is java based)

Cross browser automated testing - not able to retrievie element from document using sourceIndex

We have some dll written for retrieving/identifying an element from a document. The dll is written in C++ and was written very specific to IE. The logic to retrieve use the sourceIndex concept. Now we want to increase support for FireFox and Chrome, but unfortunately sourceIndex is not supported for these browsers. So do we have any other way using which we can retireve which is similar to sourceIndex for FF and Chrome. Any help will be highly appreciated.
You have several great options for good cross-browser testing. You can look to Selenium WebDriver, a very powerful, widely used driver. There are implementations in all major languages so you're covered for Ruby, Java, Python, and .NET.
I'd also like to recommend Telerik's Test Studio which is a commercial tool that does a great job with all aspects of web automated testing -- cross-browser support is particularly good. Please note that I'm biased since I'm their evangelist for the tool. :)

Development environments for google-chrome-extension

Currently I am coding my google-chrome-extensions using a combination of notepad and the chrome console. I am 100% sure that there is a better way of programming these extensions. What environments are people using?
I'm using Notepad++ which works beautifully.
You might consider trying the crossrider beta to build cross-browser extensions. I've found the experience on Chrome superb so far.
Your preferred IDE (eg. NetBeans) and Google Chrome (you have to test on something, right?).
You might want to check:
NetBean 7.0 (They have a great version for web development that let you write HTML,CSS and JS with all the great code sniff/highlight/complete stuff)
Eclipse got some good version for web dev (PDT and others).
Notepad++ , UltraEdit, TextPad or any other good editor you like.
As for the debug, profile and test mode - you have the developers tool in Chrome that are excellent. You might want to check out this short video that give lots of useful tips:
http://www.youtube.com/watch?v=nOEw9iiopwI
Good luck!

Rails Integration Testing

I'm looking to set up a bunch of integration tests for an Rails 3 app that is already built.
The app is built with Rails 3 and Ruby 1.9.2. I've seen recommendations for Capybara, Cucumber and RSpec 2 but I'm not sure what the advantages of each are.
I've also noticed that they seem to be closely tied together. The post I've seen always seem to talk about using Capybara with Cucumber, or using Rspec with Cucumber.
What are the advantages/disadvantages for each of them? Are there certain combinations that work best together?
All these test tools fall in different parts of the testing environment.
If you want to set up integration tests, then you should use Cucumber because it has no real alternative. Cucumber is designed to easy Behaviour Driven Development but even if you don't BDD it is perfect for integration testing.
Capybara mission statement is "webrat alternative which aims to support all browser simulators". So to simulate the browser part (http request, DOM manipulation, etc) you have two alternatives Webrat or Capybara. Cucumber integrates fine with both of them. In fact it detects which one you have installed in your system and by default uses it.
On the other side is Rspec. Rspec is not a tool for Integration Testing but for Unit Testing (with a BDD approach). In http://www.pragprog.com/titles/achbd/the-rspec-book it is explained very clearly. Cucumber is in an outer circle of application behaviour and rspec is in an inner circle of class behaviour. The alternative to rspec is classic Test::Unit classes.
For more information see:
Cucumber
Capybara
Webrat
RSpec
Test::Unit
In summary, use all three.
Use RSpec...
...for testing methods in your models, controllers, and helpers in isolation.
Also known as Unit testing.
Use Cucumber...
...for testing high level features of your application.
Also known as integration testing. Verifies that all the pieces work together.
Good for testing from a user's perspective.
Use Capybara with Cucumber...
...for navigating your app like a user would through the browser.
...for testing your views contain the content that a user would expect to see.

Resources