Node.js Hands On Lab - T3: TDD Toolbox & Techniques

Instructor Led T3 for Node.js: TDD Toolbox & Techniques for Node.js with Niall O'Higgins (+ Special Guests)

Space: Limited to 30 spots.  I'll open 10 this week.  15 next week, and the rest over the week of.  As usual, no waitlist.  Since this is a highly interactive hands on event, we will be keeping it small and manageable.

Requirements for signup:  When we open signups, we will open the list to 30 participants.  Every participant should have a real life project to bring to the class (not to share necessarily) to use as part of the TDD workshop.  You need something to test.  It's better if you have a real world project or work thing to bring use as we go through the lab.   Sorry for the limited space, but it's a necessity to keep the groups at manageable size when doing hands on training.  If this goes well, we'll add some new hands-on lab sessions over the summer.  Niall and I will provide a Node.js Vagrant box for easy set up for those who don't already have a Node.js dev environment.  For everyone else, we'll probably offer something up on Github to start from (Details coming soon)

 

Lab Agenda

Before 0) Eat - Food will be there.

0) Brief Word From Our Sponsors

1) Short introduction to TDD (what is the work flow, how it is
helpful, unit vs integration vs functional tests at a high level)
2) Introduction to Mocha test runner / framework. Where it expects
tests, how to run it from the CLI, integration with "npm test" via
package.json
3) TDD vs BDD test "styles" in Mocha
4) Basic assertions via node "assert" module
5) More advanced assertions via Chai http://chaijs.com/
6) Mocking with Sinon.JS
7) Dependency injection with node-sandboxed-module
8) Continuous Integration to run tests on every commit


Looking for one or two more TDD/JS experts to assist in the training (contact me).

