To check whether your server handles the custom data source API requests as expected, you can use our test suite that covers basic use cases. It sends requests to your back end and expects a specific response in return.
Our testing program works for any server implementing the custom data source API, no matter the server-side technology used.
Step 1.1. To pass our tests, your server should have an appropriately configured test index:
data index in requests to the server. Therefore, create an index with this name for the test data.Step 1.2. After configuring the index, run your server.
Complete the following steps to download, configure, and run our tests:
Step 2.1. To get our test suite, download it as ZIP or clone it with the following commands:
git clone https://github.com/flexmonster/api-data-source
cd api-data-source/tests
Step 2.2. Install npm dependencies described in package.json:
npm install
Step 2.3. Open the tests/config.json file and specify the path to your API endpoints in the url property:
{
"url": "path_to_your_server",
// Other configs
}Step 2.4. The tests/config.json file contains other configurations for the tests. Check them out and adjust if the default values do not work for your server.
Step 2.5. Run the test suite with the following command:
npm test
You will see test results in the console. For example:

Tests can be adjusted to your custom data source API implementation through the tests/config.json file. It contains the following configuration properties:
| Property/Type | Description |
|---|---|
| url String | The path to your API endpoints. Default value: "http://localhost:3400/api/cube". |
| emptyValue Any value | Defines how your server should treat null or undefined values from the dataset. For example, our sample Node.js server replaces null and undefined values with an empty string ( ""). In this case, the emptyValue should be "" — then the test suite will expect "" instead of null and undefined in the server’s response.Default value: "". |
| valueFilters Boolean | Specifies whether to run tests for value filters (true) or not (false).Use these tests if you have implemented the custom data source API without multilevel hierarchy support (the advanced property is set to false in the response to the /fields request).Default value: false. |
Let's have a look at the files you can find in the tests/test/ folder:
Can't find your answer?
Visit the FAQ
Flexmonster Pivot Table & Charts is a JavaScript pivot table component for adding interactive reporting and data analysis to web applications. Users can summarize, filter, sort, and explore data in pivot tables and charts, drill into results, and export reports.
Flexmonster works in plain JavaScript and TypeScript projects. It also integrates with React, Next.js, Angular, Vue, Blazor, and other technologies. See all integration options.
Flexmonster supports JSON and CSV files, SQL databases, MongoDB, Elasticsearch, and Microsoft Analysis Services (SSAS). You can also connect other data sources through your own backend. See supported data sources.
Flexmonster offers licenses for internal corporate use, SaaS products, and OEM distribution. Pricing varies by license and plan. SaaS projects can also use the free SaaS Entry license during development. Learn more on the pricing page.
Yes. Flexmonster offers a 30-day free trial that lets you evaluate all its features. No credit card is required. The trial version has a watermark.
To get started with Flexmonster, follow our integration guide.