当前位置:网站首页>[automated test] cypress manual

[automated test] cypress manual

2022-06-13 05:44:00 ANKG

Cypress manual

1、 install

Front end automation 、 Interface automation 、 Test Driven Development Model (TDD)

//  Install... In an empty project 
npm init 

npm i cypress -D
//  First automatic to C Disk directory 【C:\Users\zak\AppData\Local\Cypress\Cache\9.6.1\*】
//  If the program file is not generated automatically , Just put cypress The dependency package of , Manually install by relying on the package :
node_modules/.bin/cypress install

2、 End to end (e2e)

npx cypress open

Or through configuration ·package.json, Use npm yarn perform :

  {
    
    "scripts": {
    
    	"test-e2e":"cypress open"
  	}
  }

3、 Component testing

yarn add @cypress/[email protected] @cypress/vite-dev-server --dev

yarn cypress open-ct
原网站

版权声明
本文为[ANKG]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/164/202206130540412018.html