test-o-matiq-cli
v0.3.2
Published
CLI wrapper for test-o-matiq. Data tests for Qlik Sense apps
Downloads
7
Maintainers
Readme
Test-O-Matiq CLI
Warning Under development!
Note Please check out the Wiki section for details and examples
Command line wrapper for test-o-matiq
Introduction
This command line package wraps test-o-matiq
package and allows running data tests against Qlik app. The tests are specified in yaml files.
Installation
npm install -g test-o-matiq-cli
Usage
Example yaml file:
# yaml-language-server: $schema=https://github.com/Informatiqal/test-o-matiq/blob/main/src/schema/root.json?raw=true
# ^^^ used to load json schema for better intellisense
# if using VSCode please use "YAML" extension
description: Set of test to execute against Qlik app
author: Someone Whatever
version: 0.0.1
selections:
- field: Year
values: [2020, 2021, 2022]
spec:
Meta:
DataModel:
# check for fields presence
Field: [Year, OrderDate, SalesAmount, OrderId]
# check for table presence
Table:
- MasterCalendar
- OrderTransactions
# synthetic keys are allowed?
SyntheticKeys: false
Field: # number of values in fields
- name: Year
count: 3
- name: OrderId
count: 10
Table: # number of rows in tables
- name: OrderTransactions
count: 10
- name: MasterCalendar
count: 36
# check for variables presence
Variable:
Exists: [vLastYear]
#DoNotExists: [vTest1]
Scalar: # single expression validation. Strict comparison by default
- name: Test expression 1
expression: sum(Test)
result: 0
- name: Test expression 2
expression: sum(1000)
result: 1000
Result