

Discover more from Cypress Testing Tips & Tricks
Lots and lots of testing content
Here are my latest Cypress-related blog posts 📝
Plus a bunch of new videos on my Cypress Tips & Tricks YT channel 📺
I have automated posting announcements to my Discord channel when I publish a new Cypres blog post or video or even an example.
Which got me thinking: how many Cypress blog posts and examples have I created over the years? So here is the automated summary scraped by a script in the repo cypress-tips-discord-bot.
That’s a lot, and almost everything is searchable from https://cypress.tips/search. I am adding scraping the lessons from my courses to the search index too!
Pick a network lesson to make public
My “Cypres Network Testing Exercises” course has grown to 135 lessons. I want to have at least 10% of its lessons free. By voting in this poll, can you pick the next lesson to open to everyone?
Maybe I will pick the top two winners to make public…
Upcoming in-person workshops
I just finished my online “Cypress Level Up Online Workshop April 2023” workshop and even figured out how to make a participation PNG image using JavaScript. Now I am planning in-person workshops. Here are the already scheduled ones:
July 13th, Toronto, Canada at RefactorDX 2023 conference. The number of participants is limited to 22, so sign up now.
September 26th, New York City at iJS conference. Not sure about the number of participants, but the price right now has the early bird discount.
Recurse and retry
I am not sure what the Cypress team is working on, the Debug panel in the Test Runner?! Really, there are no new Test Runner features, only a couple of fixes… Meanwhile, if you want to retry Cypress commands until some condition becomes true, try my cypress-recurse plugin:
import {recurse} from 'cypress-recurse'
it('returns Hello eventually', () => {
recurse(
() => cy.request({ url: '/greeting', failOnStatusCode: false }),
res => res.isOkStatusCode
)
})
The above test pings the “/greeting” endpoint until it succeeds. Now you can perform the same “retry until the given asynchronous function passes the predicate” in your cy.task
code (or any JavaScript code really)
import {retry} from 'cypress-recurse/src/retry'
const result = await retry(fn, predicate, options)
Nice, isn’t it? Want to see it in real-world examples? Check out my blog post Cypress And Twilio.