Code Monkey home page Code Monkey logo

markdown-junit-engine's Introduction

Markdown JUnit Engine

JUnit Engine for Markdown-based tests.

build JitPack codecov License

Default behavior

Markdown sources

By default, the engine will scan for markdown files within doc/.
To override this, use the markdown-junit-engine.markdown-files-root-path property.

Translation from Markdown to tests

By default, the engine will use the com.github.fridujo.markdown.junit.engine.visitor.provided.CodeBlockCompilerVisitor which compiles all code blocks with the Content-Type java.
To specify a custom MarkdownVisitorFactory, use the markdown-junit-engine.markdown-visitor-factory-class property.

The provided factory must return an implementation of MarkdownVisitor which will

  • First, be notified of each Markdown AST element
  • Then, queried for TestNode to process as part of the JUnit execution tree

A TestNode can either be a ContainerNode or a RunnableNode.

markdown-junit-engine's People

Contributors

ledoyen avatar

Watchers

 avatar

markdown-junit-engine's Issues

Smart Compiler

  • Infer missing imports (firstly unambiguous ones)
  • Wrap methods in missing class
  • Wrap code in missing method

Multiple configurations

At some point multiple configurations must be able to co-exist.
For example:

  • a default check on README.md and doc/ files
  • a custom check on samples/ files

The preferred way is to supply a YAML file, by default src/test/resources/[markdown-junit-engine](https://github.com/ledoyen/markdown-junit-engine).yml

Support AsciiDoc

AST can be produced by org.asciidoctor:asciidoctorj.

If possible, an abstraction should be created to avoid duplicating visitors.

Execute entrypoints

After compilation succeeds, the following should be executed without error:

  • main method
  • @Test methods

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.