Coder Social home page Coder Social logo

dipjyotimetia / cypresstestframework Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 4.0 9.35 MB

CypressTest Framework

Home Page: https://dipjyotimetia.github.io/CypressTestFramework/

License: MIT License

Dockerfile 0.44% TypeScript 99.56%
cypress-io test-automation testing cypress cypress-tests

cypresstestframework's Introduction

Build Status This project is using Percy.io for visual regression testing.

Cypress Test Framework

image

Sorry Cypress Dashboard

image image

Cypress Test Result

image

Installation:

  • Install nodejs 18.16.0 lts Link
  • Install Vscode link

Project Setup:

  • git clone repo
  • npm install

Write Code:

  • Add /// <reference types="Cypress" /> and /// <reference types="../support" /> if required /// <reference types="cypress-downloadfile"/> reference on the top, to get typed reference.
  • Add new spec file with the format TC00*_SampleTest*_spec.js
  • Write functions in PageObjects as E.g login
  • Write helper methods in support/actions.js
  • Add test data in data/testdata.js
  • Add mock data files in fixtures/

Configure/update/set Test Environments:

  • Open config and update test environment urls,user,pass and update it to config.js
  • Test environment json files names are case sensitive
  • To run test on specific environment update configFile=uat or configFile=prod

Setup SorryCypress Dashboard:

  • docker-compose up -d

Test:

  • test:cypress run tests in sorry cypress dashboard
  • npm run cy:chrome run tests in chrome browser
  • npm run cypress:open for test development and run(Test Watcher is set to false)
  • npm run cy:test run all tests in headless
  • npx cypress run --env configFile=test --headed --spec 'cypress/integration/TC002_Login_Spec.js' To run specific test in chrome

Generate Report Locally:

  • npm run combine-reports to combine mocha json report
  • npm run generate-report to generate html report

cypresstestframework's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar dipjyotimetia avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cypresstestframework's Issues

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.