Cypress Tips August 2022
Blog posts, upcoming conferences, and workshops, including the free ones!
📐 Angular News
Cypress v10.5 includes Angular Component Testing support 🎉! Read the announcement blog post, check out the docs, and see if it works for you. If you have something to say about Cypress Angular component testing, use the Cypress Discord chat server, there is the “angular” channel.
For anyone migrating their end-to-end from Protractor, Cypress team has created Migrator tool running at https://migrator.cypress.io/
Migrator for Protractor for now, maybe it will be extended with other testing inputs in the future.
Blog posts
There are now 223 Cypress blog posts on my blog. Since the previous newsletter I have written the following new posts:
You Should Test More Using APIs 👈 definitely read this one!
Bonus: there are 10 new short Cypress videos on my Cypress Tips & Tricks YouTube playlist.
As always, each new blog post and video is scraped every night, you can find answers to your questions at https://cypress.tips/search.
Special mention
After deploying the site, I always thought it would be useful to trigger end-to-end tests against it using a web UI. There are services that do that, but this blog post by Yauhen Shulha shows a pretty cool combination of using TestRail test dashboard and CircleCI and cypress-grep to run the selected Cypress tests on demand.
“How to trigger Cypress tests in CircleCI from TestRail?” by Yauhen Shulha
If you want to read some relevant information, I have created trigger-circleci-pipeline module to make running tests on Circle easier. All you need is a way to pick the test to run (either by title or tag) and trigger the test run. Here is how I would start the tests from GitHub Actions UI using manual workflow (described in the blog post How “To Tag And Run End-to-End Tests”):
Conferences and Workshops
After a relatively quiet month, things are heating up again. You can catch me at the following online and in-person events:
ng-conf workshop on E2E testing using Cypress on Aug 29th, sign up here. I hope the Cypress DX team
releases the Angular component support by then, fingers crossed 🤞🏻Already here 🎉, see the start of this newsletter!DevReach in Boston on Sept 13th, I will play Wordle using Cypress, see the repo bahmutov/cypress-wordle
React RoundUp podcast on Sept 21st, I will talk about testing and more testing
QA Global Summit'22 Vol. 2 on October 18th. In this online talk, I will show “The Fuzzy Line Between End-to-End And Component Tests”. Since Cypress component tests run as mini-web applications, their tests are truly more than synthetic component tests
Testing for Good free online 2-hour workshop, where I will show an intro to Cypress and how to write an E2E and a component React test.
There are a couple of conference workshops (in person and online) in the planning stage, I will announce them publicly as soon as the details are confirmed.
Filip’s Corner
Filip Hric is a Cypress ambassador and a cool guy who writes awesome Cypress posts, records Cypress courses, and teaches Cypress online workshops. Recently he has written a blog post showing how to download and check the text in a PDF file.
“Testing a PDF file with Cypress” by Filip Hric
Pretty sweet blog post, isn’t it?
Crashing Filip’s corner for a second
After reading Filip’s blog post, I forked the repo and wrote how one could convert the PDF to HTML text, then load it right back into the Cypress browser to keep testing it. Read my “Test PDFs By Converting Them To HTML” after you read the Filip’s post.
Tip: I used a similar “get HTML as text and write into the document object to continue testing” when testing emails.
Cypress Courses Update
I have added a few more bonus lessons to my “Cypress Network Testing Exercises” course. Now there are 30 main lessons and 33 bonus ones. No one will be able to ever complete it, I swear!
“Cypress Plugins” course keeps growing, now it has 17 lessons, and I still need to record videos for some of them. The progress is slow but steady - these are advanced lessons that require time to prepare. My next group of lessons will cover a11y testing, emulating media, and using cypress-recurse plugin.
“Cypress Version 10: Fundamentals” on BlazeMeter University. I think some people already find it useful, which is great to hear
Go Rija! 👏