Code Monkey home page Code Monkey logo

chutney-testing / chutney-legacy Goto Github PK

View Code? Open in Web Editor NEW
18.0 8.0 20.0 9.49 MB

An opinionated test application to help you practice Specification by Example

Home Page: https://www.chutney-testing.com/

License: Apache License 2.0

Java 77.01% Gherkin 3.97% Nix 0.01% JavaScript 0.09% TypeScript 12.95% HTML 4.13% SCSS 1.73% Dockerfile 0.01% MDX 0.10%
test-driven-development acceptance-test-driven-development specification-by-example ubiquitous-language test-automation testing-tool hacktoberfest

chutney-legacy's Introduction

Spice up your spec , Better taste your app !

Build Codacy Badge Coverage Status FOSSA Status Maven Central Zulip chat

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

Chutney is released as a standalone application including a test execution engine, a web front end, and an edition server to create and edit your scenarios, consult test reports, and define your environments and test data.

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

Those technical details are provided by generic Actions (such as HTTP, AMQP, MongoDB, Kafka, Selenium, etc.)
Those Tasks 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 ?"


Summary


How to contribute ?

PRs Welcome

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
  • Getting started, which document :
    • How to install and use Chutney as a User
    • How to install and setup the required environment for developing
  • Help Wanted, if you wish to help us, but you don't know where to start, you might find some ideas in here !

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 !

For a more informal place to chat, if you worry about feeling dumb in the open on Github or feel uncomfortable with English, we can meet on Zulip through public or private messages. We will be happy to chat either in English, French, Spanish or Italian as much as we can ! :) https://chutney-testing.zulipchat.com/

Team

Core contributors :

Contributors

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

Before going open source, Chutney was inner-sourced and received contribution from over 30 persons

Roadmap

Project history

Project history can be found in the change log file

Current State

Chutney is production ready, and we use it every day.
Chutney has been successfully applied to ease the automation of hundreds of manual end-to-end tests without writing code.

Horizons

Chutney original vision strive to ease the collaboration of the 3 amigos (business people, testers and developers).
Over the past 2 years Chutney has diverged from our initial goals due to contextual reasons, but we learnt a lot on the way.

On the horizon we want to provide a custom and seamless experience to each profile of the 3 amigos. This is still a work in progress

Architecture Overview

archi

chutney-legacy's People

Contributors

96radhikajadhav avatar adrien-gogois avatar amalmtt avatar bessonm avatar boddissattva avatar delaunayalex avatar dependabot-preview[bot] avatar dependabot[bot] avatar geva2072 avatar gissehel avatar karimgl avatar ledoyen avatar nbrouand avatar owerfelli avatar pkode avatar rbenyoussef avatar redouaeelalami avatar tulinhnguyen avatar yueshigao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chutney-legacy's Issues

Campaign history report - add stop status

Currently, when there is a scenario stopped, global status of the campaign is KO.
If one scenario is stopped, we want now the global status of the campaign to be stopped in history.
SUCCESS < FAILED < STOPPED

Add a new task to consume message from a kafka topic

Today we are able to produce a message to a kafka topic using the kafka-basic-publish task.

We need to add a new task to consume a message from a kafka topic in order to validate that we sent the intended data.

It would be nice to have some flexible inputs for the task as:

  • a selector(json path like)
  • commitSync(true|false)
  • number of messages expected to return
  • number of polls or timeout
  • polling time

Id not reload when creating component

When we create a component, the page is not refreshed with the new id created.

Consequence :
We can not save modification on the component except if we reload the page.

Font size smaller on campaign page

On campaign page /#/campaign, make font-size smaller in order to deal with long campaign name.

Create an icon for campaign description like on scenario list.

πŸš€ | Improve component mode reading

Ideas :

  • Clickable component in scenario edition => DONE
  • Replace the parameters with their values ​​in components and scenarios edition
  • The task could directly propose their parameterization to avoid creating parent components
  • It should be possible to overload the names of the components when they are used in parent components or scenarios
  • Add Given/When/Then in component scenario edition

Add a new task to consume message from a kafka topic

Today we are able to produce a message to a kafka topic using the kafka-basic-publish task.

We need to add a new task to consume a message from a kafka topic in order to validate that we sent the intended data.

It would be nice to have some flexible inputs for the task as:

  • a selector(json path like)
  • commitSync(true|false)
  • number of messages expected to return
  • number of polls or timeout
  • polling time

Dataset - Dataset CRUD

Backend : Create http controller:

  • findAll(): returns dto with just: id, name, descripion, lastupdated dated
  • findById(id): returns the entire dataset
  • findVersion(vx): returns the entire datasetat version vx
  • create(...)
  • update(...)
  • delete (by id)

Frontend : Create the service that will call the backend to retrieve the information from the dataset:

Persistence of datasetin a database (TBD)
History management

Trim all tags

Actually when combining tags eg : "tag1, tag2" it will create two tags "tag1" " tag2" with space at the beginning of tag2.

