GithubHelp home page GithubHelp logo

yiehoo / foncia-cypress-test Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 1.85 MB

Functional automation testing solution using Cypress for Foncia service

TypeScript 91.03% Gherkin 4.80% Dockerfile 4.17%
cypress cucumber mochawesome papaparse typescript cypress-xpath data-driven-testing page-object-model yarn

foncia-cypress-test's Introduction

Foncia Cypress Test

Functional automation test solution using Cypress for Foncia service

Foncia Cypress Test

Features

  • A front end testing tool built for the modern web
  • A strongly typed programming language that builds on JavaScript, giving better tooling at any scale
  • A tool that supports Behaviour-Driven Development(BDD)
  • POM (Page Object Model) a design pattern, popularly used in test automation that creates Object Repository for web UI elements
  • A custom reporter for use with the Javascript testing framework
  • DDT (Data Driven Testing) a software testing method in which test data is stored in table or spreadsheet format
  • Package manager for code
  • CI/CD frequently deliver apps to customers by introducing automation into the stages of app development

Tech

Foncia Cypress Test uses a number of open source projects to work properly:

  • Cypress - JavaScript End to End Testing Framework
  • Typescript - TypeScript is JavaScript with syntax for types
  • Mochawesome - Custom reporter for use with Javascript
  • Cypress-xpath - Adds XPath command to Cypress.io test runner
  • Cypress-Cucumber-Preprocessor - Provide developers experience and behavior similar to that of Cucumber, to Cypress
  • Webpack-Preprocessor - Cypress preprocessor for bundling JavaScript via webpack
  • YARN - A package manager for code
  • papaparse - The powerful, in-browser CSV parser for big boys and girls

Install and run tests locally

Foncia Cypress Test requires Node.js v16.10+ to run.

Enable YARN to start using the package manager

corepack enable

Install the dependencies and devDependencies.

cd FONCIA-CYPRESS-TEST
yarn install

Run the tests

To run the test on production :

yarn test --env ENV='production'

Additional commands not needed to be run but might be help

To merge mochawesome reports

yarn merge-reports

To generate an HTML report

yarn generate-htmlreport

To convert CSV file to JSON file

yarn convertCSVtoJSON

Install and run tests using Docker

Docker must be installed on the targetted machine to be able to build an image

Create an image of the Cypress project

cd FONCIA-CYPRESS-TEST
docker build -t my-cypress-image:1.0.0 .

Run the tests

To run the test on production :

docker run -i -v $PWD:/my-cypress-project -t my-cypress-image:1.0.0 --spec cypress/e2e/*.feature --env ENV='production'

CI/CD Integration

The Foncia Cypress Test provides a Jenkinsfile that will help setup up a Jenkins Pipeline with the least effort possible.

How to do it?

  1. Create a new Pipeline on Jenkins
  2. Go to 'Advanced Project Options'
  3. Specify 'Pipeline Script from SCM', 'Git', Repository URL, Credentials, Branch
  4. Set 'Script Path' to 'Jenkinsfile'

JenkinsPipelineConfig

Plugins requiered

AnsiColor
HTML Publisher Plugin
NodeJS Plugin

Cypress Dashboard

To access Cypress Dashboard please click on me to see the details

License

MIT

Free Software, Hell Yeah!

foncia-cypress-test's People

Stargazers

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