SlideShare a Scribd company logo
Unit and functional
testing with Siesta
Mats Bryntse, developer at Bryntum
@bryntum
Wednesday, September 25, 13
Mats Bryntse
• Ext JS developer since 2007
• Started Bryntum 2009
• Components & tools for the Sencha ecosystem
• www.bryntum.com
Wednesday, September 25, 13
Agenda
•Benefits of Siesta in your project
•Writing your first unit Siesta test
•Functional testing
•New Siesta features & improvements
Wednesday, September 25, 13
Do you test your JS?
Wednesday, September 25, 13
3 benefits of Siesta
Wednesday, September 25, 13
Unit + Functional tests
Wednesday, September 25, 13
Wednesday, September 25, 13
Wednesday, September 25, 13
A look at the Siesta
UI
Wednesday, September 25, 13
Wednesday, September 25, 13
What should I test?
Wednesday, September 25, 13
Test Model layer first
Wednesday, September 25, 13
Test Model layer first
•Easy to test, high ROI.
Wednesday, September 25, 13
Test Model layer first
•Easy to test, high ROI.
•Your.data.Model
Wednesday, September 25, 13
Test Model layer first
•Easy to test, high ROI.
•Your.data.Model
•Your.data.Store
Wednesday, September 25, 13
Test Model layer first
•Easy to test, high ROI.
•Your.data.Model
•Your.data.Store
•Your.util.Class
Wednesday, September 25, 13
Test Model layer first
•Easy to test, high ROI.
•Your.data.Model
•Your.data.Store
•Your.util.Class
•Focus on one class per test file
Wednesday, September 25, 13
Test Model layer first
•Easy to test, high ROI.
•Your.data.Model
•Your.data.Store
•Your.util.Class
•Focus on one class per test file
•Test your code, not framework code
Wednesday, September 25, 13
Ext.define(“My.model.User”, {
extend : ‘Ext.data.Model’,
fields : [‘FirstName’, ‘LastName’, ‘Salary’],
getAnnualSalary : function () {
return this.get(‘Salary’) * 12;
},
isValid : function() {
return this.get(‘FirstName’) && this.get(‘LastName’);
}
});
My.model.User
Wednesday, September 25, 13
describe(“Testing my User model”, function(t) {
t.it(‘Should get correct annual salary’, function(t) {
var user = new My.model.User({ Salary : 5000 });
t.expect(user.getAnnualSalary()).toBe(60000);
});
t.it(‘Should treat incomplete name as invalid’, function(t) {
var user = new My.model.User({ FirstName : ‘Bob’ });
t.expect(user.isValid()).toBeFalsy();
});
})
User.t.js
Wednesday, September 25, 13
StartTest(function(t) {
t.it(‘Should be able to get name’, function(t) {
var user = new My.model.User({
FirstName : ‘Bob’
});
t.expect(user.get(‘FirstName’)).toBe(‘Bob’);
});
})
Don’t test Ext JS
Wednesday, September 25, 13
var Harness = Siesta.Harness.Browser.ExtJS;
Harness.configure({
preload : [
"http://cdn.sencha.io/ext-4.2.0-gpl/resources/css/ext-all.css",
"http://cdn.sencha.io/ext-4.2.0-gpl/ext-all-debug.js",
"my-app-all-debug.js"
]
});
Harness.start({
group : 'Model Layer',
items : [
'User.t.js'
]
});
Harness.js
Wednesday, September 25, 13
Wednesday, September 25, 13
Using PhantomJS (or Selenium)
Wednesday, September 25, 13
Testing views
Wednesday, September 25, 13
Testing views
• Normally, your app consists of many view classes
Wednesday, September 25, 13
Testing views
• Normally, your app consists of many view classes
• Test your components in isolation:
Wednesday, September 25, 13
Testing views
• Normally, your app consists of many view classes
• Test your components in isolation:
• My.app.UserList
Wednesday, September 25, 13
Testing views
• Normally, your app consists of many view classes
• Test your components in isolation:
• My.app.UserList
• My.app.OrderForm
Wednesday, September 25, 13
Testing views
• Normally, your app consists of many view classes
• Test your components in isolation:
• My.app.UserList
• My.app.OrderForm
• Test your public config properties + API
Wednesday, September 25, 13
Testing views
• Normally, your app consists of many view classes
• Test your components in isolation:
• My.app.UserList
• My.app.OrderForm
• Test your public config properties + API
• Sanity tests give you peace of mind
Wednesday, September 25, 13
http://github.com/matsbryntse
Wednesday, September 25, 13
10 Sanity tests
Wednesday, September 25, 13
10 Sanity tests
1. Your namespace is created, global variable leaks.
Wednesday, September 25, 13
10 Sanity tests
1. Your namespace is created, global variable leaks.
2. Your component can be loaded on demand
Wednesday, September 25, 13
10 Sanity tests
1. Your namespace is created, global variable leaks.
2. Your component can be loaded on demand
3. No global Ext JS overrides
Wednesday, September 25, 13
10 Sanity tests
1. Your namespace is created, global variable leaks.
2. Your component can be loaded on demand
3. No global Ext JS overrides
4. Basic JsHint rules
Wednesday, September 25, 13
10 Sanity tests
1. Your namespace is created, global variable leaks.
2. Your component can be loaded on demand
3. No global Ext JS overrides
4. Basic JsHint rules
5. It does not use global style rules ('.x-panel' etc)
Wednesday, September 25, 13
10 Sanity tests
1. Your namespace is created, global variable leaks.
2. Your component can be loaded on demand
3. No global Ext JS overrides
4. Basic JsHint rules
5. It does not use global style rules ('.x-panel' etc)
6. It can be sub-classed
Wednesday, September 25, 13
10 Sanity tests
1. Your namespace is created, global variable leaks.
2. Your component can be loaded on demand
3. No global Ext JS overrides
4. Basic JsHint rules
5. It does not use global style rules ('.x-panel' etc)
6. It can be sub-classed
7. It does not leak any additional components or DOM
Wednesday, September 25, 13
10 Sanity tests
1. Your namespace is created, global variable leaks.
2. Your component can be loaded on demand
3. No global Ext JS overrides
4. Basic JsHint rules
5. It does not use global style rules ('.x-panel' etc)
6. It can be sub-classed
7. It does not leak any additional components or DOM
8. It doesn't override any private Ext JS methods
Wednesday, September 25, 13
10 Sanity tests
1. Your namespace is created, global variable leaks.
2. Your component can be loaded on demand
3. No global Ext JS overrides
4. Basic JsHint rules
5. It does not use global style rules ('.x-panel' etc)
6. It can be sub-classed
7. It does not leak any additional components or DOM
8. It doesn't override any private Ext JS methods
9. It can be created, destroyed
Wednesday, September 25, 13
10 Sanity tests
1. Your namespace is created, global variable leaks.
2. Your component can be loaded on demand
3. No global Ext JS overrides
4. Basic JsHint rules
5. It does not use global style rules ('.x-panel' etc)
6. It can be sub-classed
7. It does not leak any additional components or DOM
8. It doesn't override any private Ext JS methods
9. It can be created, destroyed
10. It passes a basic monkey test
Wednesday, September 25, 13
Functional testing
Wednesday, September 25, 13
Functional testing
• Interacting with the UI as a real user
Wednesday, September 25, 13
Functional testing
• Interacting with the UI as a real user
• Hard to solve w/ tools focusing on raw DOM/HTML.
Wednesday, September 25, 13
Functional testing
• Interacting with the UI as a real user
• Hard to solve w/ tools focusing on raw DOM/HTML.
• Siesta allows you to simulate user interactions:
Wednesday, September 25, 13
Functional testing
• Interacting with the UI as a real user
• Hard to solve w/ tools focusing on raw DOM/HTML.
• Siesta allows you to simulate user interactions:
• type
Wednesday, September 25, 13
Functional testing
• Interacting with the UI as a real user
• Hard to solve w/ tools focusing on raw DOM/HTML.
• Siesta allows you to simulate user interactions:
• type
• click
Wednesday, September 25, 13
Functional testing
• Interacting with the UI as a real user
• Hard to solve w/ tools focusing on raw DOM/HTML.
• Siesta allows you to simulate user interactions:
• type
• click
• drag
Wednesday, September 25, 13
Query Power
Wednesday, September 25, 13
Query Power
- CSS Query “.x-btn”
Wednesday, September 25, 13
Query Power
- CSS Query “.x-btn”
- Component Query “>>button”
Wednesday, September 25, 13
Query Power
- CSS Query “.x-btn”
- Component Query “>>button”
- Composite Query “gridpanel => .x-grid-cell”
Wednesday, September 25, 13
Targeting demo
Wednesday, September 25, 13
Siesta news
Wednesday, September 25, 13
Siesta news
•2.0: New User Interface
Wednesday, September 25, 13
Siesta news
•2.0: New User Interface
•Auto-scroll element into view
Wednesday, September 25, 13
Siesta news
•2.0: New User Interface
•Auto-scroll element into view
•Assertion detecting global Ext JS overrides
Wednesday, September 25, 13
Siesta news
•2.0: New User Interface
•Auto-scroll element into view
•Assertion detecting global Ext JS overrides
•Assertion to detect unnecessary layouts
Wednesday, September 25, 13
Siesta news
•2.0: New User Interface
•Auto-scroll element into view
•Assertion detecting global Ext JS overrides
•Assertion to detect unnecessary layouts
•Code coverage
Wednesday, September 25, 13
Siesta.next
Wednesday, September 25, 13
Siesta.next
•UI Localization, Japanese translation
Wednesday, September 25, 13
Siesta.next
•UI Localization, Japanese translation
•Guides + blog posts
Wednesday, September 25, 13
Siesta.next
•UI Localization, Japanese translation
•Guides + blog posts
•Test recorder
Wednesday, September 25, 13
Siesta.next
•UI Localization, Japanese translation
•Guides + blog posts
•Test recorder
Wednesday, September 25, 13
Recorder demo
Wednesday, September 25, 13
Questions?
Wednesday, September 25, 13