issue :

  • step 1 has tags : tag1, tag2
  • step 2 has tags : tag1,tag2

we will have 3 tags : "tag1", " tag2", "tag2"

Glacio - Write scenario as feature file

Thoughts about glacio integration problems.

The primary goal is to have a new syntax to write scenario which is well known in the dev world : cucumber feature file.

Architecture

Glacio could be viewed as an adapter to Chutney engine service, which is execution of a "step definition".
Therefore, this adapter should translate feature file into a step definition.

  1. Glacio dependency
    We use for now the parser module of Glacio and depend only on the ast.
    Maybe ast model should be used instead to have fully support of Gherkin syntax as Background declaration for example...

  2. Extension point
    One should be able to add the possibility to support new syntax.
    This could be done via implementing a spi interface which define two entries :

  • Declaration of keywords to identify the service to use
  • Transformation method to map a Glacio ast to Chutney engine step definition
  1. Chutney dependencies
    Glacio adapter, being a separate module for now, must have a dependency on environment referential which is in server module.
    This seems wrong. Server module does too many things.
    This crying for new module extraction.

  2. JUnit
    It would be nice if one could execute Glacio feature like cucumber does with its JUnit runner.
    Glacio has a junit runner module.
    Maybe we should have a Chutney runner.

Writing

Gherkin is the base syntax for Glacio extension. This latter extends it by adding the possibility to have multi-level step.

  1. Step name
    Gherkin gives use the name for free
    To construct StepDefinition, one needs an environment.

  2. Task
    Executable steps are leaf steps in the multi-level declaration of a scenario.
    We start defining special keywords in order to fully identify executable steps: Execute / Run.
    Those must start an executable step name.

  3. Inputs / Outputs
    Task's Inputs/Outputs are identified through sub-steps with specific keyword: With.
    Gherkin DataTable/DocString could be used here to fulfill value.

  4. Target
    Targets name are identified through sub-step with specific keyword: On.
    Only name has to be declared as targets should be provided resources.

  5. Strategy
    ...

Dataset - List dataset

Create the Dataset menu

  • add button to menu
  • create the routing
  • create an empty page

Create Dataset list page:

  • edition button which routes to the Dataset editing screen
  • creation button which routes to the Dataset editing screen (empty as it is a creation)
  • click on a line displays a modal with a preview of the JDD (see wireframe)
  • Search on name and desctiption
  • Filter by tag combo box multi select as for campaign edition

Wireframe :
image

image

Campaign run duration on parallels run

campaign run duration is the sum of all scenarii duration even in parallels run.

reproduction:

  1. add 2 scenarii to campaign
  2. set parallels exec mode
  3. run campaign
  4. compare the duration of the campaign execution with the real time taken

Example : scenario1 60s , scenario2 120s
expected : 120s
actual : 180s

πŸš€ | Integrates with Postman collection

To gain on adoption, it could be very useful for chutney to be able to invoke requests from a remote Postman collection.

I am not sure where it should be configured in Chutney, not sure about Target as a collection can be relative to several environments.
Say some API documentation (using swagger or equivalent) is hosted somewhere with its matching Postman collection;
Instead on the low-level HTTP task, a step can refer to a request in a collection that is evolving according to the documented Target's API.

A Postman collection is in fact a large Json file documenting how an API could be used with all elements needed to construct proper HTTP calls, see https://www.postman.com/collection for more details.

Postman collection may refer to variables, the same way Tasks already are.

Pop up should not appear on scenario execution page

