"I want to write tests, I just haven't found time"
View this email in your browser

Heya folks,

Welcome to issue #4 of Front-end Testing Weekly. It's been a few weeks since I sent one out; sorry about that. Life got crazy busy for me but things are finally settling back down.

Over the past several years, I've heard a common refrain from folks: "We want to do unit testing, we just haven't found time for it."

It's understandable; I've said it myself many times, even recently. Testing is easy to push off. Your code won't break just because there aren't unit tests. The functionality doesn't improve based on your test coverage number.

I think one issue people run in to is the plethora of choices out there.  They get stuck before even getting started, thinking to themselves:
  • Should I use Jasmine, Mocha, Tape or some other test runner?
  • Should I write in BDD, TDD or Gherkin/Cucumber style?
  • Should I use Karma, Testem or The Intern?
  • What level of unit test coverage should I aim for?
  • Should I include my tests next to my scripts, or have them in a separate 'test' folder?
My answer to all of the above is: YES! Yes you should use a framework and write in a style and have some sort of code coverage and yadda yadda. Which one you use doesn't matter nearly as much as you actually using something.

Truthfully, the popular options out there are all pretty awesome. No matter the tool you pick, I guarantee you'll learn amazing things about your code. You may say something like, "Next time I want to try using something different", but you'll never say, "I regret writing those tests".

Testing is as much about catching regressions as it is about finding and eliminating technical debt. It forces you to look at your code and find where functions are doing too much, where documentation is unclear, and where requirements aren't well defined. 

So if you find yourself wishing you wrote tests, just start testing. Pick a tool, don't debate about it, and try it out. You'll learn more about your code in those few hours than you have in weeks.

The Question of the Week

There is no QotW this week, because no one sent one in (again)! Send one in folks!

If you or a loved one has a question about Frontend Testing, send it in to questions@frontendtesting.com (or just reply to this email). 

Recent Twitter Links

The Slack Channel is growing!

Folks are joining the Front-end Testing Slack channel left and right. What haven't you? C'mon, join the conversation, it's free!

p.s. are you interested in Visual Regression Testing? Micah Godbolt and I put together a free 6-day email course on the subject that costs nothing to take.

p.p.s. I'm enamored with WebdriverIO, so much so that I'm creating an online course on the tool. See why I think you should be enamored too.
Share
Tweet
Forward
Copyright © 2016 Kevin Lamping, All rights reserved.


Want to change how you receive these emails?
You can update your preferences or unsubscribe from this list

Follow Frontend Testing
Check out the barebones website