{"id":22508702,"url":"https://github.com/mcred/vexrun","last_synced_at":"2026-04-20T13:09:34.476Z","repository":{"id":35369940,"uuid":"215875443","full_name":"mcred/vexrun","owner":"mcred","description":"Opinionated CLI Test Runner","archived":false,"fork":false,"pushed_at":"2023-06-19T10:56:51.000Z","size":157,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T00:19:14.763Z","etag":null,"topics":["cli","e2e-tests","jvm","kotlin","yaml"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcred.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-17T19:59:34.000Z","updated_at":"2023-03-01T01:52:43.000Z","dependencies_parsed_at":"2023-01-15T19:28:10.101Z","dependency_job_id":null,"html_url":"https://github.com/mcred/vexrun","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mcred/vexrun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcred%2Fvexrun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcred%2Fvexrun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcred%2Fvexrun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcred%2Fvexrun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcred","download_url":"https://codeload.github.com/mcred/vexrun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcred%2Fvexrun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32048485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","e2e-tests","jvm","kotlin","yaml"],"created_at":"2024-12-07T01:24:43.484Z","updated_at":"2026-04-20T13:09:34.460Z","avatar_url":"https://github.com/mcred.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vexrun\nOpinionated CLI Test Runner\n\n### Caveat\nThis CLI test runner was built for one application and one application only. It was built to run end-to-end tests for [Titan](https://titan-data.io/). If you decide to use it, it comes AS-IS with no promise the docs are up to date or it will work for your use case. *You have been warned*. \n\n### Install\n*   Download the latest jar from the [releases](https://github.com/mcred/vexrun/releases). \n*   Put the jar in a convient location and run with: `java -jar vexrun.jar`\n\n### Usage\n```\nvexrun -h\nUsage: vexrun [OPTIONS]\n\nOptions:\n  -f, -file TEXT            Individual test file to run.\n  -d, --directory TEXT      Directory containing test files.\n  -p, --parameters TEXT...\n  -h, --help                Show this message and exit\n\n```\nvexrun will run test from files in two ways: tests from a file specified with the `-f` option or it will traverse the current directory (specified directory with the `-d` option) for all yml or yaml files that contain tests. Each test will pass or fail depending on the provided acceptance criteria. Any failures will exit the process with code 1. If all tests pass, the exit code will be 0. \n\n```bash\n$ java -jar vexrun.jar -d ./path/to/tests`\n```\n\n### YAML Structure of Test Files\nThe top level of the file can contain any of the following three objects: tests, files or after. \n```yaml\ntests:\nfiles:\nafter:\n```\n#### Tests\nEach test can be made of the following required or optional parameters.\n```yaml\ntests:\n  - \"name of the test REQUIRED\":\n      command: REQUIRED\n      exitValue: REQUIRED Default 0\n      stdout: REQUIRED\n      wait: OPTIONAL\n      env: OPTIONAL\n```\n\n#### command\nSTRING or LIST of command to run.\n```yaml\ncommand: titan install\n\ncommand: [titan, install]\n```\n\n#### exitValue\nINT of expected exit code. Defaults to 0 expecting a successful CLI command.\n```yaml\nexitValue: 0\n\nexitValue: 1\n``` \n\n#### stdout or stderr\nThe expected response type from the system process. Pick one. There are a few ways to verify the output with stdout and stderr. Here are some examples:\n```yaml\nstdout: Output matches this single line exactly.\n\nstdout: |-\n  Output matches\n  this multi-line output\n  exactly\n\nstdout:\n  contains: Output contains this string somewhere\n\nstdout:\n  contains:\n    - Output contains this string\n    - and this string somewhere\n\nstdout:\n  excludes: output does not contain this string\n\nstdout:\n  excludes:\n    - output does not contain this string\n    - or this string \n```\n\n#### wait\nINT of seconds to wait after test finishes before starting the next test. \n```yaml\nwait: 10\n```\n\n#### env\ncommand and outputs can be defined with variables and to save variables from the test results. Variables are gathered from the system environment variables, passed through the CLI with `-p, --parameters`, saved from test results, or passed in from the files array.  \n```yaml\nenv:\n  get:\n    - SAMPLE_VARIABLE\n  set:\n    - ENTIRE_STRING\n    - REPLACE_OUTPUT:\n        replace:\n          find: \"find this string\"\n          replace: \"replace with this then return the output\"\n    - SPLIT_OUTPUT:\n        split:\n          delimiter: \"split on this\"\n          position: 3 return this position from the split array\n      \n```\n\n#### Files\nContains an array of test files and parameters.\n```yaml\nfiles:\n  - support-matrix.yml:\n      parameters:\n        DB: mongo\n        VERSION: 4\n        PORT: 27017:27017\n  - support-matrix.yml:\n      parameters:\n        DB: mongo\n        VERSION: 3.6.14\n        PORT: 27017:27017\n``` \n#### After\nHas items to run after tests. Currently has `clearVars` which will clear out any variables that have been set from test output. Does not affect environment variables or parameters passed via the CLI or files object. \n```yaml\nafter:\n  clearVars: true\n```\n\n### Sample\nThe following sample tests are used to test the [Getting Started](https://titan-data.io/getting-started) examples for titan and represent the different methods for commands and validation. \n\n```yml\ntests:\n  - \"can install titan\":\n      command: titan install\n      exitValue: 0\n      wait: 30\n      stdout:\n        contains: Titan cli successfully installed, happy data versioning :)\n  - \"can clone hello-world/posrgres\":\n      command: titan clone s3web://demo.titan-data.io/hello-world/postgres hello-world\n      exitValue: 0\n      stdout:\n        contains:\n          - Running controlled container hello-world\n          - Starting container hello-world\n  - \"hello-world/postgres already exists\":\n      command: titan clone s3web://demo.titan-data.io/hello-world/postgres hello-world\n      exitValue: 1\n      stdout: repository 'hello-world' already exists\n  - \"can list hello-world/postgres\":\n      command: titan ls\n      exitValue: 0\n      stdout: |-\n        REPOSITORY            STATUS\n        hello-world           running\n  - \"can get contents of hello-world/postgres\":\n      command: [docker, exec, hello-world, psql, postgres://postgres:postgres@localhost/postgres, -t, -c, SELECT * FROM messages;]\n      exitValue: 0\n      stdout: Hello, World!\n  - \"can remove hello-world/postgres\":\n      command: titan rm -f hello-world\n      exitValue: 0\n      stdout: |-\n        Removing container hello-world\n        Deleting volume hello-world/v0\n        hello-world removed\n  - \"can run mongo-test\":\n      command: titan run -- --name mongo-test -p 27017:27017 -d mongo:latest\n      exitValue: 0\n      wait: 30\n      stdout: |-\n        Creating repository mongo-test\n        Creating docker volume mongo-test/v0 with path /data/configdb\n        Creating docker volume mongo-test/v1 with path /data/db\n        Running controlled container mongo-test\n  - \"can insert mongo-test Ada Lovelace\":\n      command: [docker, exec, mongo-test, mongo, --quiet, --eval, 'db.employees.insert({firstName:\"Ada\",lastName:\"Lovelace\"})']\n      exitValue: 0\n      stdout: |-\n        WriteResult({ \"nInserted\" : 1 })\n  - \"can commit mongo-test\":\n      command: [titan, commit, -m, First Employee, mongo-test]\n      exitValue: 0\n      stdout:\n        contains: Commit\n      env:\n        set:\n          - COMMIT_GUID:\n              replace:\n                find: \"Commit \"\n                replace: \"\"\n  - \"can insert mongo-test Grace Hopper\":\n      command: [docker, exec, mongo-test, mongo, --quiet, --eval, 'db.employees.insert({firstName:\"Grace\",lastName:\"Hopper\"})']\n      exitValue: 0\n      stdout: |-\n        WriteResult({ \"nInserted\" : 1 })\n  - \"can select employees from mongo-test\":\n      command: [docker, exec, mongo-test, mongo, --quiet, --eval, 'db.employees.find()']\n      exitValue: 0\n      stdout:\n        contains:\n          - '\"firstName\" : \"Ada\", \"lastName\" : \"Lovelace\"'\n          - '\"firstName\" : \"Grace\", \"lastName\" : \"Hopper\"'\n  - \"can checkout commit mongo-test\":\n      command: [titan, checkout, --commit, $COMMIT_GUID, mongo-test]\n      exitValue: 0\n      wait: 10\n      stdout: |-\n        Stopping container mongo-test\n        Checkout $COMMIT_GUID\n        Starting container mongo-test\n        $COMMIT_GUID checked out\n      env:\n        get:\n         - COMMIT_GUID\n  - \"mongo-test checkout was successful\":\n      command: [docker, exec, mongo-test, mongo, --quiet, --eval, 'db.employees.find()']\n      exitValue: 0\n      stdout:\n        excludes:\n          - '\"firstName\" : \"Grace\", \"lastName\" : \"Hopper\"'\n  - \"can remove mongo-test\":\n      command: titan rm -f mongo-test\n      exitValue: 0\n      stdout: |-\n        Removing container mongo-test\n        Deleting volume mongo-test/v0\n        Deleting volume mongo-test/v1\n        mongo-test removed\n  - \"can uninstall titan\":\n      command: titan uninstall\n      exitValue: 0\n      stdout: Uninstalled titan infrastructure\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcred%2Fvexrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcred%2Fvexrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcred%2Fvexrun/lists"}