Test-framework agnostic JavaScript testing runner that supports TDD workflows and CI integration across multiple browsers and environments.
—
Testem provides a comprehensive command line interface for running tests in development and CI environments.
Interactive development mode with file watching and real-time test execution.
testem [options]
# Options:
# -f, --file [file] Configuration file (testem.json, testem.yml)
# -p, --port [num] Server port (default: 7357)
# --host [hostname] Host name (default: localhost)
# -l, --launch [list] Comma-separated list of launchers to launch
# -s, --skip [list] Comma-separated list of launchers to skip
# -d, --debug [file] Output debug to log file (default: testem.log)
# -t, --test_page [page] Custom HTML test page
# -g, --growl Enable growl/native notificationsUsage Examples:
# Basic development mode
testem
# With custom configuration
testem -f my-config.json
# Specific browsers
testem -l Chrome,Firefox
# Custom port and debug logging
testem -p 8080 -d debug.log
# Skip specific launchers
testem -s IE,SafariInteractive Controls:
ENTER - Run the testsq - Quit← / → - Move between browser tabsTAB - Switch between top/bottom panels↑ / ↓ - Scroll up/down in text panelSPACE - Page downb - Page upd - Half page downu - Half page upContinuous integration mode for automated test execution.
testem ci [options]
# Additional CI options:
# -T, --timeout [sec] Browser timeout in seconds
# -P, --parallel [num] Number of parallel browsers (default: 1)
# -b, --bail_on_uncaught_error Exit on uncaught errors
# -R, --reporter [reporter] Test reporter (tap|dot|xunit|teamcity)Usage Examples:
# Basic CI mode
testem ci
# Parallel execution
testem ci -P 5
# Custom reporter
testem ci -R xunit
# With timeout and bail on error
testem ci -T 60 -b
# Combined options
testem ci -P 3 -R tap -T 30Server-only mode for manual testing without automatic browser launching.
testem server [options]
# Uses same options as development mode but doesn't auto-launch browsersUsage Examples:
# Start server only
testem server
# Custom port
testem server -p 9000
# With configuration file
testem server -f server-config.jsonList available browser and process launchers on the system.
testem launchersExample Output:
Have 7 launchers available; auto-launch info displayed on the right.
Launcher Type CI Dev
------------ ------------ -- ---
Chrome browser ✔
Firefox browser ✔
Safari browser ✔
IE browser ✔
Node process ✔
PhantomJS browser ✔
Mocha process(TAP) ✔Get help information for testem commands.
testem --help # General help
testem ci --help # CI mode helpOptions available across all testem commands:
# Configuration
-f, --file [file] # Configuration file path
-p, --port [num] # Server port number
--host [hostname] # Server hostname
# Browser Control
-l, --launch [list] # Launchers to start (comma-separated)
-s, --skip [list] # Launchers to skip (comma-separated)
# Output & Debugging
-d, --debug [file] # Debug output file
-g, --growl # Native notifications
-t, --test_page [page] # Custom test page
# CI-Specific
-T, --timeout [sec] # Browser timeout
-P, --parallel [num] # Parallel browsers
-b, --bail_on_uncaught_error # Exit on errors
-R, --reporter [reporter] # Test reporter formatTestem uses standard exit codes to indicate test results:
0 # All tests passed
1 # Tests failed or error occurredEnvironment variables that affect testem behavior:
PORT # Default port (overridden by --port)
TESTEM_CONFIG # Configuration file path
NODE_ENV # Environment mode (affects default settings)Testem automatically searches for configuration files in this order:
testem.json # JSON configuration (highest priority)
.testem.json # Hidden JSON configuration
.testem.yml # Hidden YAML configuration
testem.yml # YAML configuration
testem.js # JavaScript configuration
.testem.js # Hidden JavaScript configuration
testem.cjs # CommonJS configuration
.testem.cjs # Hidden CommonJS configuration (lowest priority)If multiple files exist, testem uses the first one found and warns about duplicates.
Install with Tessl CLI
npx tessl i tessl/npm-testem