GUI testing with WebKit and RubyCocoa

Any thoughts on the feasibility of this?

One thing you can't test in Rails is the result of Ajax requests in the context of the source document. The best you can do (as far as I'm aware) is test that the Ajax response is correct and hope the page gets updated. I started thinking...

WebKit (and more importantly JavaScriptCore) is open source WebKit has a Cocoa wrapper You can manipulate Cocoa objects in Ruby via the RubyCocoa bridge

I've seen tools that can inspect the Safari DOM - presumably it would be easier if you controlled your own instance of WebKit.

Based on this, how much work would be involved in creating a framework to test JavaScript in an integration test? Would you have have to replicate much browser functionality to achieve it?

I don't know much Cocoa myself - I haven't used it for a few years. I was hoping to run into someone here with more experience who could tell me if this is practical or just a crazy dream.

Thanks Ashley

} Any thoughts on the feasibility of this? } } One thing you can't test in Rails is the result of Ajax requests in
} the context of the source document. The best you can do (as far as
} I'm aware) is test that the Ajax response is correct and hope the
} page gets updated. I started thinking... [...] } I was hoping to run into someone here with more experience who could
} tell me if this is practical or just a crazy dream.

http://www.openqa.org/selenium-on-rails/

It's there, and it's for more than just Safari/Webkit. It's pretty damn cool, actually.

} Thanks } Ashley --Greg