views:

225

answers:

2

We are considering using Cucumber for testing web applications (not in rails, most of them are asp.net actually).

The applications are in production, our main goal is to test if everything is fine with the services, from time to time, infra people would run it.

We have two questions:

1) Is this a good use for cucumber? Do community people encourage this use of cucumber feature definitions?

2) We have some captchas in our applications. Is there an widely adopted solution for this common problem?

+1  A: 

Cucumber looks relatively new. I am a Java person and have used Selenium, HtmlUnit, JWebUnit, etc. Selenium runs in .net, ruby, java, and some other scripting languages.

Selenium has been around for a while (2004 whereas Cucumber is relatively new, 2007).

Selenium has an IDE so you can easily record tests in firefox, save them, and then run them in your integration tests.

I am biased towards Selenium, but it does a good job and allows you to test your applications in several browsers (firefox, safari, IE). It also has support for distributing tests across several servers (if your environment is that large, it supports it).

Ideally, you would have developers or the infrastructure people writing the tests. Then if you have a CI server, you could automatically run the tests you have recorded/written, and then continuously check your application still works as a whole. This works really great for catching errors as soon as they happen so if the developer makes a change and breaks something out of his scope, it will be fresh in his or her head.

As far as CAPTCHA goes, there are various libraries out there. I am unfortunately more knowledgeable with the Java equivalent and not so much with the .Net. Don't write your own, there should be a library you can use.

Walter

Cucumber is underpinned by Webrat. Webrat is capable of driving many browser testing tools, including Selenium and Watir.
Rodreegez
A: 

ad 1. in my opinion cucumber is great, also we were able to convince our customers to actually understand and verify the tests we wrote in cucumber. We used cucumber + watir for webtesting

ad 2. as far as captcha goes, do you mean how to ignore the captcha for testing? we do not show captcha for our own ip addresses, you could also always accept a specific value for the captcha if the request comes from your development or test environments ip

Piotr Zolnierek
ad 1. I agree, Cucumber is a fantastic tool for communicating the features of your app to your client. If, however, you are not doing this, then I have found it to be an unnecessary overhead.
Rodreegez
I disagree that it is overhead, because, this way you have a lasting (executable) documentation of your system, which is very valuable on the long term. Developers seem to have very short memories ;) sometimes even after a couple of months, they dont remember which way some feature was supposed to work (especially when the way changed a couple of times during implementation)
Piotr Zolnierek