GithubHelp home page GithubHelp logo

safatoujani / cytorus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from naturalintelligence/cytorus

0.0 0.0 0.0 537 KB

Cytorus is a cypress file preprocessor which allows you to run cucumon(gherkin like) tests in parallel with threshold and many must to have features

License: MIT License

JavaScript 90.11% Gherkin 9.80% Shell 0.09%

cytorus's Introduction

Cytorus

Cypress Preprocessor

Cytorus is cucumon implementation of Cypress. Cucumon is nothing but gherkin like feature file with a few extra features.

Features

  • Threshold based approach to fail a build. This feature is very helpful for CI/CD. Your build can be green with flaky or timebound tests. You can keep the build green for particular features while other failing tests are still being fixed.

  • Parallel run: Cytorus analyze the number of parallel processes it can run to run the tests in parallel. However, you can control the limit or parallel features anytime.

  • Custom Analyzer: You can wrte your own logic to build reports or to analyze final result.

  • Cucumon Syntax support: Cucumon instruction help to reduce code to convert data table and doc strings in other format.

    Given the following query params
        #> {}
        | from | XML  |
        | to   | JSON |
    

    Step definition will get following converted object;

    {
        from: "XML",
        to: "JSON"
    }

    {}, [], and [{}] are currently supported for data table. json are supported for doc string.

  • Cytorus allow you to run tests by their position in partifular feature file. It can help you when you have some automation logic to identify tests to run without adding tags or doing any change in the repository.

  • Debugging: Cytorus adds informative message with each step to display in command pannel or console logs on Cypress dashboard. You can also run cytorus with debug option DEBUG=cytorus npx cytorus run

Minor features

  • Cytorus skips tests marked with @skip.
  • If some tests are marked with @only then other tags will be skipped.

Many features are on the way

Setup

Install

$ mkdir project; cd project
$ npm init -y

#install cypress dependencies if you have not installed them yet
$ sudo apt-get install xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libgconf2-4
#install necessary projects
$ npm install cypress cytorus cytorus-report

Create the following folder structure

project
    |__ cypress
        |__ integration
            |__ features
            |__ steps
            |__ other
        |__ fixtures
        |__ plugins
        |__ reports
        |__ support
    |__ cypress.json
    |__ cytorus.config.js
    |__ package.json

You can check E2E folder for more detail.

Cytorus is interested in only cypress/integration/features/, cypress/integration/steps/, and cytorus.config.js. Rest config is as per cypress need.

Following configuration is required in cypress/plugins/index.js

const cytorus = require('cytorus');
module.exports = (on, config) => {
  cytorus(on, config);
}

Documentation

Detail instructions can be found in docs.

cytorus's People

Contributors

amitguptagwl 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.