SlideShare a Scribd company logo
1 of 64
AngularJS
testing
strategies
Nate Peterson
@njpetersonPa
What’s not in this talk
What’s this talk about
Why do we care about
testing?
Tests help us fail fast
Tests give us confidence
Tests help us understand what
we’re doing and where we’re going
JavaScript is a dynamically typed
language with almost nohelp from
compiler
“One of the fundamental reasons
for choosing Angular is cited as that
it is built with testing in
mind.”
function MyController() {
var dep1 = new Dep1();
var dep2 = new Dep2();
//do something with dep1 and dep2
...
}
someModule.controller('MyController',
['$scope', 'dep1', 'dep2', function($scope, dep1, dep2) {
...
$scope.aMethod = function() {
...
}
...
}]);
The Angular way
function AddCtrl() {
var operand1 = $(#operand1);
var operand2 = $(#operand2);
var result = $(#result);
this.add = function() {
result = operand1 + operand2;
}
}
var operand1 = $('<input type="text" id="operand1" />');
var operand2 = $('<input type="text" id="operand1" />');
var result = $('<input type="text" id= "result" />');
var span = $('<span>');
$('body').html('<div class="ex1">')
.find('div')
.append(operand1)
.append(operand2)
.append(result);
var ac = new AddCtrl();
operand1.val('1');
operand2.val('1');
ac.add();
expect(result.val()).toEqual('2');
$('body').empty();
Controllers - The Angular way
function AddCtrl($scope) {
$scope.Calc = function() {
$scope.result = $scope.operand1 + $scope.operand2;
}
}
Controllers - The Angular way
var $scope = {};
var ctrl = $controller(‘AddCtrl’), {$scope: $scope };
$scope.operand1 = 1;
$scope.operand2 = 1;
$scope.calc();
expect($scope.result).toEqual(2);
Two types of testing
that
compliment each other
unit testing
and
e2e testing
How much reality do you need
in your tests?
Knowing what to test is just as
important as how to test
Test all the
things
is not a strategy
“I get paid for code that works,
not for tests, so my philosophy is
to test as little as possible to reach
a given level of confidence…”
-- Kent Beck
Focus on behaviors
rather than implementation details
Example – Testing a simple controller
app.controller('AddCtrl', function($scope) {
$scope.calc = function() {
$scope.result = $scope.operand1 + $scope.operand2;
}
});
app.controller('AddCtrl', function($scope) {
$scope.calc = function() {
$scope.result = $scope.operand1 + $scope.operand2;
}
});
describe('adding 1 + 1', function() {
beforeEach(module('myApp'));
});
app.controller('AddCtrl', function($scope) {
$scope.calc = function() {
$scope.result = $scope.operand1 + $scope.operand2;
}
});
describe('adding 1 + 1', function() {
beforeEach(module('myApp'));
var ctrl, scope;
beforeEach(inject(function($controller, $rootScope) {
scope = $rootScope.$new();
ctrl = $controller('AddCtrl', { $scope: scope });
}));
});
app.controller('AddCtrl', function($scope) {
$scope.calc = function() {
$scope.result = $scope.operand1 + $scope.operand2;
}
});
describe('adding 1 + 1', function() {
beforeEach(module('myApp'));
var ctrl, scope;
beforeEach(inject(function($controller, $rootScope) {
scope = $rootScope.$new();
ctrl = $controller('AddCtrl', { $scope: scope });
}));
it('should equal 2', function() {
scope.operand1 = 1;
scope.operand2 = 1;
scope.calc();
expect(scope.result).toEqual(2);
})
});
Example – mocking $http
var app = angular.module('myApp', []);
app.controller('MoviesController', function($scope, $http) {
$http.get("/api/movies")
.then(function (result) {
$scope.movies = result.data;
});
});
describe("myApp", function () {
beforeEach(module('myApp'));
describe("MoviesController", function () {
var scope, httpBackend, http, controller;
});
describe("myApp", function () {
beforeEach(module('myApp'));
describe("MoviesController", function () {
var scope, httpBackend, http, controller;
beforeEach(inject(function ($rootScope, $controller,
$httpBackend, $http) {
scope = $rootScope.$new();
httpBackend = $httpBackend;
http = $http;
controller = $controller;
}));
});
describe("myApp", function () {
beforeEach(module('myApp'));
describe("MoviesController", function () {
var scope, httpBackend, http, controller;
beforeEach(inject(function ($rootScope, $controller,
$httpBackend, $http) {
scope = $rootScope.$new();
httpBackend = $httpBackend;
http = $http;
controller = $controller;
httpBackend.when("GET", "/api/movies")
.respond([{}, {}, {}]);
}));
});
});
describe("myApp", function () {
beforeEach(module('myApp'));
describe("MoviesController", function () {
var scope, httpBackend, http, controller;
beforeEach(inject(function ($rootScope, $controller,
$httpBackend, $http) {
scope = $rootScope.$new();
httpBackend = $httpBackend;
http = $http;
controller = $controller;
httpBackend.when("GET", "/api/movies")
.respond([{}, {}, {}]);
}));
it('should GET movies', function () {
httpBackend.expectGET('/api/movies');
controller('MoviesController', {
$scope: scope, $http: http
});
});
});
});
describe("myApp", function () {
beforeEach(module('myApp'));
describe("MoviesController", function () {
var scope, httpBackend, http, controller;
beforeEach(inject(function ($rootScope, $controller,
$httpBackend, $http) {
scope = $rootScope.$new();
httpBackend = $httpBackend;
http = $http;
controller = $controller;
httpBackend.when("GET", "/api/movies")
.respond([{}, {}, {}]);
}));
it('should GET movies', function () {
httpBackend.expectGET('/api/movies');
controller('MoviesController', {
$scope: scope, $http: http
});
httpBackend.flush();
});
});
});
Example - mocking services
angular.module('myApp', [])
.factory('greeter', function () {
return 'Hello';
})
.factory('worldGreeter', function (greeter) {
return greeter + ' World';
});
angular.module('myApp', [])
.factory('greeter', function () {
return 'Hello';
})
.factory('worldGreeter', function (greeter) {
return greeter + ' World';
});
describe('worldGreeter', function () {
beforeEach(inject(function (_worldGreeter_) {
worldGreeter = _worldGreeter_;
}));
});
angular.module('myApp', [])
.factory('greeter', function () {
return 'Hello';
})
.factory('worldGreeter', function (greeter) {
return greeter + ' World';
});
describe('worldGreeter', function () {
beforeEach(inject(function (_worldGreeter_) {
worldGreeter = _worldGreeter_;
}));
it('should work with mocked greeter', function () {
expect(worldGreeter).toEqual('WAT World');
});
});
angular.module('myApp', [])
.factory('greeter', function () {
return 'Hello';
})
.factory('worldGreeter', function (greeter) {
return greeter + ' World';
});
describe('worldGreeter', function () {
beforeEach(module('myApp', function($provide) {
$provide.value('greeter', 'WAT');
}));
beforeEach(inject(function (_worldGreeter_) {
worldGreeter = _worldGreeter_;
}));
it('should work with mocked greeter', function () {
expect(worldGreeter).toEqual('WAT World');
});
});
angular.module('myApp', [])
.factory('greeter', function () {
return 'Hello';
})
.factory('worldGreeter', function (greeter) {
return greeter + ' World';
});
describe('worldGreeter', function () {
beforeEach(module('myApp', function ($provide) {
$provide.decorator('greeter', function ($delegate) {
return 'WAT';
});
}));
beforeEach(inject(function (_worldGreeter_) {
worldGreeter = _worldGreeter_;
}));
it('should work with mocked greeter', function () {
expect(worldGreeter).toEqual('WAT World');
});
});
Example – testing a directive
var app = angular.module('myApp', []);
app.directive('simpleDirective', function (){
return {
restrict: 'E',
template: '<div>{{value}}</div>',
scope: {
value: '='
}
};
});
describe('Testing simpleDirective', function() {
var scope, elem, directive, compiled, html;
beforeEach(function () {
module('myApp‘);
});
});
it('Should set the text of the element to whatever was passed.',
function() {
});
});
describe('Testing simpleDirective', function() {
var scope, elem, directive, compiled, html;
beforeEach(function (){
module('myApp');
html = '<simple-directive value="abc"></simple-directive>';
});
it('Should set the text of the element to whatever was passed.',
function() {
});
});
describe('Testing simpleDirective', function() {
var scope, elem, directive, compiled, html;
beforeEach(function (){
module('myApp');
html = ‘<simple-directive value="abc"></simple-directive>';
inject(function($compile, $rootScope) {
scope = $rootScope.$new();
elem = angular.element(html);
compiled = $compile(elem);
compiled(scope);
});
});
it('Should set the text of the element to whatever was passed.',
function() {
});
});
 
describe('Testing  simpleDirective', function() {  
 var scope, elem, directive, compiled, html;        
 beforeEach(function (){    
    module('myApp');        
    html = ‘<simple-directive value="abc"></simple-directive>';       
   
    inject(function($compile, $rootScope) {            
       scope = $rootScope.$new();      
       elem = angular.element(html);      
       compiled = $compile(elem);      
       compiled(scope);    
    });  
 });  
 it('Should set the text of the element to whatever was passed.', 
   function() {    
    expect(elem.text()).toBe('blah');
 });
});
 
describe('Testing  simpleDirective', function() {  
 var scope, elem, directive, compiled, html;        
 beforeEach(function (){    
    module('myApp');        
    html = ‘<simple-directive value="abc"></simple-directive>';       
   
    inject(function($compile, $rootScope) {            
       scope = $rootScope.$new();      
       elem = angular.element(html);      
       compiled = $compile(elem);      
       compiled(scope);    
    });  
 });  
 it('Should set the text of the element to whatever was passed.', 
   function() {    
     scope.abc = 'blah';
scope.$digest();
    expect(elem.text()).toBe('blah');  
 });
});
e2e testing / protractor
<body>    
   <h1>Sample</h1>    
   <div>
      Two Way Data Binding Sample      
      <br/><br/>      
      <input type="text" ng-model="name" />      
      <span ng-show="name"><h4>Hello {{name}}</h4></span>
   </div>  
</body>
describe(demo page', function() {
it('should greet the user', function() {
browser.get('[some route]');
});
});
<body>    
   <h1>Sample</h1>    
   <div>
      Two Way Data Binding Sample      
      <br/><br/>      
      <input type="text" ng-model="name" />      
      <span ng-show="name"><h4>Hello {{name}}</h4></span>
   </div>  
</body>
describe(demo page', function() {
it('should greet the user', function() {
browser.get('[some route]');
element(by.model('name')).sendKeys('Nate Peterson');
});
});
<body>    
   <h1>Sample</h1>    
   <div>
      Two Way Data Binding Sample      
      <br/><br/>      
      <input type="text" ng-model="name" />      
      <span ng-show="name"><h4>Hello {{name}}</h4></span>
   </div>  
</body>
describe(demo page', function() {
it('should greet the user', function() {
browser.get('[some route]');
element(by.model('name')).sendKeys('Nate Peterson');
var greeting = element(by.binding('name'));
});
});
<body>    
   <h1>Sample</h1>    
   <div>
      Two Way Data Binding Sample      
      <br/><br/>      
      <input type="text" ng-model="name" />      
      <span ng-show="name"><h4>Hello {{name}}</h4></span>
   </div>  
</body>
describe(demo page', function() {
it('should greet the user', function() {
browser.get('[some route]');
element(by.model('name')).sendKeys('Nate Peterson');
var greeting = element(by.binding('name'));
expect(greeting.getText()).toEqual('Hello 'Nate
Peterson');
});
});
<body>    
   <h1>Sample</h1>    
   <div>
      Two Way Data Binding Sample      
      <br/><br/>      
      <input type="text" ng-model="name" />      
      <span ng-show="name"><h4>Hello {{name}}</h4></span>
   </div>  
</body>
What’s worked well so far
Use of a Mock API for e2e tests
What’s been hard
Bloated controllers
that lead to
bloated specs
Complicated unit test setup
Hard to read tests
Questions?
AngularJS
testing
strategies
Nate Peterson
@njpetersonPa

More Related Content

What's hot

Unit testing JavaScript using Mocha and Node
Unit testing JavaScript using Mocha and NodeUnit testing JavaScript using Mocha and Node
Unit testing JavaScript using Mocha and Node
Josh Mock
 

What's hot (20)

Unit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaUnit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and Karma
 
Testing Javascript with Jasmine
Testing Javascript with JasmineTesting Javascript with Jasmine
Testing Javascript with Jasmine
 
Jasmine BDD for Javascript
Jasmine BDD for JavascriptJasmine BDD for Javascript
Jasmine BDD for Javascript
 
Test-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS ApplicationsTest-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS Applications
 
Java script advance-auroskills (2)
Java script advance-auroskills (2)Java script advance-auroskills (2)
Java script advance-auroskills (2)
 
AngularJS Unit Testing
AngularJS Unit TestingAngularJS Unit Testing
AngularJS Unit Testing
 
Unit Testing Express and Koa Middleware in ES2015
Unit Testing Express and Koa Middleware in ES2015Unit Testing Express and Koa Middleware in ES2015
Unit Testing Express and Koa Middleware in ES2015
 
Describe's Full of It's
Describe's Full of It'sDescribe's Full of It's
Describe's Full of It's
 
Unit testing JavaScript using Mocha and Node
Unit testing JavaScript using Mocha and NodeUnit testing JavaScript using Mocha and Node
Unit testing JavaScript using Mocha and Node
 
Unit Testing JavaScript Applications
Unit Testing JavaScript ApplicationsUnit Testing JavaScript Applications
Unit Testing JavaScript Applications
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Workshop 5: JavaScript testing
Workshop 5: JavaScript testingWorkshop 5: JavaScript testing
Workshop 5: JavaScript testing
 
Unit testing with mocha
Unit testing with mochaUnit testing with mocha
Unit testing with mocha
 
JavaScript Unit Testing with Jasmine
JavaScript Unit Testing with JasmineJavaScript Unit Testing with Jasmine
JavaScript Unit Testing with Jasmine
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
 
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
 
Testing in AngularJS
Testing in AngularJSTesting in AngularJS
Testing in AngularJS
 
Jasmine - why JS tests don't smell fishy
Jasmine - why JS tests don't smell fishyJasmine - why JS tests don't smell fishy
Jasmine - why JS tests don't smell fishy
 
JavaScript Functions
JavaScript FunctionsJavaScript Functions
JavaScript Functions
 
Understanding JavaScript Testing
Understanding JavaScript TestingUnderstanding JavaScript Testing
Understanding JavaScript Testing
 

Viewers also liked

TDD, unit testing and java script testing frameworks workshop
TDD, unit testing and java script testing frameworks workshopTDD, unit testing and java script testing frameworks workshop
TDD, unit testing and java script testing frameworks workshop
Sikandar Ahmed
 
Slaven tomac unit testing in angular js
Slaven tomac   unit testing in angular jsSlaven tomac   unit testing in angular js
Slaven tomac unit testing in angular js
Slaven Tomac
 

Viewers also liked (15)

TDD, unit testing and java script testing frameworks workshop
TDD, unit testing and java script testing frameworks workshopTDD, unit testing and java script testing frameworks workshop
TDD, unit testing and java script testing frameworks workshop
 
Javascript Tests with Jasmine for Front-end Devs
Javascript Tests with Jasmine for Front-end DevsJavascript Tests with Jasmine for Front-end Devs
Javascript Tests with Jasmine for Front-end Devs
 
EasyTest Test Automation Tool Introduction
EasyTest Test Automation Tool IntroductionEasyTest Test Automation Tool Introduction
EasyTest Test Automation Tool Introduction
 
Testing angular js
Testing angular jsTesting angular js
Testing angular js
 
Slaven tomac unit testing in angular js
Slaven tomac   unit testing in angular jsSlaven tomac   unit testing in angular js
Slaven tomac unit testing in angular js
 
Test-Driven Development with TypeScript+Jasmine+AngularJS
Test-Driven Development with TypeScript+Jasmine+AngularJSTest-Driven Development with TypeScript+Jasmine+AngularJS
Test-Driven Development with TypeScript+Jasmine+AngularJS
 
AngularJS Testing
AngularJS TestingAngularJS Testing
AngularJS Testing
 
Angular 2 - What's new and what's different
Angular 2 - What's new and what's differentAngular 2 - What's new and what's different
Angular 2 - What's new and what's different
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit Test
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma intro
 
TDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and JasmineTDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and Jasmine
 
Intro to testing Javascript with jasmine
Intro to testing Javascript with jasmineIntro to testing Javascript with jasmine
Intro to testing Javascript with jasmine
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introduction
 
Automated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and JenkinsAutomated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and Jenkins
 
Jasmine
JasmineJasmine
Jasmine
 

Similar to AngularJS Testing Strategies

Javascript: the important bits
Javascript: the important bitsJavascript: the important bits
Javascript: the important bits
Chris Saylor
 
LinkedIn TBC JavaScript 100: Functions
 LinkedIn TBC JavaScript 100: Functions LinkedIn TBC JavaScript 100: Functions
LinkedIn TBC JavaScript 100: Functions
Adam Crabtree
 
Building Smart Async Functions For Mobile
Building Smart Async Functions For MobileBuilding Smart Async Functions For Mobile
Building Smart Async Functions For Mobile
Glan Thomas
 

Similar to AngularJS Testing Strategies (20)

Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
 
Ten useful JavaScript tips & best practices
Ten useful JavaScript tips & best practicesTen useful JavaScript tips & best practices
Ten useful JavaScript tips & best practices
 
Javascript: the important bits
Javascript: the important bitsJavascript: the important bits
Javascript: the important bits
 
How to practice functional programming in react
How to practice functional programming in reactHow to practice functional programming in react
How to practice functional programming in react
 
LinkedIn TBC JavaScript 100: Functions
 LinkedIn TBC JavaScript 100: Functions LinkedIn TBC JavaScript 100: Functions
LinkedIn TBC JavaScript 100: Functions
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScript
 
Object-Oriented Javascript
Object-Oriented JavascriptObject-Oriented Javascript
Object-Oriented Javascript
 
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
 
Opinionated AngularJS
Opinionated AngularJSOpinionated AngularJS
Opinionated AngularJS
 
Node Anti-Patterns and Bad Practices
Node Anti-Patterns and Bad PracticesNode Anti-Patterns and Bad Practices
Node Anti-Patterns and Bad Practices
 
AngularJS, More Than Directives !
AngularJS, More Than Directives !AngularJS, More Than Directives !
AngularJS, More Than Directives !
 
Engineering JavaScript
Engineering JavaScriptEngineering JavaScript
Engineering JavaScript
 
Test-driven JavaScript Development - OPITZ CONSULTING - Tobias Bosch - Stefa...
Test-driven JavaScript Development - OPITZ CONSULTING -  Tobias Bosch - Stefa...Test-driven JavaScript Development - OPITZ CONSULTING -  Tobias Bosch - Stefa...
Test-driven JavaScript Development - OPITZ CONSULTING - Tobias Bosch - Stefa...
 
Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2
 
Building Smart Async Functions For Mobile
Building Smart Async Functions For MobileBuilding Smart Async Functions For Mobile
Building Smart Async Functions For Mobile
 
[AngularJS] From Angular to Mobile in 30 minutes
[AngularJS] From Angular to Mobile in 30 minutes[AngularJS] From Angular to Mobile in 30 minutes
[AngularJS] From Angular to Mobile in 30 minutes
 
Say It With Javascript
Say It With JavascriptSay It With Javascript
Say It With Javascript
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
 
Testing AngularJS
Testing AngularJSTesting AngularJS
Testing AngularJS
 
Building Large jQuery Applications
Building Large jQuery ApplicationsBuilding Large jQuery Applications
Building Large jQuery Applications
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 

AngularJS Testing Strategies

Editor's Notes

  1. TDD (TDD is dead) – could be a whole talk on its own Grunt / Karma – though they do provide great value
  2. Unit / e2e testing Strategies for testing Lessons learned Code examples
  3. Strategic reasons Helps us fail fast Safety net – confidence Helps us understand Tactical reasons Dynamically typed language with almost no help from compiler
  4. Strategic reasons Helps us fail fast Safety net – confidence Helps us understand Tactical reasons Dynamically typed language with almost no help from compiler
  5. Strategic reasons Helps us fail fast Safety net – confidence Helps us understand Tactical reasons Dynamically typed language with almost no help from compiler
  6. Strategic reasons Helps us fail fast Safety net – confidence Helps us understand Tactical reasons Dynamically typed language with almost no help from compiler
  7. Javascript can be hard
  8. What does this mean? - Separation concerns
  9. Need a new image this is terrible
  10. Pattern IOC
  11. Show something where dependencies are not injected
  12. DI in angular
  13. That the controller doesn’t need the dom
  14. Something that might be written in jquery
  15. Something that we might write to test that. Lacks readability and hard to understand.
  16. Maybe mention filters and directives Format expressions
  17. What do you use it for… Why would you use it… How do you use it? Behaviors vs. correctness brittleness
  18. Justin Searls
  19. Tests what’s important
  20. expect(greeting.getText()).toEqual(&amp;apos;Hello &amp;apos;Nate Peterson&amp;apos;);