Skip to main content

impWorks impTest Developer Notes

impTest is based on the Build API, which has now been deprecated and will be removed from service in August 2018. Please upgrade to impTest’s successor, impt.

This information is intended for those who want to update the impTest tools.

Node.js 4.0 or greater is required for development.

Once node and npm are installed, to install impTest, download the impTest source using the following command:

git clone --recursive <repo-url-goes-here> impTest

The command downloads the impTest source and the required impUnit submodule. It is possible to manage the impUnit submodule as an independent repository and it can be downloaded manually as follows:

git clone <imptest-repo-url-goes-here> impTest
cd imptest/src
git clone <impunit-repo-url-goes-here> impUnit

Then install all dependencies:

cd impTest
npm i

impTest is prepared to be executed now:

src/cli/imptest.js <command> [options] [arguments]

A set of available options and commands can be found in the Test Project Configuration and Running Tests sections.


src/cli/imptest.js test -c samples/sample1/.imptest

Testing impTest

The Jasmine test suite is included with the project.

The following environment variables need to be set before spec run:

  • IMP_BUILD_API_KEY — Your Build API key
  • SPEC_DEBUG {true|false} — Enables/disables debug output
  • SPEC_MODEL_ID — Model ID to use for tests
  • SPEC_DEVICE_ID/SPEC_DEVICE_IDS — The ID(s) of device(s) (comma-separated) to use for tests

Then run the command npm test. Some tests are designed to fail, so the result of test execution is printed at the end of a log.


SPEC_DEBUG=false SPEC_MODEL_ID=Lu55555OJHZT SPEC_DEVICE_IDS=237d555558a609ee npm test

Important Tests need to be run either on an imp001 or an imp002 as some of them are designed to fail with an "Out of memory" error, which does not happen on imp modules with more memory available.


If you are running the tests under Windows, you must first correct the package.json file as follows: the "test": "node_modules/jasmine/bin/jasmine.js" line must be replaced with "test": "node node_modules/jasmine/bin/jasmine.js".