Skip to content

kynetx/test_harness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KRL Test Harness

Test harness for KRL rulesets

usage: ./krl-test.pl [-h?] -c config_file.yml

-h|? : this (help) message -c file : configuration file -v : vebose, print diagnostic messges -d : pring details accompanying diagnostics.

example: ./krl-test.pl -c test_AWS.yml -vd

The test harness uses a test configuration YAML file to know what tests to run. The test config file looks like this:

# [email protected]/for_testing
eci: 07E6569E-6CE9-11E3-81D7-05AA87B7806A 
rules_engine: kibdev.kobj.net

test_1:
  desc: "AWS Module Test"
  domain: test
  type: store_item
  attributes:
     foo: bar
  rids:
     - b503129x1.prod

The eci is a channel to a pico where the test rulesets, the rulesets to be tested, and the test module ruleset have been installed. The rules engine will default to kibdev if not specified.

Each test is in a structure with a name that starts with test_. And structure with a name with that prefix will be run. In this case, there’s just one, the event test:store_item.

You can add attributes as shown.

If a rids array is present the event will be raised for those rids rather than generally to all installed rulesets.

If a configuration file is not specified, the file test_config.yml in the current directory will be used.

Dependencies

  • Getopt::Std
  • Data::Dumper
  • YAML::XS
  • Kinetic::Raise // included

If you want to use the Kinetc::Raise library that is included, you will need to add the following line to your .profile (/bin/sh) file so that the program can find the library:

PERL5LIB=<path to test_harness directory>; export PERL5LIB

Releases

No releases published

Packages

No packages published

Languages