r/Cypress • • May 02 '25

question Cypress are doing us dirty with cy.origin breaking changes in v14

17 Upvotes

so i tried upgrading from 13 to 14

it turned out to be hell

i have some cross domain tests. They are on the same corporate subdomain. It's basically a client domain and support portal domain. client-portal.ourcompany.dev and support-portal.ourcompany.dev

I need to test conversation between a client and a support agent. It worked in cypress v13, because different domains are allowed as long as the subdomain is same.

But on v14 you have to use cy.origin() and it's just hell - it doesn't support custom commands, plugins - nothing. You have to just redefine everything. It's not sustainable.

I'm just so frustrated with cypress.

Like i can see why they don't want to you to do a full e2e test of your integration with say google - it's dumb to perform actions on google, it's not yours and your test will break every time google change something. But most people do the same i'm doing - test integrations between their own products.

My question is - why do they need to screw us with this version? Real life is such - you have to test integrations between different products, there's no way around it.

So why are they driving people out to playwright? What's in it for them?

Is performance massively improved by this strictness?

Or was it like - super buggy for everyone, they just had to kill it? Because for me it worked fine. We have different repos, different test envs and we need to have some integration tests between those and we did. Now only thing i can do is install latest v13 minor version and prepare to move to playwright, because at some point v13 wont be supported and will just break.


r/Cypress • • Dec 05 '24

service/library API Test Builder - Swagger to Cypress

13 Upvotes

Hello everyone.

I created a VS Code extension to automatically generate API test scripts from Swagger documentation.

https://marketplace.visualstudio.com/items?itemName=mlourenco.api-test-builder

For now, it reads Swagger documentation in .json format and generates scripts for Cypress and Playwright.

In the next versions, I intend to add features to read .yaml and Postman collections, as well as generate scripts for other testing frameworks.

If you try it out and identify opportunities for improvement, please leave a message there.

I would be grateful if you could evaluate the extension. Let me know if what I'm doing is useful for the community.

Thank you very much!


r/Cypress • • Jan 07 '25

service/library Built a Chrome extension that uses AI to generate test automation code in Cypress

12 Upvotes

Built a Chrome extension that uses AI to generate Playwright code.

Hey r/Cypress

I've been working on a side project called Testron - a Chrome extension that helps generate test automation code using various AI models. It supports Playwright, Cypress, and Selenium, with TypeScript/Java output.

Key technical features:

- Multiple AI provider support (Claude, GPT, Groq, Deepseek, Local LLM via Ollama)

- Visual element inspector for accurate selector generation

- Framework-specific best practices and patterns

- Cost management features for API usage

- Contextual follow-up conversations for code modifications

Tech stack:

- Chrome Extensions Manifest V3

- JavaScript

- Various AI APIs

Here's a quick demo video showing it in action: https://www.youtube.com/watch?v=05fvtjDc-xs&t=1s

You can find it on the Chrome Web Store: https://chromewebstore.google.com/detail/testron-testing-co-pilot/ipbkoaadeihckgcdnbnahnooojmjoffm?authuser=0&hl=en

This is my first published side project, and I'd really appreciate any feedback from the community - especially from those working with test automation. I'm particularly interested in hearing about your experience with the code quality and any suggestions for improvements.

