Live data from Hacker News

Browser testing sucks, it's time to start doing it right.

saucelabs.com

1–10 of 18 posts

Re: Browser testing sucks, it's time to start doing it right.

#3
I see a big problems in web testing caused trying to test drive from outside of the browser. I'm currently working on a solution that has tests written in javascript that run inside the browser. The test runner puts your web app into an iframe, so the test code can use jQuery, for example, to easily automate and assert over the UI.

JavaScript also makes creating a very clean testing-focused DSL easy.

I'm hoping to open source the project soon. If anyone would like to know more give me a shout (@andrewdavey).

Re: Browser testing sucks, it's time to start doing it right.

#4
post #2

tldr; "I hate browser testing. Did I fix the problems? No. I started writing opinionated software though, because my opinion should matter. I wrote it in Ruby because I know Ruby."

Hmm, that's not really a considered review.

Straight off, no on at Sauce Labs hates browser testing, that's just a stupid thing to posit.

Test::Right is a really cool mental model of testing, and it's going to make people's lives better. Robust tests, parallelism, immediate cross-browser compatibility (this is an issue people without a lot of experience don't really understand), a lot of cool shit.

I love the promise that if I write my tests in this pattern/framework, my tests will always be good. It's not there yet, but it's still damned cool.

We also have several volunteers who're excited to port this to other languages, but we started with ruby because it's a fertile playground, and the important piece here is the pattern, not the language/framework itself. It'll end up being the flagship browser testing framework de facto, but that's not the goal here.

I played a big part in putting some pieces of Test::Right together, full disclosure.

Re: Browser testing sucks, it's time to start doing it right.

#5

I see a big problems in web testing caused trying to test drive from outside of the browser. I'm currently working on a solution that has tests written in javascript that run inside the browser. The test runner puts your web app into an iframe, so the test code can use jQuery, for example, to easily automate and assert over the UI. JavaScript also makes creating a very clean testing-focused DSL easy. I'm hoping to op…

This is the approach that Selenium 1 took, and there be many dragons down that path. It's workable (we've done a ton of cool stuff at Sauce Labs making it work), but it takes an usual mix of skills and insight to get it to really gel together. Selenium 2 was built with all that mind.

That said, it's not the important part. Selenium (and watir, windmill, etc.) is an execution tool, it doesn't help you avoid some very, very large pitfalls waiting for you down the road. Too often your tests are tightly coupled with the dom, data and selectors are strewn all about, you have manual pauses and timeouts set by someone who left years ago, and you have so many that the whole thing takes two weeks to run (yes, I've seen this a number of times).

Basically, I don't care about the tool to execute the tests anymore. They'll all become interchangeable with Selenium 2 anyway. The much more valuable piece here is in creating tests that are maintainable and a joy to work with.

Certainly best of luck, please be sure to share you experiences and insights! There's always more to be learned.

Re: Browser testing sucks, it's time to start doing it right.

#6
post #4
post #2

tldr; "I hate browser testing. Did I fix the problems? No. I started writing opinionated software though, because my opinion should matter. I wrote it in Ruby because I know Ruby."

Hmm, that's not really a considered review. Straight off, no on at Sauce Labs hates browser testing, that's just a stupid thing to posit. Test::Right is a really cool mental model of testing, and it's going to make people's lives better . Robust tests, parallelism, immediate cross-browser compatibility (this is an issue people without a lot of experience don't really understand), a lot of cool shit. I love the promis…

[deleted]

Re: Browser testing sucks, it's time to start doing it right.

#7
post #6
post #4

Earlier quoted context omitted.

Hmm, that's not really a considered review. Straight off, no on at Sauce Labs hates browser testing, that's just a stupid thing to posit. Test::Right is a really cool mental model of testing, and it's going to make people's lives better . Robust tests, parallelism, immediate cross-browser compatibility (this is an issue people without a lot of experience don't really understand), a lot of cool shit. I love the promis…

[deleted]

Just because you know something sucks doesn't mean you inherently hate it. The US soccer team sucks bad (yes, you all know that) and not because of that, most of you Americans have to hate them, huh?

Re: Browser testing sucks, it's time to start doing it right.

#8
post #2

tldr; "I hate browser testing. Did I fix the problems? No. I started writing opinionated software though, because my opinion should matter. I wrote it in Ruby because I know Ruby."

AFAICT, the whole point of Test::Right is precisely to fix the problems. As for opinion, well, if anybody is qualified to have an opinion about browser testing, it's the folks at Sauce.

Re: Browser testing sucks, it's time to start doing it right.

#9
I think the goal of "impossible to write bad tests" is unreachable. It's like "idiot-proof": impossible because the idiots are too resourceful. I'll be really happy, though, if Test::Right accomplishes "easy to write good tests." Right now, nothing out there does.

I especially like the decoupling of intentions from mechanics. It lets us improve the mechanics without breaking or rewriting all the tests. Maybe the mechanics are implemented with JS DOM-traversal code, maybe it's CSS selectors, maybe it's SIKULI-like image recognition (http://sikuli.org/).

Looking forward to trying it.

Re: Browser testing sucks, it's time to start doing it right.

#10
post #4
post #2

tldr; "I hate browser testing. Did I fix the problems? No. I started writing opinionated software though, because my opinion should matter. I wrote it in Ruby because I know Ruby."

Hmm, that's not really a considered review. Straight off, no on at Sauce Labs hates browser testing, that's just a stupid thing to posit. Test::Right is a really cool mental model of testing, and it's going to make people's lives better . Robust tests, parallelism, immediate cross-browser compatibility (this is an issue people without a lot of experience don't really understand), a lot of cool shit. I love the promis…

"ruby ... it's a fertile playground"

I like this a lot.

Post reply on HN