Giter Club home page Giter Club logo

boghosyouseef / cypress-cucumber-auto-setup Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 31 KB

This is a tool written in python that automatically alters the json files and index.js such that a vue project created with vue CLI can use cypress and cucumber with cypress-cucumber-preprocessor without the user having to do it manually. I did this in my free time as I realized that such modifications are simple and should be automated instead of having to do it manually every time a new vue project is created.

Python 58.57% JavaScript 36.07% Gherkin 5.35%

cypress-cucumber-auto-setup's Introduction

cypress-cucumber-auto-setup for behaviour-driven development

This is a tool written in python that automatically alters the json files and index.js such that a vue project created using vue CLI can use cypress and cucumber with cypress-cucumber-preprocessor without the user having to do it manually. I did this in my free time as I realized that such modifications are simple and should be automated instead of having to do it manually every time a new vue project is created.

Requirements

This tool can only be used after the following requirements have been satisfied:

  1. npm package has to be installed. (Windows users can use nvm to install npm)
  2. vue cli has to be installed. (can be installed with : npm install -g @vue/cli)

Setup

  1. launch the command line interface on windows or linux and navigate to where you want your vue 3 project to be.
  2. write in the following command to create the vue project: vue create <your project's name> and wait for it to finish.(*)
  3. copy and paste the python file from this repository inside the folder of your project. (**)
  4. run the python script using the command "python main.py"

(*) the naming constraint on vue projects is that no capital letters are allowed.
(**) The Python scipt has to be on the same directory level as the folders "tests" and "src"

Validation

You can check if you followed the steps correctly by running the following command in cmd inside the project's folder: npm run test:e2e When that command runs successfully, you will see cypress UI with a single feature named "featureFileTest"

cypressUI-1

If you click on it, the test should run and you should see the following:

cypressUI-2

Now you can start a new vue project with cypress and cypress-cucumber-preprocessor without all the hassle of setting up the dependencies! it's plug and play;)

References

cypress-cucumber-preprocessor: https://github.com/TheBrainFamily/cypress-cucumber-preprocessor#step-definitions-creation
npm setup: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
behaviour-driven development (BDD): https://cucumber.io/docs/bdd/

cypress-cucumber-auto-setup's People

Contributors

boghosyouseef avatar

Stargazers

Lydia Arad avatar

Watchers

James Cloos avatar  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.