More Related Content

PPTX
Testing Ext JS and Sencha Touch
PPTX
Java script unit testing
PDF
#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015
PDF
jQuery Proven Performance Tips & Tricks
KEY
Agile JavaScript Testing
PDF
Intro To JavaScript Unit Testing - Ran Mizrahi
PDF
Introduction to Protractor
PDF
Test your Javascript! v1.1
Testing Ext JS and Sencha Touch
Java script unit testing
#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015
jQuery Proven Performance Tips & Tricks
Agile JavaScript Testing
Intro To JavaScript Unit Testing - Ran Mizrahi
Introduction to Protractor
Test your Javascript! v1.1

What's hot (20)

PPTX
Testing ASP.NET - Progressive.NET
PDF
Efficient JavaScript Unit Testing, May 2012
PDF
Javascript Test Automation Workshop (21.08.2014)
PDF
Automation Abstraction Layers: Page Objects and Beyond
PDF
Survive JavaScript - Strategies and Tricks
PDF
How to make Ajax work for you
PDF
Selenium bootcamp slides
PDF
Intro to JavaScript Testing
PDF
JavaScript + Jenkins = Winning!
PDF
Painless JavaScript Testing with Jest
PDF
Intro to node.js - Ran Mizrahi (28/8/14)
PDF
Unit Testing JavaScript Applications
PDF
High Performance JavaScript - jQuery Conference SF Bay Area 2010
PPTX
Ran Mizrahi - Symfony2 meets Drupal8
PPTX
Automated php unit testing in drupal 8
PDF
The DOM is a Mess @ Yahoo
PPT
Testing in AngularJS
PDF
Webdriver cheatsheets summary
PDF
Building a JavaScript Library
PPTX
How do I write Testable Javascript so I can Test my CF API on Server and Client
Testing ASP.NET - Progressive.NET
Efficient JavaScript Unit Testing, May 2012
Javascript Test Automation Workshop (21.08.2014)
Automation Abstraction Layers: Page Objects and Beyond
Survive JavaScript - Strategies and Tricks
How to make Ajax work for you
Selenium bootcamp slides
Intro to JavaScript Testing
JavaScript + Jenkins = Winning!
Painless JavaScript Testing with Jest
Intro to node.js - Ran Mizrahi (28/8/14)
Unit Testing JavaScript Applications
High Performance JavaScript - jQuery Conference SF Bay Area 2010
Ran Mizrahi - Symfony2 meets Drupal8
Automated php unit testing in drupal 8
The DOM is a Mess @ Yahoo
Testing in AngularJS
Webdriver cheatsheets summary
Building a JavaScript Library
How do I write Testable Javascript so I can Test my CF API on Server and Client
Ad