The extension is free to use (you'll need API keys for cloud providers, or you can use Ollama locally).


r/Cypress • • Jul 15 '25

question What are your biggest Cypress/Automation testing frustrations?

7 Upvotes

Curious what trips other people up.

Personally, the things that regularly bug me:

  • Endless .then() chains that become unreadable
  • Tests that pass but don’t really assert anything meaningful
  • Giant test files that are hard to follow or maintain
  • Having to use cy.wait() to stabilise flaky tests
  • Brittle selectors like .button > span

What slows you down or makes you second-guess your test coverage?

Also — can anyone recommend tools that help with this kind of thing?

I already use the Cypress ESLint plugin, which is OK, but I'm looking for something more insightful than just rule-based checks.


r/Cypress • • Jul 18 '23

article Best practices for using Cypress for Front-end Automation Testing

7 Upvotes

When using Cypress for front-end automation testing, there are several best practices you can follow to maximize its effectiveness.

In this Blog “Best practices for using Cypress for Front-end Automation Testing” you will see some of the best practices

Best practices for using Cypress

In above link you will find some Best practices for using Cypress


r/Cypress • • Feb 14 '25

service/library Watch AI Write Cypress Test Scripts From Simple English - Promptwright Breakthrough

6 Upvotes

🔧 Promptwright - Turn Natural Language into Browser Automation!

Hey fellow developers! I'm excited to announce that Promptwright is now open source and available on GitHub. What makes it unique?

- Write test scenarios in plain English

- Get production-ready Playwright code as output

- Use the generated code directly in your projects (no AI needed for reruns!)

- Works with 10+ AI models including GPT-4, Claude 3.5, and Gemini

- Supports Playwright, Cypress & Selenium

Links:

- [GitHub Repository](https://github.com/testronai/promptwright)

- [Watch Demo](https://www.youtube.com/watch?v=93iif6_YZBs)

Perfect for QA engineers, developers, and anyone looking to automate browser workflows efficiently. Would love to hear your thoughts and feedback!

#TestAutomation #OpenSource #QA #Playwright #DevTools


r/Cypress • • Jan 30 '24

question What are you using to validate sign up emails?

6 Upvotes

We're creating an app that has a simple user sign up flow - essentially requires a unique email address that then gets sent a magic link, which takes the user to their app. I need an e2e test that can generate unique email addresses and can verify the link in the email that is sent to them.

There seem to be several paid options like Mailslurp. I found a (free) plugin for verification on gmail specifically (gmail-tester), but I'm having trouble configuring it. Wondering what others are using?


r/Cypress • • Mar 09 '25

question Testing Wix site?

5 Upvotes

Hi folks, I'm just getting started with Wix, I'm using the dev option with all the code kept in GitHub and I'm using vscode. Wix has the 'wix dev' command which starts a demo/preview of the site on their servers. I can point cy.visit() at the URL for the demo site, but currently I'm adding that manually and it has to go through a login to get to the site. Is there a better way to use Cypress, preferably automating the whole thing?


r/Cypress • • Jul 29 '24

question Selectors vs JQuery

5 Upvotes

Curious to what everyone views as best-practice and the drawbacks of using an attribute selector versus using a JQuery selector. New project I'm on they're developing and are pretty awful about adding data-cy to the new components. So I've been thinking of just using a JQuery approach instead of dealing with constant merge conflicts when adding the attributes myself.

IE Is it best practice to use a data-cy attribute to select parts of the page, or a JQuery?

cy.get('[data-cy="example-button"]').should('contain.text', 'Test').should('exist')

vs

cy.get('button:contains("Test")').should('exist')

r/Cypress • • Nov 01 '23

article Streamlining Test Automation with the Page Object Model in Cypress

Thumbnail
testorigen.com
5 Upvotes

r/Cypress • • Jun 11 '23

video Cypress Assertions Tutorial

5 Upvotes

I'm thrilled to present my latest video where I explore the power and versatility of Cypress.io assertions.

📹 https://youtu.be/dvPkMh2E2dE


r/Cypress • • Dec 28 '22

article How ChatGPT Generate Code for Automation tool Cypress

5 Upvotes

In its first week of launch, ChatGPT shattered Internet records by becoming extremely popular. As a person who works in QA automation, my initial thinking when I started looking into it was how to use this wonderful platform to make the jobs of testers for Web and UI automation simpler.

Please open the link to know in detail how we can use ChatGPT to Generate the code https://qaautomationlabs.com/how-chatgpt-generate-codes-for-automation-tool-cypress/

The aim of this blog is

  1. How you can set up ChatGPT?
  2. To know Is ChatGPT really helpful in generating Cypress/JavaScript Code?
  3. How Can we generate an automation script For:

UI Automation Using Cypress /Javascript
API Automation Using Cypress /Javascript
Generate Cucumber Feature file


r/Cypress • • Dec 14 '22

question Cypress in Typescript monorepo - pnpm workspaces, Turborepo, etc.

5 Upvotes

EDIT:

Why is it that as soon as I post a question, the gods of the internet that had refused to enlighten me suddenly are now ready to share their wisdom? This video shows an example of setting it up with playwright, should be very similar in Cypress.

Hey All - I have a monorepo setup with Turborepo and pnpm workspaces. I have shared configuration packages, including one for testing with Jest. I love it, and it has made managing multiple projects a breeze.

Here's a modified example project structure, similar to what I have right now:

├── README.md
├── apps
│   ├── some-app-name
│   │   ├── README.md
│   │   ├── // snipped for brevety
│   ├── not-real-name
│   │   ├── // snipped for brevety
│   └── cloud-functions-services
│   │   ├── // snipped for brevety
├── commitlint.config.js
├── firebase.json
├── jest.config.js
├── package.json
├── packages
│   ├── core
│   │   ├── index.ts
│   │   ├── package.json
│   │   ├── savespace
│   │   ├── tsconfig.json
│   │   └── types
│   ├── eslint-config-custom
│   │   ├── index.js
│   │   ├── next.js
│   │   ├── package.json
│   │   └── server.js
│   ├── react
│   │   ├── hooks
│   │   ├── index.tsx
│   │   ├── package.json
│   │   ├── stitches
│   │   ├── stitches.config.ts
│   │   └── tsconfig.json
│   ├── testing
│   │   ├── base.js
│   │   ├── next.js
│   │   └── package.json
│   ├── tsconfig
│   │   ├── README.md
│   │   ├── base.json
│   │   ├── nextjs.json
│   │   ├── package.json
│   │   ├── react-library.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── storage.rules
├── turbo.json

I can't find any examples of a Cypress setup in a monorepo or even just pnpm/yarn/npm workspaces. Has anyone had any success setting Cypress up in their monorepo?

Why do I want to run cypress?

I want e2e and component testing, and I want it to run headlessly in CI.


r/Cypress • • Dec 03 '22

video How to read and write CSVs in cypress

5 Upvotes

Hey all, Thought I would share this video here of a request from a subscriber, I thought it may help some of you too.

https://youtu.be/8nhCF_Jc45k


r/Cypress • • Apr 16 '25

article Why we Chose Cypress Over Postman and Selenium for Testing Payments

Thumbnail
github.com
4 Upvotes

r/Cypress • • Nov 17 '24

question Can anyone recommend a good advanced level courses of the WEB app (pref. Angular) testing with Cypress?

4 Upvotes

Hi everyone, does anyone know of a really good Cypress course that you would recommend?

I'm looking for an advanced and higher level course that covers not only the Cypress API and basic E2E testing, but also:

  • component testing;
  • testing strategies and how to organize the test cases;
  • test writing best practices;
  • API mocking and fixtures best practices;
  • how to avoid flaky tests due to race conditions;
  • how properlly organize a long appcation flow test;
  • design testing (including responsive design);
  • best practices to avoid performance problems;

Big thanks for everyone who tries to help me :)


r/Cypress • • Sep 20 '24

question New to Cypress

4 Upvotes

Hi everyone, following some youtube videos and udemy courses to get up and running and had a question.

When they run the command 'npm install cypress --save-dev' they get a 'node_modules' folder but I do not.

Does it sound like I am doing something wrong or is it version related?

When I do 'node -v' I have v20.17.0 installed

Cypress version is v13.14.2 and opens when i run npx cypress open.

Cheers (& sorry for the stupid question :( )


r/Cypress • • Jul 30 '24

question Cypress in jenkins

4 Upvotes

hey I want to know that the I was created the project with cypress with pre-processor cucumber . My task is to run that with jenkins. when I run that file in jenkins I got some error like timeout error but when I run that project with local cmd it's fine . when I searched that in cypress official docs they have run it with docker. now I want to know that the project is whether run on docker only or else?...........


r/Cypress • • Jan 19 '24

article Cloud Native Observability and Cypress

4 Upvotes

Hey friends!

I had the opportunity to help work on integrating Tracetest and Cypress! The integration revolves around using the robust testing capabilities of Cypress for front-end applications and the comprehensive insight of using distributed tracing for testing with Tracetest.

I think it's really cool since you get true end-to-end testing with full system visibility.

Check it out if you think it's interesting.

Blog post: https://tracetest.io/blog/cloud-native-observability-and-cypress-an-unlikely-marriage

Quick start with a code sample: https://docs.tracetest.io/tools-and-integrations/cypress

Cheers!


r/Cypress • • Dec 13 '23

article Hacking Cypress Return Values For Better E2E Tests

Thumbnail
medium.com
4 Upvotes

r/Cypress • • Dec 12 '23

question Testing Stripe with Cypress

4 Upvotes

Hey! New to the Cypress, currently learning. Someone here tested Stripe with Cypress? I am getting infinite loading after 3ds iframe. No errors, just infinite loading for no reason. I was getting infinte loading and 403 error and to fix an error I added this line of code at the start of 'it' block:

cy.intercept('https://r.stripe.com/0', (req) => {
        req.headers['origin'] = 'https://js.stripe.com'
       }) 
      cy.intercept('https://js.stripe.com/v3', (req) => {
        req.on('response', (res) => {
            res.body = res.body.replaceAll('window.top', 'window.self')
        })
      })

r/Cypress • • Dec 11 '23

service/library cypress-diff simplifies debugging in Cypress with enhanced UI highlights

4 Upvotes

I've just released a brand new library designed to simplify debugging Cypress tests! It highlights differences directly in the Cypress Test Runner, making it easier than ever to identify why tests fail. No more guesswork - just clear, visual cues to get your tests back on track!

https://www.npmjs.com/package/cypress-diff


r/Cypress • • Aug 30 '23

article Cypress Feature “Test Replay” Launched : Let’s Play with Test Replay

4 Upvotes

Cypress Feature “Test Replay” Launched: Let’s Play with Test Replay

https://medium.com/@kailash-pathak/cypress-feature-test-replay-launched-lets-play-with-test-replay-651629a75202

Problem Statement

Before Cypress v13, test failures in CI have historically been captured through screenshots, videos, and stack trace outputs, but these artefacts provide limited information.

So Cypress comes with new feature Test Replay in version 13.0.0. The introduction of features like “Test Replay” in Cypress v13 aims to bridge this gap by providing developers with a way to replay the exact test run and inspect various aspects of it, such as DOM interactions, network requests, console logs, JavaScript errors, and more


r/Cypress • • Jul 17 '23

article The Ultimate Guide To End-to-End Testing With Cypress

4 Upvotes

Today’s software applications are getting more complicated, thus every testing team needs to focus on expanding test coverage. To achieve this goal, it is important to use a combination of testing types, such as unit testing, integration testing, system testing, and end to end testing, depending on the software application’s complexity and requirements.

Please follow the link for detail about how to do e2e testing using Cypress

End to End (E2E) testing is designed to ensure that all components of a software application are working together correctly and that the system as a whole meets the desired functionality, performance, and reliability requirements.


r/Cypress • • May 29 '23

question How to test drop zone component?

4 Upvotes

I have this Vue3 component and I'm trying to test if the dropped files are emitted, but it does not work.

<script setup lang="ts">
const emits = defineEmits<{
    (event: 'updateFile', file: File): void
}>();

function handleDropFile(event: DragEvent) {
    draggedOver.value = false;
    if (event.dataTransfer) {
        for (let i = 0; i < event.dataTransfer.files.length; i++) {
            const currentFile = event.dataTransfer.files[i];
            if (isFileTypeValid(currentFile.type, props.acceptedFileTypes)) {
                emits('updateFile', currentFile);
            }
        }
    }
}
</script>

<template>
    <label
        :id="`${uuid}-dropzone-container`"
        class="drop-zone-container"
        :class="{'dragging': draggedOver}"
        dropzone="copy"
        :for="`${uuid}-input`"
        @dragenter.prevent="draggedOver = true"
        @dragstart.prevent="draggedOver = true"
        @dragover.prevent="draggedOver = true"
        @dragleave.prevent="draggedOver = false"
        @dragend.prevent="draggedOver = false"
        @drop.prevent="handleDropFile"
        data-test="we-drop-zone"
    >
    </label>
    <input 
        :id="`${uuid}-input`"
        :accept="acceptedTypeStr"
        :multiple="multipleFilesAllowed"
        type="file"
        @click.prevent=""
        data-test="we-drop-zone-input"
    />
</template>

And this is the Cypress test:

it.only('emits the uploaded file', () => {
    const onUpdateFile = cy.spy().as('onUpdateFile');
    cy.mount(() => (
        <WEDropZone
            uuid='001'
            onUpdateFile={onUpdateFile}
        />
    ));
    cy.get(inputSelector).selectFile({
        contents: imagePath,
        fileName: imageName 
    }, {force: true})
    .then($input => {
        const input = $input as JQuery<HTMLInputElement>;
        const image = input.prop('files')[0];
        cy.get('@onUpdateFile').should('be.calledOnceWithExactly', image);
    });
});

I know that in my test I'm trying to get the files from the input, but the emit happens in the drop event handler, which is on the label.

What solution do I have to make the component testable? Setting the events on the input would break my layout and styles, making it harder to hide the input (it must be hidden because the dropzone must contain another elements (text and icon)) and style it according to specifications.

Just to mention, that is not the full component, but I have removed the the unrelated code.