Skip to content

Instantly share code, notes, and snippets.

@jfridye
Last active August 29, 2015 14:05
Show Gist options
  • Save jfridye/fd7a7cded24aa758926f to your computer and use it in GitHub Desktop.
Save jfridye/fd7a7cded24aa758926f to your computer and use it in GitHub Desktop.
TheIntern Presentation Outline
THE INTERN: "Make the Intern Do the Testing"
============================================
ABOUT
=====
- it's a framework: end-to-end testing solution
- built by the dojo engineers
FEATURES
========
- built on the AMD spec and is modular by nature
- write both unit and functional tests
- node.js and standalone browser support
- cloud support (e.g., run tests on SauceLabs or BrowserStack)
- chai for assertions
- extensible reporting
- instabul for instrumentation/coverage metrics
- built-in grunt task
- continuous integration in Jenkins
OTHER BENEFITS
==============
- open source
- extensible -- swap out components as you wish
- actively developed
- good docs, examples and tutorials on GitHub
- e.g., Angular, Backbone, Ember examples
- active blog on SitePen
- active community
- good question-to-answer ratio on StackOverflow
- enterprise support
INSTALLATION
============
- npm install intern --save-dev
DIRECTORY STRUCTURE
===================
- tests
- js
- functional
- support
- mocks
- reports
- reporters
- vendor
- unit
- (this mirrors application scripts dir)
- <config_file>.js
CONFIGURATION
=============
- default configuration file
- intern.js (meant to be abstract and not used)
- environment-specific configuration files to override defaults from intern.js
- dev.js
- devint.js
TEST COMPOSITION
================
- we have a sublimetext snippet for test boilerplate (see confluence page)
EXECUTION
=========
- phantomjs (for quick dev only)
- grunt test --dev
- chrome (for debugging only)
- grunt test:debug --dev
- cloud (SauceLabs)
- grunt test --devint
REPORTS
=======
- console
- cobertura (good for Jenkins consumption)
- lcov
- lcovhtml (see your line-by-line coverage for a file in a browser)
- webdriver
- *note: these reports will only give coverage metrics for application scripts executed during test runs
CUSTOM REPORTS
==============
- combines console & lcovhtml reports, plus gives complete coverage metrics for all AMD application scripts in panama
OTHER NOTES
===========
- functional testing coming soon with casperjs
- intern 2.2: built-in mocks, subs & spies with sinon.js
TROUBLESHOOTING
===============
- tests don't appear to run or execution hangs (likely a syntax error or network timeouts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment