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.
- Chrome ( https://www.google.com/chrome/browser/features.html )
- Node.js ( https://nodejs.org/en/ )
- Bower ( http://bower.io/ )
npm install -g bower
- HTTP Server
npm install -g http-server
Used to launch the Hammer testing environment with the exam seed. If you are using WebStorm, you don't need to install this. Just open the index.html from within WebStorm.
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.
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
- Create a new repository at the GIT repository. If you do not have a login, please contact Certiport to have one created for you.
- Check out your newly created repository:
git clone <git_repo_url>
- Download the exam seed and extracts its contents into your the empty repo direct on your local machine.
- Navigate to your project directory in your terminal and run the following command:
npm install && node setupand following the setup instructions.
- Run http-server from the terminal:
- 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
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
From the project root
ncu -m bower
To update your packages
ncu -m bower -a
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
directory. Run from the command line:
You can optionally run
grunt watch to have it continuously compile your code:
The grunt task compiles to
sandbox/bower_components/ YOUR PROJECT NAME. For more
information custom code refer to the Hammer Developer
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.
Your mustache templates and data are placed in the
mustache directory. The data (JSON) files
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
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
directory in a minified state. The build is what you use to distribute an exam.
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
To create an Athena build:
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
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.
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
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
npm install http-server -g
Then initiate the server from the project root and open the url provided in Chrome.