To reproduce the bug :

  • Go on execution history (.../#/scenario/16-13/execution/291)
  • Click on "Edit"
  • Click on "Save" or "Cancel"
  • Close the browser tab
    => the pop up "Are you sure you want to close....." appears

Todo :
No pop up

Navigation between component sometime broken

To reproduce the bug :

  • one component A
  • one component B which have component A in its steps

On component A, in "used in step" on right panel, click on component B.
On left panel, click on component A
The click on component B in "used in step" on right panel does not work anymore.

Dataset - Execution

When executing a scenario

  • recover the associated dataset if it exists.
  • Add the "pre-compilation" phase of the dataset just after that made for the parameters which will:
  • replace unique values ​​like parameters
  • If a step uses as a variable one of the header declared in the dataset , then the step is multiplied with for each iteration the replacement of the values ​​of each line of the dataset
  • save the dataset used when executing the scenario

When running a campaign

  • recover the associated dataset if it exists.
  • at the execution of each scenario, pass the dataset which will overload the default dataset of the scenario
  • save the dataset used during the campaign execution

Strategy retry

Currently, in the retry strategy, we have a total time and a waiting time.
The waiting time corresponds to the waiting time after a failed step.
The total time will be used to define how many iterations there will be.
For example if

  • total time = 20 min
  • waiting time = 2 min,
    there will be a maximum of 10 iteration. No matter the execution time of the step. So in real time, we can exceed the total time.

The issue with this retry strategy is when the retry strategies are nested because the waiting times will be multiplied. For example if we have two nested strategies with max time = 10 min and waiting time = 1 min.
The maximum time will be 100 min.

Dataset - Selection of the dataset

For all the screens :
if the scenario or campaign has no parameters, no need for JDD
Edit the controllers to add dataset reference persistence

Campaign execution report screen

  • On a campaign report you can view the dataset used during execution (you can reuse the preview component made in the campaign list)

Campaign editing screen

  • Add a combo box to select a default dataset for the campaign

Component type scenario editing screen

  • Add a combo box which allows you to select a default JDD for the scenario

Scenario execution screen (component only)

  • display what is the default JDD of the scenario
  • add a combo box to select another dataset(which will not be saved) used if the user clicks on the execute scenario button

Campaign execution screen

  • display what is the default datasetof the scenario
  • add a combo box to select another dataset(which will not be saved) used if the user clicks on the button execute campaign

Dataset - Edition

Create Dataset edition page

  • reactiv form
  • implement candeactivate if closing the page without saving
  • create save and cancel button
  • saving does not close the screen. A message appears saying that it has been saved successfully
  • input name and description
  • 4 tabs:
    • one for unique value
    • one for the datalist
    • one for links (not in wireframe)
    • one for history (not in wireframe)

Multi value tab:

  • add line button which adds a line
  • add header button which adds a header with an empty value for each line
  • import / export according to the same rules as for the single value

Single value tab:

  • add value button which adds a line
  • on each line:
  • input for the key
  • input for value
  • delete button
  • Import which opens a selection of csv files. The import delete deletes / deletes / creates all the values ​​(to be confirmed, you can also just replace / add). The import is only done on the front side. It is up to the user to save next
  • export create a csv file of unique values

Links
We can create a third "links" tab which will display where the Dataset is used (which scenarios and which campaigns). We could even display a link to the last 5/10 executions made with this Dataset .

History
We can create a fourth tab "history" which will display the history of modifications of this Dataset

Wireframe
image
image

πŸš€ | Add authorization management

  • The authorisations are stored in a file on the server authorization.json
  • Create a page to edit the file in a menu Admin -> Authorization
  • We use the json editor we already have to edit the file
  • Only ADMIN user defined in configuration or in ldap can connect to the application without beeing known in authorization.json
  • By configuration, we have to map the key of the admin role in the ldap and the ADMIN role in chutney. For example, in ldap, we could have CHUTNEY_ADMIN_USER which will be map to ADMIN profile in Chutney
  • For first access, the username is insert in DEFAULT role
  • We cannot save the file (with a message explaining why) :
    • If the role DEFAULT does not exist
    • If a user has more than 1 role
    • If an authorization does not exist
    • If the file is bad formatted

List of authorisation which can be affected to a role :

  • Scenario
    • SCENARIO_READ
    • SCENARIO_WRITE
    • SCENARIO_EXECUTE
  • Campaign
    • CAMPAIGN_READ
    • CAMPAIGN_WRITE
    • CAMPAIGN_EXECUTE
  • Env/Target
    • ENVIRONMENT_ACCESS
  • Global variable
    • GLOBAL_VAR_READ
    • GLOBAL_VAR_WRITE
  • Dataset
    • DATASET_READ
    • DATASET_WRITE
  • Components
    • COMPONENT_READ
    • COMPONENT_WRITE
  • Admin (BDD, configuration, backup,...)
    • ADMIN_ACCESS

Example of authorization.json file :

{
  "roles": [
    { "name": "READ_ONLY",
      "rights": [
        "SCENARIO_READ",
        "CAMPAIGN_READ",
        "GLOBAL_VAR_READ"
        ]
    },
    { "name": "AUTOMATIONNER",
      "rights": [
        "SCENARIO_READ",
        "SCENARIO_WRITE",
        "SCENARIO_EXECUTE",
        "CAMPAIGN_READ",
        "CAMPAIGN_WRITE",
        "CAMPAIGN_EXECUTE"
        ]
    },
    { "name": "PRODUCT_OWNER",
      "rights": [
        "SCENARIO_EXECUTE",
        "CAMPAIGN_EXECUTE"
        ]
    },
    { "name": "DEFAULT",
      "rights": [
        "SCENARIO_READ"
        ]
    }
  ],
  "authorization" : [
    { "name": "READ_ONLY",
      "users": [
        "NB12345"
        ]
    },
    { "name": "AUTOMATIONNER",
      "users": [
        "MB12345",
        "AH12345"
        ]
    },
    { "name": "PRODUCT_OWNER",
      "users": [
        "RB12345"
        ]
    },
    { "name": "DEFAULT",
      "users": [
        "AA12345"
        ]
    }
    
    ]
}

‼️
We must first improve the readability of the component scenario so that a read-only user can properly read a scenario.

πŸ’‘ for later :
Create a notification for the adminn of a new access
Allow to lock a specific component

Link to campaign execution

On page ../#/campaign, make clickable the list of 10 last campaign execution.
When we click on an execution, we should go to the campaign execution report

Campaign report

We could add graph on campaign report juste like jenkins one.
image

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.