Zero to Testing in JavaScript Basics of testing in JS.

Slides:



Advertisements
Similar presentations
Google Confidential and Proprietary Succeeding with Behavior Driven Development (BDD) Testing and Automation Seattle Area Software Quality Assurance Group.
Advertisements

Behavior-Driven Development
EXtreme.NET Dr. Neil Roodyn. eXtreme.NET Who is Dr. Neil? MISSION: To increase the value of your Software Business Working with software for way too long.
Mozilla Technologies Sept. 30, History of Mozilla Mosaic -> Netscape 1.0 -> Netscape 5.0 Netscape 5.0 was announced to be an Open Source project.
With Mocha and Karma Telerik Academy Telerik Software Academy.
Testing for the web and some other stuff. A BIT ABOUT ME Jonathan Director at Ocellics Software Solutions Studied at UCT and have a Honours in Information.
Designveloper BDD Training October 2 nd – October 3 rd, 2014 Hung Vo - CEO.
* Who Am I? * State of the Room? * Ways to test Javascript? * Different Testing Environments? * Overview of Testing Tools * Using Testing in your Workflow.
Programming with eyes wide open. Your host today Subby Angelov Team
Agile Development in Action Applying agile development practices to connect a blog with LiveWriter by: Mike.
Test-Driven Development “Test first, develop later!” –OCUnit.
Learn how SpecFlow enables you to do TDD with friction-free plain-English executable tests. Larry Apke Agile Expert
Test-Driven Development Gary Brown Building better software one test at a time.
CZ Biz. Auto. System & Test-Driven Development Teoman Soygul (Sept 24, 2012).
By for Test Driven Development: Industry practice and teaching tool Robert Vanderwall, Ph.D. 1 WISTPC-15.
Programmer Testing Testing all things Java using JUnit and extensions.
Test Driven Development TDD. Testing ”Testing can never demonstrate the absence of errors in software, only their presence” Edsger W. Dijkstra (but it.
© 2014, Glarimy. All rights reserved. G l a r i m y.
Testing in Extreme Programming
Jasmine Testing Framework. What’s Jasmine For? Framework for Test Driven Development Designed around acceptance testing Works in any environment (with.
Meet the Parents & Meet the Findley (Mr. F.) Introduction to English With Mr. Findley.
© ALEXANDRE CUVA  VERSION 2.00 Test Driven Design.
Test Driven Development Arrange, Act, Assert… Awesome Jason Offutt Software Engineer Central Christian Church
SGHS Mentor Training Items to Cover Purpose of Mentors Confidentiality Skills needed for Mentors  Empathy  Attending Skills  Questioning Goals.
Who are we?. What do we do? Fulfillment Optimization.
AngularJS & Git Workshop Made by: Nikola Novakovic.
JavaScript Unit Testing Hanoi PHP Day
JS Frameworks Course Program, Evaluation, Exams Doncho Minkov Telerik Software Academy academy.telerik.com Senior Technical Trainer
Future Media  BBC MMXI TDD at the BBC David Craddock, Jack Palfrey and Tom Canter.
A Practical Guide To Unit Testing John E. Boal TestDrivenDeveloper.com.
Telerik Software Academy Software Quality Assurance Binding business requirements to.NET code.
CSCA48H Style and Testing. 2 Style The Zen of Python: import this Do the Goodger reading!
Week 14 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Test-Driven Development Eduard Miric ă. The problem.
Using Test Driven Development Jon Kruger Blog: Twitter: JonKruger.
Dave Lloyd Unit Testing in the Real World.
1 Presentation Title Test-driven development (TDD) Overview David Wu.
Software Testing 1Software testing. V model Software testing2.
HOW AND WHY TO LOVE CUCUMBER By Dana Scheider. Is This Your Programming Experience?
Unit Testing in JavaScript with Mocha, Chai and Karma SoftUni Team Technical Trainers Software University
Alok Guha Unit Testing Framework for JavaScript.
* Who Am I? * State of the Room? * CF API * Ways to test your API? * Overview of Testing Tools * Using Testing in your Workflow * Installing Jasmine *
JavaScript Unit Test by MinHo Kim (Dexter Developer Guide)
Automated Testing in Sakai Testing applications and services in isolation and in context Josh Holtzman, UC Berkeley David Haines, University of Michigan.
Automated Testing with PHPUnit. How do you know your code works?
Remote Dev/Test Pairing Dawn Cannan and Franz Pereira Agile Tour 2010 October 28, 2010.
UNIT TESTING IN ANGULARJS Dhananjay
Ognjen Bajić Ana Roje Ivančić Ekobit Efficient Application Testing.
TDD Unit tests from a slightly different point of view Katie Dwyer.
Using React, Drupal and Google Chrome to build an interactive kiosk + + =
Test-Driven Development
Unit Testing with Mocha
Accessibility into Automation
Introduction to Unit Testing in JavaScript
Techniques and Practices for Testing Angular
Test Driven Development
Error Handling Unit Testing with Mocha
Test Driven Development 1 November Agenda  What is TDD ?  Steps to start  Refactoring  TDD terminology  Benefits  JUnit  Mocktio  Continuous.
3 Things Everyone Knows About Node JS That You Don't
Unit Testing in a Team Sparkhound Presents by Steve Schaneville
React Revived Web Driver IO for Testers
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
History, Characteristics and Frameworks
Prove to your boss your database is sound - Unit Testing with tSQLt
Intro to Unit Testing with tSQLt
Selenium vs Protractor
Lightning Component Testing with Jasmine Jasmine is a behaviour-driven development framework - that is used for the purpose of testing Javascript code.
How to get rid of Obsession?
You’ll get better code in less time (If you do it for a while)
Telerik Testing Framework
Presentation transcript:

Zero to Testing in JavaScript Basics of testing in JS

About me Software developer for Xfinity.com Online: Co-organizer of Philadelphia JavaScript Developers Testing fanatic

Agenda My testing story Writing your first JavaScript test Testing frameworks Working testing into your workflow

My testing story

My Testing Story Code Retreat TDD Pairing Throw-away code Testing at work Now: test coverage drops break the build

What’s the deal with testing? When you break it, it breaks! Secondary line of documentation defense Design tool

What do you call code without tests? Legacy code.

Testing front-end code The debt in your /js folder Front-end code has logic too! If you have logic, you need tests

BDD/TDD Behavior Driven Development Test-Driven Development “Write tests to inform how you write your code” BDD: Describe, it, before, after, beforeEach, afterEach TDD: Suite, test, setup, teardown

Test Ever vs. Test Never

Writing your first JavaScript test

Setting up your base Writing the test* Making it pass* * The order of these is debatable

Jasmine jasmine.github.io Download a standalone version on GitHub from pivotal/jasminepivotal/jasmine Or use RubyGems for a Ruby environment

Mocha visionmedia.github.io/mocha Node! npm install –g mocha

Anatomy of a test Describe [thing you’re testing] It [does something you expect it to do] Rinse and repeat.

Example test walk-through with Mocha

var assert = require('assert'); describe("An area of my application", function() { it("should know that 2 and 2 is 4", function(){ assert.equal(4, 2+2); });

Testing concepts: Unit testing Test your code

Spies, stubs, and mocks Spy: an object that records its interactions Stubs: fake objects Mocks: fake objects with expected behavior Generally, you can SPY on a function, STUB an object, and MOCK a service.

Live coding? Write a test with me!

Testing Tools

Test describers Jasmine Mocha QUnit node-tap YUI Test

Assertions Chai should.js Expect.js better-assert

Spies, stubs, and mocks Sinon.js Jest from Facebook Jest

Test runners Karma Teaspoon YUI Yeti

Bringing testing into the fold 3 tips for making testing a regular part of your world

#1: Teach testing Attend talks like this! Practice (ex. Code Retreat) Pair programming

#2: Code coverage Istanbul Blanket.js hrcov (Mozilla) JSCover

#3: Code review Quality assurance Mentoring Don’t accept without tests!

What’d we learn? Writing a JavaScript test Tools in JavaScript for testing Ways to create a testing culture

Thank you! Find me online thewebivore.com (blog) turing.cool (podcast) bleedingedgepress.com (upcoming book on JS frameworks)