Join or login to comment.

  • Doug May

    I think it was a great effort toward the stated goal, and I got a lot out of it. As a relative newb to modern testing frameworks and practices, it was a crash course, and I stumbled more than once on the installs, but I think I ended up with a complete working environment, and some notion of how to start testing my project, although as an historically "test-second" business analyst and architect, I still have some key missing concepts and guidelines to get me going with test-first development on this new project, which is what I was hoping to come away with. I have some links I can research, and I may end up posting some questions. A number of the special guests contributed very useful examples, perspectives, and clarifications, so I'm grateful to them as well as Niall and our hosts Tagged and sponsors.

    May 24, 2012

  • Truedat

    Thanks again to the speaker and to the sponsors. If anyone has pictures from the event, please send them over and I will post them.

    May 23, 2012

  • Truedat

    Great speaker and I learned quite a bit about new libraries that have been on my TDD radar. Also helpful were audience members who had quite a bit to add to the topic and this really helped set the stage for Node TDD beginners to go out and do some testing.

    May 23, 2012

  • Forrest L Norvell

    Niall did a great job with his presentation and Dave and the folks at Tagged did a good job framing the event. It would have been nice to have more structured time afterwards to workshop and hack, and if there had been fewer seats and more tables.

    May 23, 2012

  • Niall O'Higgins

    If anyone has a few minutes before we start, I added a "further reading" section to the bottom of the Github page. It contains links to the docs for the various tools we'll be using. https://github.com/niallo/nodejs...­

    May 22, 2012

  • Doug May

    I must have missed the virtualbox instruction. on bus, slow WiFi, so will pick up at 6:30. I'll try getting both working, falling back to whichever is up first.

    May 22, 2012

  • Truedat

    Note, food will be served at 6:30.

    May 22, 2012

  • A former member
    A former member

    Doug, did you install Virtualbox? That is a requirement for vagrant as per the error message you received.

    May 22, 2012

  • Truedat

    @ all, if you plan to install Vagrant, be sure to also install the VirtualBox binary, available for free from the friends at Oracle. The package installer for Virtualbox on Windows and Mac is easy to use. Linux should be installed using the appropriate version for your CPU and Linux distro version. OpenSolaris/Illumos users, if you are out there, send me a DM and I can help you through that set up.

    May 22, 2012

  • Doug May

    Retried vagrant up but choked on not finding virtualbox (not installed):
    C:\Users\DougM\nodejs-testing-work­shop>vagrant up
    Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.

    Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
    this to be available on the PATH. If VirtualBox is installed, please find the
    `VBoxManage` binary and add it to the PATH environmental variable.

    May 22, 2012

  • Truedat

    @Doug, if you want to just use your native windows setup, then don't use the ruby shell. If you want to go through with the vagrant setup (might be easier in the long run), you can use the ruby shell and run "vagrant up"

    May 22, 2012

  • Doug May

    ok now in workshop dir/app, ruby prompt, but not in node, "npm install ." works. see you in a while.

    May 22, 2012

  • Doug May

    hmmm.... ok; from "ruby" window goto nodejs-lab folder and run node and then "npm install ." but get same 3-dot prompt with no obvious action. Have to shower and pack up shortly. for git pull I use original git clone command with pull instead of clone? yep -- newb here, but I do have working installs of ruby, github, and node, so I assume I can get it sorted early in the workshop

    May 22, 2012

  • Truedat

    parking: plan on showing up a bit early if you need free street parking. Parking is tight in that area. Garages should be available but just take into account extra time for parking.

    May 22, 2012

  • Truedat

    Either way folks, if you already have a good dev environment, you can ignore the Vagrant set up step and instead just skip to the install of the project requirements 'npm install .'

    May 22, 2012

  • Truedat

    @Doug, can you pull and retry? Also, the commands for vagrant should be run from a "ruby" shell prompt.

    May 22, 2012

  • Truedat

    @Doug you are getting extra credit for doing the homework before class. The Vagrant dist exists for people who don't have a fully baked node.js dev environment. I realize that won't be most people in class. On the other hand, we don't want to push anyone to messing with an existing dev environment that may be fragile. Vagrant should help. Let me push a possible fix for your issue.

    May 22, 2012

  • Doug May

    p.s. Also not clear which need to be done from regular command prompt in win, and which need the ruby and rails command window.

    May 22, 2012

  • Doug May

    Vagrant installed and git repo cloned. "vagrant up" hits error:

    C:\Users\DougM\nodejs-testing-work­shop>vagrant up >> dm-vag-err.txt
    C:/Users/DougM/nodejs-testing-work­shop/Vagrantfile:1:in `<top (required)>': unin
    itialized constant Vagrantfile (NameError) from C:/vagrant/vagrant/embedded/lib/ru­by/gems/1.9.1/gems/vagrant-1.0.3/
    lib/vagrant/config/loader.rb:115:i­n `load' from C:/vagrant/vagrant/embedded/lib/ru­by/gems/1.9.1/gems/vagrant-1.0.3/
    lib/vagrant/config/loader.rb

    May 22, 2012

  • Doug May

    OK. I read back up the stack and spotted the Vagrant VM note, so I'm now downloading and installing that (for Win7/32). I already have node installed, and npm mocha gave me a 3-dot prompt, so I'm not clear if the VM is for the complete testing lab and sandbox or if I should continue with chai and sinon in my regular environment, or both.

    May 22, 2012

  • Doug May

    Where can I find the questions you asked when I registered, along with my answers (so I can make sure I'm ready with what I said I would have)?

    May 22, 2012

  • Niall O'Higgins

    Hi all,

    Please check out this Github repository with a quickstart guide for this evening. It has a Vagrant VM which makes it trivial to get Node.JS, NPM and Mocha installed - and a skeleton project with all the testing-related modules as dependencies.

    https://github.com/niallo/nodejs...­

    Setting up the Vagrant VM takes a while as it involves downloading hundred of megabytes of software, so please do it before coming to the workshop to get the most out of the time we have.

    May 22, 2012

  • A former member
    A former member

    @Ariel Jakobovits

    There's free street parking after 6 pm and a public parking lot on Front and Broadway.

    See you here at Tagged soon!

    May 21, 2012

  • A former member
    A former member

    any tips on parking at the event?

    May 21, 2012

  • Truedat

    Also, interested in connection with other 'Makers' out there who'd like to hack on Node.js for embedded devices and build stuff, so please send me a DM if that's you. If there's enough stuff people have built, we can have this as a meetup topic at some point, but otherwise, might be a good spinoff project.

    May 17, 2012

  • Truedat

    Folks, lots going this weekend (maker faire ... it can be very tiring event) and next week (HTML5 dev conference). Please check your calendar and make sure you are still a 'yes' and not a 'maybe'. If it's maybe, please exercise non-sanfranciscan courtesy and release that spot to someone not yet on the list. Thanks!

    May 17, 2012

  • Truedat

    @Ariel - thx, send me dm if you'd like to discuss before event.

    May 17, 2012

  • Niall O'Higgins

    Hi everyone,

    Looking forward to meeting you all and doing this workshop! We just put out a related blog post about some of the stuff we'll be covering in-person next week. If you'd like to do some relevant reading about TDD and Node.JS in advance of the class you can check it out here: http://blog.beyondfog.com/testi...­

    May 16, 2012

  • A former member
    A former member

    @Truedat I made it onto the list. Let's chat about AV that night.

    May 16, 2012

  • Truedat

    @Ariel - we've tried in the past but unless the host has a good AV person in house, we're not pro enough to do a good job with this and make it realtime. If there is a volunteer to do this, I'm happy to open the door for anyone who can help. Otherwise, I'd suggest we do a Tweetup and use the #nodessjsf hash tag or something reasonable to send questions in realtime.

    May 16, 2012

  • Truedat

    @Forrest spots are open! Move fast.

    May 16, 2012

  • A former member
    A former member

    Can you broadcast this online so we can follow along, even if we can't ask questions??

    May 16, 2012

  • Forrest L Norvell

    I know the session is full, but I've been doing pretty much nothing but writing code with Mocha and should.js for the last few months and would be happy to help out. I could also give lightning talks on working with node-phantom and / or node-inspector, tools that have been very useful for sticking to a TDD flow. Let me know if you're interested.

    May 16, 2012

Our Sponsors

  • StrongLoop

    Food, drinks, and bringing speakers in with enterprise-grade experience.

  • Flite

    Flite is sponsoring food and drinks, speakers, and space for us.

  • Razortooth Communications, LLC

    Food and organizing logistics for all Node.js++ Meetups.

  • Joyent

    Node, Cloud, Drinks, Food, and some great speakers.

  • g33ktalk

    Recording meetups and promoting them on their website.

People in this
Meetup are also in:

illustration

Getting a Meetup Group started is simple

We'll even help you find the right people to join.

Start a Meetup Group

Log in

Not registered with us yet?

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