Skip to content

A Hakell program which runs system tests of an application.

License

Notifications You must be signed in to change notification settings

ExcaliburZero/system-test-haskell

Repository files navigation

System Test Travis CI Status

System Test is a Haskell application which allows you to specify and run system tests of applications.

Recording of System Test

System tests can be defined in json files with the following format, see examples/ for more examples:

[
  {
    "name": "Hello World Test",
    "command": "echo 'Hello, World!'",
    "expectedOutput": "Hello, World!"
  },
  {
    "name": "GoodBye World Test",
    "command": "echo 'GoodBye, World!'",
    "expectedOutput": "Hello, World!"
  }
]

Note: System Test does not run the test commands in sandboxes, so be careful of running system tests that may cause harm to your system.

Usage

The System Test executable file should be run with all of the files containing system tests being passed in as arguments.

system-test test1.txt test2.txt
system-test tests/*.txt

Test File Structure

The system test files are formatted using JSON. The file should contain a list of Tests, each of which should have Strings for the test name, command, and expected output.

[
  {
    "name": "Hello World Test",
    "command": "echo 'Hello, World!'",
    "expectedOutput": "Hello, World!"
  },
  {
    "name": "GoodBye World Test",
    "command": "echo 'GoodBye, World!'",
    "expectedOutput": "Hello, World!"
  },
  {
    "name": "MultiLine Test",
    "command": "echo '1' && echo '2'",
    "expectedOutput": "1\n2"
  }
]

License

System Test is available under the MIT License, see LICENSE for more information.

About

A Hakell program which runs system tests of an application.

Resources

License

Stars

Watchers

Forks

Packages

No packages published