npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

test-o-matiq

v0.9.1

Published

Data testing for Qlik apps

Downloads

25

Readme

Test-O-Matiq

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

Introduction

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)

  • Meta - test the overall status of an app
    • Data model
      • Fields - list of fields to be present in the app
      • Tables - list of tables to be present in the app
      • Synthetic keys - synthetic keys are allowed or not in the app
      • Always one selected - list of fields, for which qOneAndOnlyOne property should be present
    • Objects - list of objectIds (viz, sheet etc) to be present in the app
    • Fields - list of fields to exists and the count of their distinct values is matching an expected number
    • Tables - list of tables to exists and the count of their rows is matching an expected number
    • Variables
      • Exists - variables to exists in the app
      • DoNotExists - variables to not exists in the app
    • Data - list of test cases. Each test case have two main sections:
      • Selections (optional) - this sections contains set of selections to be made before the tests are ran
      • Tests - the actual tests to be performed. Tests are ran in "order of appearance". Three (for now) type of tests can be defined:
      • Scalar - result of "one line" expressions is compared with user defined expected result. Any Qlik expression can be specified here (ones including variables, master items, alternate states etc.). Think of this type as a "textbox" validation.
      • List - check for specific values presence in fields
      • Table - (TBA) build data table from user defined dimensions and expressions and compare the result with the expected values

Installation

Install 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

Usage

// 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: result

More examples will be available soon

Solutions

  • Test-O-Matiq CLI - command line tool that runs test suites, from YAML files
  • Test-O-Matiq Web - TBA

Documentation