Live data from Hacker News

Testing at Airbnb

nerds.airbnb.com

31–40 of 58 posts

Re: Testing at Airbnb

#31

Earlier quoted context omitted.

I've been setting up client side testing with grunt+browserify+karma+jasmine lately. It's pretty freaking powerful. But, none of the usual suspects for mocking http.get requests work well with it (sinon fails to execute in a browserify test environment; nock expects to be running in a node environment with the ClientRequest object available).

why is sinon failing to execute in browserify? It's supposed to be stand-alone. Is it being included correctly?

https://github.com/cjohansen/Sinon.JS/pull/358

Longer story:

using npm to install sinon; shimming sinon in my karma browserify plugin config (`'sinon' : 'global:sinon'`)since it doesn't follow CommonJS; using browserify (and the karma browserify plugin) to require('sinon'); sinon is undefined after var sinon = require('sinon'). Might be something up with my config, but none of the other non-commonjs modules I shim (jquery, swfobject) have the same issues.

Re: Testing at Airbnb

#32
Interesting that you guys went with Solano. We used them back when they were TDDium and found the experience to be very bad. There was notable downtime, a poor interface, and a crappy configuration experience (getting environmental variables into it was very annoying). We've been happily with Codeship ever since.

What reasons did you have for choosing Solano? How has your experience been?

Re: Testing at Airbnb

#33
post #7

Pretty interesting that according to him, Airbnb didn't really have a functioning testing infrastructure only a year ago. So you really can hit a billion dollars in valuation without testing :)

Despite of what developers like to think, success is not linked to technical competence. Achieving the former allows you to address the latter.

This should be said on HN more often. No text editor, package manager, or library is going to make you a success.

Re: Testing at Airbnb

#34
post #12

Does anybody have recommendations for where/how to start learning best practices for TDD? As (nominally) top nerd at a tiny startup (2 engineers), I feel like I should set a precedent sooner rather than later for testing. This is currently not possible since I don't know anything about it, so any resources would be appreciated :) Edit: Primarily looking for resources involving Node.js and client-side testing of a jQu…

When writing tests, the key to remember is to write what you wish you had. Othe than that, are you on Express.js? Also, have you ever tried QUnit?

Yes, we're using Express.js. QUnit looks interesting, I think I'll start with it. Is it pretty standard to just have an HTML file that runs all your client-side tests?

Re: Testing at Airbnb

#35

Is pushing directly to master still not disabled to this day?

How would you even disable that in github?

It is very easy to only allow others to pull your repository. It then functions much the same way as an open source project where pull requests are required to get code into the main repo.

Re: Testing at Airbnb

#36
post #7

Pretty interesting that according to him, Airbnb didn't really have a functioning testing infrastructure only a year ago. So you really can hit a billion dollars in valuation without testing :)

Despite of what developers like to think, success is not linked to technical competence. Achieving the former allows you to address the latter.

Or, more accurately, achieving the former allows you to hire 20 engineers to achieve the latter.

Re: Testing at Airbnb

#37
post #12

Does anybody have recommendations for where/how to start learning best practices for TDD? As (nominally) top nerd at a tiny startup (2 engineers), I feel like I should set a precedent sooner rather than later for testing. This is currently not possible since I don't know anything about it, so any resources would be appreciated :) Edit: Primarily looking for resources involving Node.js and client-side testing of a jQu…

Growing Object Oriented Software Guided By Tests is a great book on the topic: http://www.amazon.com/Growing-Object-Oriented-Software-Guide...

Misko Hevery's (also happens to be creator of angularjs!) Testability Explorer blog is also a great resource: http://misko.hevery.com/category/testability-explorer/

Re: Testing at Airbnb

#38
post #34

Earlier quoted context omitted.

When writing tests, the key to remember is to write what you wish you had. Othe than that, are you on Express.js? Also, have you ever tried QUnit?

Yes, we're using Express.js. QUnit looks interesting, I think I'll start with it. Is it pretty standard to just have an HTML file that runs all your client-side tests?

I'd recommend using grunt and karma and avoiding having to list all the files you want to test in an html file.

Re: Testing at Airbnb

#39

Earlier quoted context omitted.

or worse, you can only hit a billion dollars in valuation without testing. (might be a true statement.)

I disagree with this pretty strongly. Somebody posed a similar question in the blog comments, and I think I did a decent job of answering it: http://nerds.airbnb.com/testing-at-airbnb/#comment-13289

you did. Thanks for answering! I'm definitely the one leading the (small) group of devs who test here. Your article was great motivation for our cause.

Re: Testing at Airbnb

#40

Earlier quoted context omitted.

Despite of what developers like to think, success is not linked to technical competence. Achieving the former allows you to address the latter.

Or, more accurately, achieving the former allows you to hire 20 engineers to achieve the latter.

unless you are MtGox
Post reply on HN