Code Monkey home page Code Monkey logo

chutney's Introduction

Chutney

Spice up your spec , Better taste your app !

Build Codacy Badge Coverage Status Maven Central


Summary


Introduction

Chutney aims to test deployed software in order to validate functional requirements.

Chutney scenarios are declarative written with a kotlin dsl. They provide functional requirements and technical details (needed for automation) in a single view.

Chutney is also released as a standalone application including a test execution engine and a a web front end to consult test reports.

Technical details are provided by generic Actions (such as HTTP, AMQP, MongoDB, Kafka, Selenium, etc.)
Those Actions are extensions, and you can easily develop yours, even proprietary or non-generic one, and include them in your own release.

In addition, Chutney provide SpEL evaluation and extensible Function in order to ease the use of managing scenario data like JSON path or Date comparison.

Find out more in the documentation !

Still asking yourself "Why another test tool ?"


Installation

Locally

In order to install Chutney on your machine, you can use Java or Docker. See Start a server.

On premise

See installation on premise, for details if you want to customize your own version of chutney server.


Scenario Example

You can find all the documentation of how to write a scenario here

Example of a scenario

Here is an example of a scenario written in Kotlin.

    const val HTTP_TARGET_NAME = "HTTP_TARGET"

    const val FILMS_ENDPOINT = "/films"
    private val JSON_CONTENT_TYPE = "Content-Type" to "application/json";

    var FILM = """
    {
        "title": "Castle in the Sky",
        "director": "Hayao Miyazaki",
        "rating": "%rating%",
        "category": "fiction"
    }
    """

    val http_scenario = Scenario(title = "Films library") {
        Given("I save a new film") {
            HttpPostAction(
                target = HTTP_TARGET_NAME,
                uri = FILMS_ENDPOINT,
                body = FILM.trimIndent(),
                headers = mapOf(
                    JSON_CONTENT_TYPE
                ),
                validations = mapOf(
                    statusValidation(201)
                ),
                outputs = mapOf(
                    "filmId" to "#body".elEval()
                )
            )
        }
    
        When ("I update rating") {
            HttpPatchAction(
                target = HTTP_TARGET_NAME,
                uri = "$FILMS_ENDPOINT/\${#filmId}",
                body = """
                    {
                    "rating": "79",
                    }
                """.trimIndent(),
                headers = mapOf(
                    JSON_CONTENT_TYPE
                ),
                validations = mapOf(
                    statusValidation(200)
                )
            )
        }
    
        Then ("I check that rating was updated") {
            Step("I get film by id") {
                HttpGetAction(
                    target = HTTP_TARGET_NAME,
                    uri = "$FILMS_ENDPOINT/\${#filmId}",
                    headers = mapOf(
                        JSON_CONTENT_TYPE
                    ),
                    validations = mapOf(
                        statusValidation(200)
                    ),
                    outputs = mapOf(
                        "title" to "jsonPath(#body, '\$.title')".spEL(),
                        "rating" to "jsonPath(#body, '\$.rating')".spEL()
                    )
                )
            }
        Step ("I check rating"){
            AssertAction(
                asserts = listOf(
                    "title.equals('Castle in the Sky')".spEL(),
                    "rating.equals('79')".spEL()
                )
            )
        }
    }
  • In this example the scenario will save the content of FILM to an external server.
  • Then it will update it, fetch it and finally verify that the FILM has indeed been updated.
  • In this scenario we perform Http Actions, you can find all available Chutney Actions here
  • You can find some other example with jms, kafka, rabbit or sql here

Documentation

Get the official documentation for more information about how Chutney works.


Contributing ?

PRs Welcome

See the Getting started, which document how to install and setup the required environment for developing

You don't need to be a developer to contribute, nor do much, you can simply:

To help you start, we invite you to read Contributing, which gives you rules and code conventions to respect

To contribute to this documentation (README, CONTRIBUTING, etc.), we conforms to the CommonMark Spec

Support

We’re using Discussions as a place to connect with members of our - slow pace growing - community. We hope that you:

  • Ask questions you’re wondering about,
  • Share ideas,
  • Engage with other community members,
  • Welcome others, be friendly and open-minded !

Contributors

Core contributors :

We strive to provide a benevolent environment and support any contribution.

chutney's People

Contributors

nbrouand avatar dependabot[bot] avatar boddissattva avatar bessonm avatar rbenyoussef avatar karimgl avatar delaunayalex avatar dependabot-preview[bot] avatar adrien-gogois avatar ledoyen avatar geva2072 avatar tulinhnguyen avatar amalmtt avatar fgibelin avatar owerfelli avatar pkode avatar 96radhikajadhav avatar redouaeelalami avatar gissehel avatar yueshigao 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.