Skip to content

Releases: IDML/idml

v1.0.27: Merge pull request #7 from IDML/feature/geo-to-timezone

03 Apr 15:51
a584631
Compare
Choose a tag to compare

IDML Testing Tool Preview v4

02 Apr 12:56
570583f
Compare
Choose a tag to compare
Pre-release

See previous release notes for the base testing functionality.

New things

Diff format

The default diff format is now a unified diff with diff-friendly JSON, this is formatted with predictable whitespace, more new lines than usual, and trailing commas.

Multi-testing

You can set the input field to an array, (or a reference to a file containing an array), and do the same with output, it will then iterate through all of the inputs/outputs and test them.

When running these tests, the name has the array index appended, eg. #1 appended to show that it's the first item in the array, these are 1-indexed.

Time Injection

You can now specify a time field set to a long to inject the time for the tests to run at, this is a unix epoch in seconds.

Update can make files

If your output file doesn't exist, --update will now attempt to create it.

IDML Testing Tool Preview v3

29 Mar 10:50
c6f0025
Compare
Choose a tag to compare
Pre-release

See original release for full notes.

This includes further fixes for relative paths in references.

IDML Testing Tool Preview v2

29 Mar 10:40
29f64f7
Compare
Choose a tag to compare
Pre-release

See previous release for full notes.

This adds a test report at the end, renames --resolve-plugins to --dynamic-plugins and fixes relative path issues.

v1.0.26: Fix incorrect case in geo function table names

28 Mar 12:47
Compare
Choose a tag to compare
The data dumps that are used to generate these tables create tables with
leading upper-case characters:

  * `Admin1`
  * `Cities`
  * `Translations`

sqlite doesn't seem to care about this, but other database engines do.

IDML Testing Tool Preview

28 Mar 17:27
c5e8a82
Compare
Choose a tag to compare
Pre-release

This is a pre-release of the testing support to get feedback on it.

Test Format

A new command test has been added to the tool jar, which allows you to run IDML tests specified in JSON, a test looks like this:

{
  "name" : "example test",
  "code" : "r = a + b",
  "input" : {
    "a" : 2,
    "b" : 2
  },
  "output" : {
    "r": 4
  }
}

You can make the code, input or output sections available in separate files by using JSON references, like so:

  "output": {
    "$ref": "./blah.json"
  }

Multiple tests can be defined in the same file by putting them in an array.

Snapshot Testing

The testing tool is designed around regression and snapshot testing.

It has an --update flag which will update the output object based on what's currently produced by running the input through the code, this will either update the referenced file, or the main test's JSON file.

This also includes the new plugin support, there are new flags available under --resolve-plugins to enable resolution on the main classpath (for example, for geo support in this tool jar), or --plugins-folder to take a separate folder of jars containing IDML functions.

test command

Usage: idml test [--filter <string>] [--update] [--failed-only] [--dynamic-plugins] [--plugin-folder <URL>]... [--no-report] <test.json>...

run IDML tests

Options and flags:
    --help
        Display this help text.
    --filter <string>, -f <string>
        filter to run specific tests, use re2 compatible regex or a prefix
    --update, -u
        update test snapshots
    --failed-only, -x
        suppress successful output
    --dynamic-plugins, -d
        resolve plugins from the normal classpath
    --plugin-folder <URL>, -p <URL>, -f <URL>
        folder with IDML plugin jars
    --no-report, -n, -r
        disable the test reporter at the end of a run

v1.0.25

27 Mar 12:17
Compare
Choose a tag to compare
Fix the environment variable used for geo's password

v1.0.24

27 Feb 16:19
a48f9a7
Compare
Choose a tag to compare
allow silent json blocks in idmldoc

v1.0.23

26 Feb 11:05
6c3c345
Compare
Choose a tag to compare
Merge branch 'master' of github.com:IDML/idml

v1.0.22: Merge pull request #2 from IDML/bugfix/negative-array-indexing

22 Feb 12:44
0702ecf
Compare
Choose a tag to compare