Skip to content

YuriyPent/Cypress_V6_UI-Automation-Testing

Repository files navigation

Cypress_V6_UI-Automation-Testing

UI Automation Testing, API Testing, Frameworks with

  1. Create package.json npm init

  2. Install cypress npm install cypress --save-dev

  3. Cypress latest version npm install --save-dev cypress@latest

  4. Open cypress ./node_modules/.bin/cypress open

  5. cypress-file-upload npm install --save-dev cypress-file-upload

  6. headless
    ./node_modules/.bin/cypress run --spec cypress/integration/webdriver-uni/contact-us.js

  7. CSS selectors

  8. XPath Syntax

  9. Cypress Best Practices

  10. Cypress xpath

  11. Chai Assertion Library

  12. Cypress Assertions

  13. Chai-jQuery

  14. Cypress contains

  15. Cypress document

  16. Cypress title

  17. Cypress url

  18. Command Line

  19. Chains of Commands

  20. Commands Are Asynchronous

  21. log

  22. Commands Are Promises

  23. then

  24. Closures

  25. Aliases

  26. invoke

  27. jQuery removeAttr() Method

  28. scrollIntoView

  29. trigger

  30. Traversal

  31. cypress-file-upload

  32. Mocha

  33. Hooks

  34. fixture

  35. pause

  36. wait

  37. Using-debugger

  38. Screenshots

  39. viewport

  40. clearCookies

  41. clearLocalStorage

  42. dashboard

  43. npx

  44. Multiple-reportersnpm install --save-dev cypress-multi-reporters mocha-junit-reporter • Config cypress.json

    {
      "reporter": "cypress-multi-reporters",
      "reporterOptions": {
        "configFile": "reporter-config.json"
      }
    }

    • Add reporter-config.json

    {
      "reporterEnabled": "spec, mocha-junit-reporter",
      "mochaJunitReporterReporterOptions": {
        "mochaFile": "cypress/results/results-[hash].xml"
      }
    }

    npm install --save-dev mochawesome mochawesome-merge mochawesome-report-generatornpm run triggerAllTests-headless

  45. Switch-between-multiple-configuration-files

    cypress run --env configFile=staging

    Each of these environments would read in the configuration at these files:

    cypress/config/development.json
    cypress/config/qa.json
    cypress/config/staging.json
    cypress/config/production.json
    

    This would enable you to do things like this:

    // cypress/config/development.json
    {
      "baseUrl": "http://localhost:1234",
      "env": {
        "something": "development"
      }
    }
    // cypress/config/qa.json
    {
      "baseUrl": "https://qa.acme.com",
      "env": {
        "something": "qa"
      }
    }
    // cypress/config/staging.json
    {
      "baseUrl": "https://staging.acme.com",
      "env": {
        "something": "staging"
      }
    }
    // cypress/config/production.json
    {
      "baseUrl": "https://production.acme.com",
      "env": {
        "something": "production"
      }
    }
  46. java -jar -Dfile.encoding=UTF-8 jenkins.war

About

UI Automation Testing, API Testing, Frameworks with Cypress

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •