2.0.5 • Published 7 years ago
tuxharness v2.0.5
Test User eXperience Harness
Build a stand-alone test harness with dynamic data to quickly prototype and isolate your HTML/CSS or examine your JSON document.
Installation steps to setup and configure
npm install tuxharness --save-dev
- Define a recipe file -- similar to Gruntfile.js or gulpfile.js
- Mac/Unix copy file
cp -nv "node_modules/tuxharness/tuxfile.js" "tuxfile.js"
- Windows copy file
copy "node_modules/tuxharness/tuxfile.js" "tuxfile.js"
- More example recipes starter sample tuxharness recipe or full sample
- Mac/Unix copy file
- Run the harness server
node ./node_modules/tuxharness/index.js
- or add a script reference to your package.json like
"harness": "node ./node_modules/tuxharness/index.js"
then execute withnpm run harness
Recipe details
Register
port
localhost server port number (default is 4000)static
serve static assets (img, js, css, fonts...)route
is a virtual web path - served by express.jsdirectory
is the physical path where the static assets are hostedview
engines
array of template view engine name as defined in npm* *path
is the physical path to the views folder - relative from your project root
Harness (array)
route
is a virtual web path - served by express.jsview
is the physical path where the view is hosted - relative to your view folderdata
(object) - passed into the view for transformationdata
(string) - service call to request JSON datadata
(function(callback, util)) - callback argument will async call to gather data passed into the view for transformation * callback type string/JSON: print to browser * util type object * getIpsumText Lorum Ipsum generator * getJsonRoute type function(string route): wraps route name with localhost IP address with port and JSON path
Template View Engines
- dust.js (sample in test folder)
npm install dustjs-linkedin --save
- Jade (sample in test folder)
npm install jade --save
- Many others supported by Consolidate.js
- install any additional engines in your project
- register your view engine in your project's JS file
Commands
npm run harness
Single run server to serve the test harness environmentnpm run dev
Respawn-on-save server to serve the test harness environmentnpm run lint
Lint JS filesnpm test
Unit test and coverage
JSON browser extentions
- Firefox JSONView
- Chrome JSONView
- Safari safari-json-formatter
Roadmap
- Allow remote recipes
- Views and data too
- Host demo
2.0.5
7 years ago
2.0.4
7 years ago
2.0.3
7 years ago
2.0.2
9 years ago
2.0.1
9 years ago
2.0.0
9 years ago
1.7.1
9 years ago
1.7.0
9 years ago
1.6.3
9 years ago
1.6.2
9 years ago
1.6.1
9 years ago
1.6.0
9 years ago
1.5.2
9 years ago
1.5.0
9 years ago
1.4.2
9 years ago
1.4.1
9 years ago
1.4.0
9 years ago
1.3.1
9 years ago
1.3.0
9 years ago
1.2.0
9 years ago
1.1.1
9 years ago
1.1.0
9 years ago
1.0.1
9 years ago
1.0.0
9 years ago