Similar to Unit and functional testing with Siesta (20)

PDF
Intro to PHP Testing
PDF
The state of JavaScript Linting - English version
PDF
Front-end development automation with Grunt
PDF
iOS Development Methodology
PDF
Delivering a Responsive UI
PDF
jQuery Mobile Deep Dive
KEY
Javascript unit testing, yes we can e big
PDF
Einführung in AngularJS
PDF
Heavenly hell – automated tests at scale wojciech seliga
ODP
AD208 - End to End Quality Processes for Top Notch XPages Apps
PPTX
Mini training - Moving to xUnit.net
PDF
Frontend Performance: Illusions & browser rendering
ODP
IBM ConnectED 2015 - AD302 - Responsive Application Development for XPages
PDF
ZURB Foundation 5: Clean + Organized
PDF
Backbone
PDF
New Methods in Automated XSS Detection & Dynamic Exploit Creation
PPTX
SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...
PDF
Dapper Drupal - Custom Tailored Drupal Themes
PPT
High Performance Ajax Applications 1197671494632682 2
PPT
High Performance Ajax Applications
Intro to PHP Testing
The state of JavaScript Linting - English version
Front-end development automation with Grunt
iOS Development Methodology
Delivering a Responsive UI
jQuery Mobile Deep Dive
Javascript unit testing, yes we can e big
Einführung in AngularJS
Heavenly hell – automated tests at scale wojciech seliga
AD208 - End to End Quality Processes for Top Notch XPages Apps
Mini training - Moving to xUnit.net
Frontend Performance: Illusions & browser rendering
IBM ConnectED 2015 - AD302 - Responsive Application Development for XPages
ZURB Foundation 5: Clean + Organized
Backbone
New Methods in Automated XSS Detection & Dynamic Exploit Creation
SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...
Dapper Drupal - Custom Tailored Drupal Themes
High Performance Ajax Applications 1197671494632682 2
High Performance Ajax Applications
Ad

More from Grgur Grisogono (18)

PDF
PRPL Pattern with Webpack and React
PDF
Webpack & React Performance in 16+ Steps
PDF
Back to the Future with ES.next
PDF
Frustration-Free Packaging of Ext JS 5 Applications
PDF
Sencha Space review
PDF
ModUX keynote
PDF
Building Cordova plugins for iOS
PDF
Practices and obstacles in agile development
PDF
Securing Client Side Data
PDF
Give Responsive Design a Mobile Performance Boost
PDF
Making the Web Work on Mobile
PDF
Sencha Cmd Quick Start
PDF
Exploring the Possibilities of Sencha and WebRTC
PDF
What's Coming Next in Sencha Frameworks
PDF
Writing High Quality Code
PDF
BlackBerry Loves the Web
PDF
Has Anyone Asked a Customer?
PDF
Sencha Touch Meets TYPO3 CMS
PRPL Pattern with Webpack and React
Webpack & React Performance in 16+ Steps
Back to the Future with ES.next
Frustration-Free Packaging of Ext JS 5 Applications
Sencha Space review
ModUX keynote
Building Cordova plugins for iOS
Practices and obstacles in agile development
Securing Client Side Data
Give Responsive Design a Mobile Performance Boost
Making the Web Work on Mobile
Sencha Cmd Quick Start
Exploring the Possibilities of Sencha and WebRTC
What's Coming Next in Sencha Frameworks
Writing High Quality Code
BlackBerry Loves the Web
Has Anyone Asked a Customer?
Sencha Touch Meets TYPO3 CMS

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Cloud computing and distributed systems.
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Encapsulation theory and applications.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
KodekX | Application Modernization Development
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Electronic commerce courselecture one. Pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
A Presentation on Artificial Intelligence
Advanced methodologies resolving dimensionality complications for autism neur...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Cloud computing and distributed systems.
CIFDAQ's Market Insight: SEC Turns Pro Crypto
The Rise and Fall of 3GPP – Time for a Sabbatical?
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Encapsulation theory and applications.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
KodekX | Application Modernization Development
The AUB Centre for AI in Media Proposal.docx
20250228 LYD VKU AI Blended-Learning.pptx
Understanding_Digital_Forensics_Presentation.pptx
Big Data Technologies - Introduction.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
MYSQL Presentation for SQL database connectivity
Electronic commerce courselecture one. Pdf
Building Integrated photovoltaic BIPV_UPV.pdf

Unit and functional testing with Siesta

  • 1. Unit and functional testing with Siesta Mats Bryntse, developer at Bryntum @bryntum Wednesday, September 25, 13
  • 2. Mats Bryntse • Ext JS developer since 2007 • Started Bryntum 2009 • Components & tools for the Sencha ecosystem • www.bryntum.com Wednesday, September 25, 13
  • 3. Agenda •Benefits of Siesta in your project •Writing your first unit Siesta test •Functional testing •New Siesta features & improvements Wednesday, September 25, 13
  • 4. Do you test your JS? Wednesday, September 25, 13
  • 5. 3 benefits of Siesta Wednesday, September 25, 13
  • 6. Unit + Functional tests Wednesday, September 25, 13
  • 9. A look at the Siesta UI Wednesday, September 25, 13
  • 11. What should I test? Wednesday, September 25, 13
  • 12. Test Model layer first Wednesday, September 25, 13
  • 13. Test Model layer first •Easy to test, high ROI. Wednesday, September 25, 13
  • 14. Test Model layer first •Easy to test, high ROI. •Your.data.Model Wednesday, September 25, 13
  • 15. Test Model layer first •Easy to test, high ROI. •Your.data.Model •Your.data.Store Wednesday, September 25, 13
  • 16. Test Model layer first •Easy to test, high ROI. •Your.data.Model •Your.data.Store •Your.util.Class Wednesday, September 25, 13
  • 17. Test Model layer first •Easy to test, high ROI. •Your.data.Model •Your.data.Store •Your.util.Class •Focus on one class per test file Wednesday, September 25, 13
  • 18. Test Model layer first •Easy to test, high ROI. •Your.data.Model •Your.data.Store •Your.util.Class •Focus on one class per test file •Test your code, not framework code Wednesday, September 25, 13
  • 19. Ext.define(“My.model.User”, { extend : ‘Ext.data.Model’, fields : [‘FirstName’, ‘LastName’, ‘Salary’], getAnnualSalary : function () { return this.get(‘Salary’) * 12; }, isValid : function() { return this.get(‘FirstName’) && this.get(‘LastName’); } }); My.model.User Wednesday, September 25, 13
  • 20. describe(“Testing my User model”, function(t) { t.it(‘Should get correct annual salary’, function(t) { var user = new My.model.User({ Salary : 5000 }); t.expect(user.getAnnualSalary()).toBe(60000); }); t.it(‘Should treat incomplete name as invalid’, function(t) { var user = new My.model.User({ FirstName : ‘Bob’ }); t.expect(user.isValid()).toBeFalsy(); }); }) User.t.js Wednesday, September 25, 13
  • 21. StartTest(function(t) { t.it(‘Should be able to get name’, function(t) { var user = new My.model.User({ FirstName : ‘Bob’ }); t.expect(user.get(‘FirstName’)).toBe(‘Bob’); }); }) Don’t test Ext JS Wednesday, September 25, 13
  • 22. var Harness = Siesta.Harness.Browser.ExtJS; Harness.configure({ preload : [ "http://cdn.sencha.io/ext-4.2.0-gpl/resources/css/ext-all.css", "http://cdn.sencha.io/ext-4.2.0-gpl/ext-all-debug.js", "my-app-all-debug.js" ] }); Harness.start({ group : 'Model Layer', items : [ 'User.t.js' ] }); Harness.js Wednesday, September 25, 13
  • 24. Using PhantomJS (or Selenium) Wednesday, September 25, 13
  • 26. Testing views • Normally, your app consists of many view classes Wednesday, September 25, 13
  • 27. Testing views • Normally, your app consists of many view classes • Test your components in isolation: Wednesday, September 25, 13
  • 28. Testing views • Normally, your app consists of many view classes • Test your components in isolation: • My.app.UserList Wednesday, September 25, 13
  • 29. Testing views • Normally, your app consists of many view classes • Test your components in isolation: • My.app.UserList • My.app.OrderForm Wednesday, September 25, 13
  • 30. Testing views • Normally, your app consists of many view classes • Test your components in isolation: • My.app.UserList • My.app.OrderForm • Test your public config properties + API Wednesday, September 25, 13
  • 31. Testing views • Normally, your app consists of many view classes • Test your components in isolation: • My.app.UserList • My.app.OrderForm • Test your public config properties + API • Sanity tests give you peace of mind Wednesday, September 25, 13
  • 33. 10 Sanity tests Wednesday, September 25, 13
  • 34. 10 Sanity tests 1. Your namespace is created, global variable leaks. Wednesday, September 25, 13
  • 35. 10 Sanity tests 1. Your namespace is created, global variable leaks. 2. Your component can be loaded on demand Wednesday, September 25, 13
  • 36. 10 Sanity tests 1. Your namespace is created, global variable leaks. 2. Your component can be loaded on demand 3. No global Ext JS overrides Wednesday, September 25, 13
  • 37. 10 Sanity tests 1. Your namespace is created, global variable leaks. 2. Your component can be loaded on demand 3. No global Ext JS overrides 4. Basic JsHint rules Wednesday, September 25, 13
  • 38. 10 Sanity tests 1. Your namespace is created, global variable leaks. 2. Your component can be loaded on demand 3. No global Ext JS overrides 4. Basic JsHint rules 5. It does not use global style rules ('.x-panel' etc) Wednesday, September 25, 13
  • 39. 10 Sanity tests 1. Your namespace is created, global variable leaks. 2. Your component can be loaded on demand 3. No global Ext JS overrides 4. Basic JsHint rules 5. It does not use global style rules ('.x-panel' etc) 6. It can be sub-classed Wednesday, September 25, 13
  • 40. 10 Sanity tests 1. Your namespace is created, global variable leaks. 2. Your component can be loaded on demand 3. No global Ext JS overrides 4. Basic JsHint rules 5. It does not use global style rules ('.x-panel' etc) 6. It can be sub-classed 7. It does not leak any additional components or DOM Wednesday, September 25, 13
  • 41. 10 Sanity tests 1. Your namespace is created, global variable leaks. 2. Your component can be loaded on demand 3. No global Ext JS overrides 4. Basic JsHint rules 5. It does not use global style rules ('.x-panel' etc) 6. It can be sub-classed 7. It does not leak any additional components or DOM 8. It doesn't override any private Ext JS methods Wednesday, September 25, 13
  • 42. 10 Sanity tests 1. Your namespace is created, global variable leaks. 2. Your component can be loaded on demand 3. No global Ext JS overrides 4. Basic JsHint rules 5. It does not use global style rules ('.x-panel' etc) 6. It can be sub-classed 7. It does not leak any additional components or DOM 8. It doesn't override any private Ext JS methods 9. It can be created, destroyed Wednesday, September 25, 13
  • 43. 10 Sanity tests 1. Your namespace is created, global variable leaks. 2. Your component can be loaded on demand 3. No global Ext JS overrides 4. Basic JsHint rules 5. It does not use global style rules ('.x-panel' etc) 6. It can be sub-classed 7. It does not leak any additional components or DOM 8. It doesn't override any private Ext JS methods 9. It can be created, destroyed 10. It passes a basic monkey test Wednesday, September 25, 13
  • 45. Functional testing • Interacting with the UI as a real user Wednesday, September 25, 13
  • 46. Functional testing • Interacting with the UI as a real user • Hard to solve w/ tools focusing on raw DOM/HTML. Wednesday, September 25, 13
  • 47. Functional testing • Interacting with the UI as a real user • Hard to solve w/ tools focusing on raw DOM/HTML. • Siesta allows you to simulate user interactions: Wednesday, September 25, 13
  • 48. Functional testing • Interacting with the UI as a real user • Hard to solve w/ tools focusing on raw DOM/HTML. • Siesta allows you to simulate user interactions: • type Wednesday, September 25, 13
  • 49. Functional testing • Interacting with the UI as a real user • Hard to solve w/ tools focusing on raw DOM/HTML. • Siesta allows you to simulate user interactions: • type • click Wednesday, September 25, 13
  • 50. Functional testing • Interacting with the UI as a real user • Hard to solve w/ tools focusing on raw DOM/HTML. • Siesta allows you to simulate user interactions: • type • click • drag Wednesday, September 25, 13
  • 52. Query Power - CSS Query “.x-btn” Wednesday, September 25, 13
  • 53. Query Power - CSS Query “.x-btn” - Component Query “>>button” Wednesday, September 25, 13
  • 54. Query Power - CSS Query “.x-btn” - Component Query “>>button” - Composite Query “gridpanel => .x-grid-cell” Wednesday, September 25, 13
  • 57. Siesta news •2.0: New User Interface Wednesday, September 25, 13
  • 58. Siesta news •2.0: New User Interface •Auto-scroll element into view Wednesday, September 25, 13
  • 59. Siesta news •2.0: New User Interface •Auto-scroll element into view •Assertion detecting global Ext JS overrides Wednesday, September 25, 13
  • 60. Siesta news •2.0: New User Interface •Auto-scroll element into view •Assertion detecting global Ext JS overrides •Assertion to detect unnecessary layouts Wednesday, September 25, 13
  • 61. Siesta news •2.0: New User Interface •Auto-scroll element into view •Assertion detecting global Ext JS overrides •Assertion to detect unnecessary layouts •Code coverage Wednesday, September 25, 13
  • 63. Siesta.next •UI Localization, Japanese translation Wednesday, September 25, 13
  • 64. Siesta.next •UI Localization, Japanese translation •Guides + blog posts Wednesday, September 25, 13
  • 65. Siesta.next •UI Localization, Japanese translation •Guides + blog posts •Test recorder Wednesday, September 25, 13
  • 66. Siesta.next •UI Localization, Japanese translation •Guides + blog posts •Test recorder Wednesday, September 25, 13