Testing your Knewton Integration
In this section:
Setting the X-Knewton-Test
header to true
(i.e. X-Knewton-Test: true
) allows API users to create test accounts.
This header should be used to create accounts for both automated testing and quality assurance testing in the integration environment and production environments.
Some key points to keep in mind when using the X-Knewton-Test
header:
X-Knewton-Test: true
as a header, indicating that recommendations and analytics have been produced for registrations belonging to test accounts or learning instances where test accounts are registered.If you have any questions about the test header, please reach out to your Knewton Implementation Architect.
In addition to the test header, Knewton also allows including a header request-label: <string>
with an API call. By doing so, this header will be propagated all the way through the Knewton logs. This way, a partner can ask about a specific request label and Knewton can quickly identify, track, and debug that call.
In many integrations, partners may perform load tests to ensure that their application experiences no degradation of performance when a large number of users accesses it simultaneously.
Partners performing load tests in Knewton’s Sandbox environment are assigned a specific threshold that is measured in events per unit time (aggregated across graded, ungraded and focus events). During testing in Sandbox, if the application exceeds the predefined event rate for over 3 minutes, a “load test in progress” flag is turned on for that partner.
While the “load test in progress” flag is enabled, the client application will receive an HTTP 204 message for every event that it sends Knewton; however, these events will not be persisted or processed by the Knewton system. Additionally, while “load test in progress” flag is set, recommendation requests will generate “mock recommendations”, which provide syntactically valid payloads subject to additional behaviors as described below:
The X-Knewton-Rate-Exceeded: partner-soft-limited
header will be included on all recommendation and event responses during a load test. Thus an application can easily detect when it is receiving or is about to receive mock recommendations. Once the volume of requests falls below the aforementioned threshold, the API will return to its regular operations, i.e. the X-Knewton-Rate-Exceeded: partner-soft-limited
header will no longer appear in the responses.
Partners should contact their Knewton Implementation Architect for best practices for load testing their applications, or if they have specific needs for load testing underlying Knewton services.
Getting Started
Working with Adaptive Assignments
Predictive Learner Analytics
General API Usage
Brand Guidelines
Glossary