Two Talks on Unit Testing

This time we have two talks on a very important subject: unit testing!

 

Unit Testing for Great Justice with Domenic Denicola

The discovery of unit testing and test-driven development was one of the most important parts of my growth as a developer. The ability to write simple, small pieces of code that could verify the behavior of my application was in itself quite useful. And the ability to refactor without fear, just by running the test suite, changed how I program. But the real benefits come in how unit tests shape your application code: more testable code is often more well thought-out, more decoupled, and more extensible.

In this talk, I'll give a whirlwind introduction to unit testing as a concept and as a practice. I want you fully convinced it's the best thing to happen to software development, if you aren't already. Once we're on the same page there, I'll take a deep dive into what makes a good unit test. This involves testing tools such as spies, stubs, and mocks, concepts like code coverage, and practices like dependency injection that shape your application code. The most important lesson will be on how to focus on singular, isolated units of code in your testing, as this guides you toward building modular, flexible, and comprehensible applications.

 

Client Side Unit Testing for Single Page Applications with John K. Paul

The unit testing web developer population, in general, has been growing by leaps and bounds, but sadly those gains haven’t been as steady on the client side.  I’d like to address a few of the reasons why that is, and how we can change that by unit testing our client side application code as thoroughly as possible.

Most unit testing examples focus on very straightforward imperative tests. I have seen many explanations of JavaScript unit testing that describe how to verify the logic behind a calculator or a form validation library, but not how to test a more complex, event triggered application.  I’ll walk you through a simple unit tested Backbone application and explain some design tips for effectively unit testing your code along the way.  After that, I will explain how to effectively mock Ajax requests and trigger Ajax events from your unit tests.

I will also be giving a short introduction to the grunt build tool. I’ll show you how to setup grunt in such a way that your test output can be easily integrated with your continuous integration suite as well as run every time you change a file.  Hopefully, eventually, we’ll all be able to have the confidence inspired by the green and red lights on a build monitor, on both sides of the great HTTP divide.

 

We expect lots of conversation and back-and-forth on these topics, so come prepared to share your opinions and experiences! And please join us for discussion of all things HTML5 over drinks afterward.

Finally, thanks to Facebook NYC for generously hosting us this month!

Join or login to comment.

  • John K. P.

    Thanks @Jeremy for posting those links.

    If you have any questions or thoughts on unit testing, please feel free to reach out to me. I'm on freenode all day as johnkpaul.

    I'd really appreciate if any of you could rate my presentation. This talk is up on Speaker Rate: http://speakerrate.com/talks/15...­ Thank you!

    August 21, 2012

  • Domenic D.

    Here are my slides!

    http://www.slideshare.net/domen...­

    You can get a PDF version from the "Save File" link in the upper-left.

    August 21, 2012

  • A former member
    A former member

    Can someone post a link to John Paul's slides? I know that there was mention of them but I didn't catch the URL.

    August 21, 2012

  • Lex D.

    Amazing talks, both presenters rocked the house. So much new information. They made unit testing look easy and natural. Will implement for sure.

    August 21, 2012

  • A former member
    A former member

    Great meetup! Both talks were very polished and informative. I like how the two talks contrasted each other in style. It's nice to understand different methods when you're learning a process. Sad that I had to leave a little early.

    August 21, 2012

  • John M.

    Great talks by Domenic & John Paul. Domenic can you post your slides for us to download? Looking forward for the next talk.

    August 21, 2012

  • John O.

    Both of the presentation were very informative and well presented. Each speaker clearly knew their stuff and had well thought out opinions on how to approach unit testing. I really appreciate the effort they made preparing and delivering this for the community.

    August 21, 2012

  • Matt D.

    Bravo! Presenters were well prepared and very knowledgeable on the topics.

    August 21, 2012

  • Janice K.

    Informative.

    August 20, 2012

  • Vikki

    Thanks guys - really well presented + interesting to hear about other people's experiences of unit testing, esp. in js. Definitely gonna check out sinon + chai.

    Cheers, The Annoying Girl Asking About Bunyip :)

    August 20, 2012

  • Chris B.

    First talk was very compelling and easy to digest, although "theoretical" Second talk actually had more to apply but there was a lot of code per slide. I think they complimented each other well, however. One thing that might have been nice is a common thread such as mocha. The transition to qUnit made it a bit harder to follow the examples because the talks didn't exactly build on each other. Altogether great talks and well worth the time

    August 20, 2012

  • Samuel H.

    Awesome meetup

    August 20, 2012

  • Sam E.

    This was really useful. The content was great, perfect level of detail and good interaction with group. I feel that a I learned a lot of great stuff.

    August 20, 2012

  • Samuel H.

    Testem is another cool little application for testing your code while you write it. The bonus is that it will run your tests on as many browsers as you connect to the server https://github.com/airportyh/­

    Not as fully featured but I found it useful.

    August 20, 2012

  • A former member
    A former member

    Oh wait. There is free beer. False alarm!

    August 20, 2012

  • A former member
    A former member

    Free food, but no free beer :(

    August 20, 2012

  • A former member
    A former member

    I can not make. just changed my rsvp. Is this being recorded?

    August 20, 2012

  • Domenic D.

    This just in: there's free food!!

    August 20, 2012

  • Samuel H.

    If anyone isn't going tonight, please update your RSVP!

    August 20, 2012

  • A former member
    A former member

    Domenic & John Paul in one night? At Facebook? I'm in!

    August 3, 2012

  • Matt D.

    Any chance we can reschedule this? There's already a hardcoreJS meetup scheduled (http://www.hardcorejs.com/event...­) and I have to assume a lot of the same people belong to both groups.

    August 3, 2012

    • Domenic D.

      Argh, I missed that one. But no, it's pretty hard trying to schedule two speakers plus the venue plus not conflicting with the other groups... At some point you just have to pick a date and go with it. Sorry!

      August 3, 2012

People in this
Meetup are also in:

Create a Meetup Group and meet new people

Get started Learn more
Henry

I decided to start Reno Motorcycle Riders Group because I wanted to be part of a group of people who enjoyed my passion... I was excited and nervous. Our group has grown by leaps and bounds. I never thought it would be this big.

Henry, started Reno Motorcycle Riders

Start your Meetup today

Act now and get 50% off.
Until February 1.

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy