Exam Development

This section will help you get started using the seed project to create exam items. It supports creating Simulated and Select Response items. Click here for tutorials on exam development. For in-depth instructions and training, visit the Tutorials section.

Getting Started


Highly recommended

Though these are not required, they are recommended installations.

  • NPM Check npm install -g npm-check
    Checks for outdated node modules used by Hammer.
  • NPM Check Updates npm install -g npm-check-updates
    Check for outdated bower components used by your exam.

Windows Users

Hammer uses a private Bower registry to access Hammer packages. If you are on a Windows machine, in order to download and install the Hammer packages from our private repository you will need to download and install Microsoft's Git Credential Manager for Windows

Quick Setup

  1. Create a new repository at the GIT repository. If you do not have a login, please contact Certiport to have one created for you.
  2. Check out your newly created repository: git clone <git_repo_url>
  3. Download the exam seed and extracts its contents into your the empty repo direct on your local machine.
  4. Navigate to your project directory in your terminal and run the following command: npm install && node setup and following the setup instructions.
  5. Run http-server from the terminal: http-server
  6. Open http://localhost:8080 in Chrome

You should be up and running at this point with the default seed project.

Installing Hammer packages

You can install additional packages using Bower. Click here to learn more about Bower.. For example, if you needed support for accessibility, you would run the following command:

bower install hammer-accessibility --save-dev

Your packages are installed in the sandbox/bower_components directory.

The --save-dev adds "hammer-layout" to "bower.json" as a dependency.

Checking for Hammer Package Updates

The easiest way to check for possible updates without automatically updating your packages is to use an node module called npm-check-updates.

From the project root

ncu -m bower

To update your packages

ncu -m bower -a
bower update

3rd-party packages

In addition to the Hammer packages custom packages may be available for different projects.

Compiling custom code

Hammer uses Grunt (a node task manager) to compile the code for testing and delivery. There are different ways to compile your code. Click here to learn more about Grunt

The Gruntfile is already configured to compile HTML, JS, and LESS files contained within the package directory. Run from the command line:


You can optionally run grunt watch to have it continuously compile your code:

grunt watch

The grunt task compiles to sandbox/bower_components/ YOUR PROJECT NAME. For more information custom code refer to the Hammer Developer Guide.

Below is an explanation of each of the default tasks provided by Hammer.

Compile mustache templates

Mustache templates are used to generate Selected Response items. It uses a template and a config file to generate one or more files. Click here to learn more about Mustache

Use grunt to generate mustache templates.

grunt mustache

Your mustache templates and data are placed in the mustache directory. The data (JSON) files are placed into a folder that matches the name of the template that is to be used. Grunt will use this structure to automatically find, match and build slides.

Compile code for local development

This task compiles the code in the src directory into the sandbox/bower_components directory. You will use this task when compiling custom code or styles to you project.


Compile code for a production

This task will compile the code in the src directory and the sandbox directory into the build directory in a minified state. The build is what you use to distribute an exam.

grunt build

Compile code for Athena

Hammer runs on multiple systems. Some of these systems are require additional manifest files to have Hammer compatible. Hammer provides a grunt tasks grunt-hammer-athena, which is already installed. To create an Athena build:

grunt athena

Running Unit Tests

Unit tests use the Jasmine framework.

You can run you tests in the browser. This has the advantages in that you can put breakpoints in the specs and the code to find out where issues are. In WebStorm navigate to tests/unit/spec_runner.html and open in Browser (as described in the section Running your project in Chrome) or alternatively you can run http-server if you have it installed.


Then open http://localhost:8080/tests/unit/spec_runner.html in a browser.

You can optionally run your tests from a command line:

Note: This is still in development.
grunt test

Running your project in Chrome

Chrome is the official browser used for testing and delivery.

Instructions for WebStorm editor

You can run your project directly from WebStorm. Right-click the HTML file in index.html in the project root and select Open in Browser under the menu options.

Instructions for other editors

If you are an alternative editor such as Atom, Sublime or other, you should install http-server, a node module

npm install http-server -g

Then initiate the server from the project root and open the url provided in Chrome.


Click here for more information on http-server