Automated PERFORMANCE & ACCESSIBILITY TEST with CYPRESS.IO? | Cypress Tutorial
HTML-код
- Опубликовано: 11 сен 2024
- ✅ Cypress + Lighthouse to test the web performance, accessibility, good practices & SEO.
Plugin: bit.ly/3PPgfOp
Repo: bit.ly/3LYx6v5
#cypress #testing #automation #automationtesting #software #softwareengineer #softwaretesting #softwaredeveloper #javascript #typescript
🤖DISCORD: discord.gg/2F9E2fRGaU
⭐PREMIUM Cypress + Typescript course: shorturl.at/dcnPn
📣FREE Cypress videos: shorturl.at/h6iEX
To get more realistic for performance add the throttling settings. For me it works. :)
const lighthouseConfig = {
formFactor: "desktop",
screenEmulation: {
mobile: false,
disable: false,
width: Cypress.config("viewportWidth"),
height: Cypress.config("viewportHeight"),
deviceScaleRatio: 1,
},
throttling: {
rttMs: 40,
throughputKbps: 11024,
cpuSlowdownMultiplier: 0,
requestLatencyMs: 0,
downloadThroughputKbps: 0,
uploadThroughputKbps: 0,
},
};
Hello! Appreciate it, i will add it for the next video, sounds amazing 🤩
Hi Joan, can you please recored a video on how to install lighthouse to integrate with cypress v10 and up.
Awesome video. Thank you so much, Joan.
Thanks Gildo!
came across this error while trying the above. Any leads to working solution?
cy.task('lighthouse') failed with the following error:
> You probably have multiple tabs open to the same origin.
Can you please make a video about cypress parallelization and how to run multiple sessions at the same time
I'll add it to the list.
Please add this
when I executing test in pipeline using npx cypress run . it got failed with error "You probably have multiple tabs open to the same origin". How do I handle this
sir, can we perform performance testing for component in cypress please give me ans
Can you do video on the new cypress release on how write first test cos plug-in and integration folder not there
Hello! It is in my list, want to create some videos with the new setup.
@@joanmedia thanks man
I am using Cypress package version: 12.11.0. I will look to see if you have a video for it because the file structure is different. If you don't, would you please do one?
@JoanMedia
I followed your steps and I am using Cypress with Typescript, but I put the performance tests into the js files and I get this error:
cy.task('lighthouse') timed out after waiting 60000ms
node_modules/@cypress-audit/lighthouse/src/command-handler.js:46:1
44 | cy.log("-------- cy.lighthouse --------");
45 | return cy
> 46 | .task("lighthouse", {
| ^
47 | url,
48 | thresholds: thresholds || configThresholds || defaultThresholds,
49 | opts: opts || globalOptions,
Can you please help?
Increase the task timeout to something like 3 minutes or however long is needed for your particular test: `Cypress.config('taskTimeout', 180_000);`
i have the following error : cy.task('lighthouse') failed with the following error:
> Cannot read properties of undefined (reading 'numericValue'). Can you help. I am using Cypress 10.3.1
Can you please make a video about automating pagespeed insight on cypress?
Hey, I am facing some authentication issues. While running light house on authenticated pages. How to test page behind authentication?
Lighthouse is better than jmeter or it is completed different? Regards
Hi Jorge! I think they are completely different.
Lighthouse is going to give you an score, Jmeter can provide you with more possibilities, configurations and results. Hope I can review a bit of Jmeter soon :)
Is this included in your Cypress udemy course?
Hello Predrag. It is not but it is a good idea to include it, will be working on the new lecture for the next "release". I am constantly updating it.
@@joanmedia great, thank you. Will be looking into your course to improve my Cypress knowledge.
@@arsicpedja Hope you like it :D Thanks for your support.
Can you create video for reusable mocha test in cypress
Hello! What do you mean with reusable mocha?