Functional Testing

Testing MotionStack with pre-recorded sensor data from actual devices.

As part of the quality assurance process, a functional testing suite is provided to test MotionStack with real recorded sensor data.

Each API in MotionStack is designed to identify and measure a specific gesture. Raw sensor data for that gesture is recorded as motion cassettes on a variety of devices using Adtile's Motion Recorder. The functional tests play the cassettes and record the corresponding MotionStack API's responses. Then the responses are compared to strict design goals based on the expected behavior. If the API's response exactly matches the expected behavior, then the test is considered successful.

Functional testing plays a pivotal role for development to test modifications made to existing features and create new features. In addition, functional testing is used to verify local builds of MotionStack are working correctly across platforms.

The functional testing suite is installed alongside MotionStack via node modules with npm install. To run the functional tests, run npm test in the root directory of MotionStack.