Warning
Under development!
Note
(coming soon) Please check out the Wiki section for details and examples
The core for data testing framework for Qlik Sense apps
Data testing (especially regression testing) is usually boring and time consuming job. There are different approaches for automate/semi-automate data testing.
Test-O-Matiq
is designed to be ran against Qlik Sense app. The package will execute user defined set of tests. The tests are split in few main areas:
(needs updating)
qOneAndOnlyOne
property should be presentInstall the package from npm
npm install --save test-o-matiq
Peer dependencies
test-o-matiq
accepts a valid json input and an instance of a Qlik app. But the app instance should have enigma-mixin added
// NodeJS (pseudo) example (not final. needs updating!)
import { TestOMatiq } from "test-o-matiq";
import { docMixin } from "enigma-mixin";
import * as enigma from "enigma.js";
import * as schema from "enigma.js/schemas/12.20.0.json";
import WebSocket from "ws";
const config = {
schema: schema,
mixins: docMixin,
url: "ws://localhost:4848/app/engineData",
createSocket: (url) => new WebSocket(url),
};
const session = enigma.create(config);
const global = await session.open();
const app = await global.openDoc(`some-app-id`);
const testSuite = {
description: "Test if table exists",
version: "0.0.1",
spec: {
Meta: {
DataModel: {
Table: ["Table Name"],
},
},
},
};
const testOMatiq = new TestOMatiq(testSuite, app);
const result = await testOMatiq.run();
result
variable will have the following data: