Hi Thomas, very brief and informative video, thanks. Is there any way to add screenshots to the failed scenarios. there are some workarounds but none of them works properly. Additionally, How can we add date stamp to the report generated? Thanks in advance :)
@TommiCodes4 жыл бұрын
Have a look at here: docs.cypress.io/guides/references/configuration.html#Options You can specify this in your cypress.json. In the link above is a section about screenshots and also where they are stored
@quangvo48684 жыл бұрын
Thank you very much for sharing code on how to create a beautiful Mochawesome report. I followed your video and was able to get a report. It is much appreciated. Is there anyway to pass options to cypress.run() to limit the spec to a few tests, instead of running all tests? This is the line of code: const {totalFailed} = await cypress.run(); Thank you.
@TommiCodes4 жыл бұрын
Should be possible i think. Something like this should work: `cypress.run({ spec: './cypress/integration/examples/actions.spec.js' })` Of course replace the path with the path from your spec file, that you want to run. Please give some feedback if it works. Otherwise i can check my code out and look for a solution.
@quangvo48684 жыл бұрын
@@TommiCodes Hi Thomas. I pass the arguments like this and it works nicely. const {totalFailed} = await cypress.run({ spec: 'cypress/integration/Error_combineLogFiles.js,cypress/integration/Error_getErrorCountsAndWriteToExcel.js', config: 'video=false' }); It is very kind of you to reply. Thank you!
@TommiCodes4 жыл бұрын
@@quangvo4868 Great to hear!
@kailashpathak89064 жыл бұрын
when tests pass, NPM exits without an error message when tests fail you see npm ERR! code ELIFECYCLE npm ERR! Exit status 3 Can anyone help