Julia
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
src
test
.codecov.yml
.gitignore
.travis.yml
LICENSE.md
Project.toml
README.md
REQUIRE
appveyor.yml

README.md

NarrativeTest.jl

NarrativeTest is a Julia library for functional testing, which lets you write the test suite in the narrative form. It permits you to describe the behavior of software components in the Markdown format, and then extract, execute, and validate any embedded test code.

Linux/OSX Build Status Windows Build Status Code Coverage Status Open Issues Latest Documentation MIT License

Quick Start

This package is not (yet) officially registered with the Julia package manager, but you can install it from the GitHub repository with Pkg.clone().

julia> Pkg.clone("https://github.com/rbt-lang/NarrativeTest.jl")

To use NarrativeTest for testing your package, add test/runtests.jl:

using NarrativeTest
runtests()

Write the test suite in Markdown and save it in the test directory. Place the test code in Markdown code blocks, and use comments #-> … and #=> … =# to indicate the expected output. For example:

# Sample test suite

Verify that the expression evaluates to the expected value:

    6(3+4)          #-> 42

Check if the code produces the expected output:

    print("Hello ")
    print("World!")
    #-> Hello World!

Abbreviate the output with ellipsis:

    collect('a':'z')
    #-> ['a', 'b', …, 'z']

    display(collect('a':'z'))
    #=>
    26-element Array{Char,1}:
     'a'
     'b'
     ⋮
     'z'
    =#

To test your package, run:

$ julia ./test/runtests.jl

Support

For more information, see the Documentation.

If you encounter any problems, please submit a bug report.

Copyright

Copyright (c) 2017: Prometheus Research, LLC.

The NarrativeTest package is licensed under the MIT License.