Releases: IDML/idml
v1.0.27: Merge pull request #7 from IDML/feature/geo-to-timezone
Add `timezone` method to the geo module
IDML Testing Tool Preview v4
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
See original release for full notes.
This includes further fixes for relative paths in references.
IDML Testing Tool Preview v2
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
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
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
Fix the environment variable used for geo's password
v1.0.24
allow silent json blocks in idmldoc
v1.0.23
Merge branch 'master' of github.com:IDML/idml
v1.0.22: Merge pull request #2 from IDML/bugfix/negative-array-indexing
Fix negative array indexing