Giter Site home page Giter Site logo

gianluigip / spectacle Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 1.48 MB

Living Documentation for Distributed Systems

License: GNU Lesser General Public License v3.0

Kotlin 99.23% HTML 0.39% CSS 0.04% Dockerfile 0.32% Procfile 0.01%
kotlin testing documentation-tool bdd

spectacle's Introduction

Maven Central Docker

Spectacle

Living Documentation for Distributed Systems

In modern distributed systems the behavior of the product is defined across multiple components and services, and usually developed by multiple teams, as a result, the documentation is fragmented and difficult to find.

Additionally, the system tends to change faster than the documentation which makes the latter unreliable.

Spectacle provides a solution for generating documentation from the multiple codebases in a modern system and then storing it in a central repository that anyone can access.

It has two main components:

  • spectacle-dsl: a Kotlin lib for transforming regular tests into specs that can be published to a central repository of specifications.
  • spectacle-central: a repository for specifications that allow to find and share the behaviour of all the features in the system.

Spectacle follows the philosophy that only the code and by extension the tests provide accurate documentation of the system, so it provides a DSL for writing readable tests that can be published into a central repository to allows everyone to review.

A Kotlin multiplatform library for generating documentation from tests and Markdown files, it can be used as a standalone tool for improving the readability of tests or in combination with Spectacle Central to generate living documentation.

Add dependencies:

  testImplementation("io.github.gianluigip:spectacle-dsl-bdd:VERSION")
  testImplementation("io.github.gianluigip:spectacle-dsl-assertions:VERSION")
  testImplementation("io.github.gianluigip:spectacle-dsl-publisher:VERSION")
  testImplementation("io.github.gianluigip:spectacle-dsl-http:VERSION")
  testImplementation("io.github.gianluigip:spectacle-dsl-protobuf:VERSION")

Example of a JVM spec class:

@Feature("First Feature", description = "Description defining the feature.")
@ExtendWith(JUnitSpecificationReporter::class)
class JunitExampleTest {

    @Test
    @Specification
    fun `DSL allow to write specs with minimum overhead`() =
        given("a test with multiple steps") {
        } whenever "it executes" run {
        } then "it should register all the BDD steps" runAndFinish {
        }
}

Review Spectacle DSL README for more details.

Repository for the living documentation generated by Spectacle DSL, it allows to centralize the documentation generated from multiple executions of the DSL across multiple repositories, so even though the docs are generated from multiple sources it can be queried from a central place which increase the value for the organization as a whole.

Specifications Page

  • Username: guest
  • Password: guest

Review Spectacle Central README for more details.

spectacle's People

Contributors

dependabot[bot] avatar gianluigip avatar

Stargazers

 avatar Tony Duriez avatar Rey avatar Moritz Hofmeister avatar Manuel Bolivar avatar

Watchers

 avatar

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.