insall cypress in to a node project
>> npm install cypress --save--dev --force
run cypress
>> npx cypress open
(above will open cypress configurator for the first time )
------------------------------
cypress project structure
cypress
>e2e
>>keep tests
[
inside test file
<reference types="cypress"> to gets hints on cypress library
describe('description of test quote', ()=> {
it('first test' ,()=>{
})
it('secondtest' ,()=>{
})
})
/ can have nested describe structures
]
>fixtures
>>json files to hold test data / mock apis
>support
>>command.js ( can create custom commands, can use through entire framework ex : login command )
>>e2e.js ( execute as very first thing when run tests : ex setup environment )
>cypress.config.js ( all cypress configurations )
DOM Terminilogy
0 comments:
Post a Comment