0.1.4 • Published 11 years ago

conjure v0.1.4

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

conjure

Parallel CasperJS runner, BDD flow, module-based tests, API helpers

  • describe()/it() and hooks via bdd-flow
  • require('relative/path/in/my/proj/module.js)
  • Bootstrap test modules with common settings and arguments
  • Full access to standard CasperJS APIs
  • Helpers](docs/test-api.md) use preexisting jQuery for selectors
  • Stack traces that cover describe()/it() and helpers

Build Status

Examples

Basic test module

module.exports = function(conjure) {
  conjure.set('initPath', '/login').set('initSel', '.login');
  conjure.test('login page', function() {
    this.describe('form', function() {
      this.it('should not auto-check "Remember Me"' , function() {
        this.conjure.selectorExists('.remember-me');
        this.conjure.selectorMissing('.remember-me:checked');
      });
    });
  });
};

Stack trace after timeout

  • Consecutive repeats are collapsed into a count ('x 40').
  • Colorized and displayed after all test failures.

    /my-test.js Auto-killed after 5000ms timeout /my-test.js conjure trace: /my-test.js selectorExists (step: waitFor) x 40 /my-test.js describe (name: login page) /my-test.js selectorExists (sel: .selector-does-not-exist) /my-test.js it (name: should be loaded/found) /my-test.js describe (name: initial URL/selector)

More

CLI

Basic run:

conjure --server /path/to/myproj/http-server

Start the server. Run all test scripts under <cwd>/test that end with .js. Kill the server.

CLI Documentation

API

Context properties in it() callbacks

  • utils: Native CasperJS module.
  • colorizer: Native CasperjS module.
  • casper: Native CasperJS module.
  • conjure: Helpers described below.
  • Custom properties added to this in subsequently executed hooks and it() callbacks.

Documentation

Internals:

Installation

NPM

npm install conjure

Tests

Test Documentation

License

MIT

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago