GithubHelp home page GithubHelp logo

Comments (5)

ISanjeevKumar avatar ISanjeevKumar commented on May 19, 2024

@hcho112 this is will work in local machine without any issue. can help If you can share the error message.

from cypress-parallel.

tnicola avatar tnicola commented on May 19, 2024

Hey @hcho112 , were you able to get this working?

from cypress-parallel.

hcho112 avatar hcho112 commented on May 19, 2024

My apologies for late update. Our team decided not to proceed with cypress unit testing so I kind of stopped investigating the issue.

from cypress-parallel.

Phonesis avatar Phonesis commented on May 19, 2024

I am using Cypress for React based component testing and cannot get it to work in parallel. I think what happens is that Webpack is launched for each thread and, as a result, only 1 webpack instance is able to launch in parallel? So as a result only 1 thread ever actually runs. I am using this script (specs exist in src folder):

    "cy:parallel": "cypress-parallel -s cy:ct:run -t 2 -d src/**/*.spec.cy.tsx",

The run starts but Webpack shuts down for one of the threads:

[webpack-dev-server] Gracefully shutting down. To force exit, press ^C again. Please wait...
[webpack-dev-middleware] wait until bundle finished: /__cypress/src/index.html

It then resumes on the other thread and a handful of the specs therefore run.

Any ideas?

from cypress-parallel.

Phonesis avatar Phonesis commented on May 19, 2024

Quick update on above for anyone who has similar problem. I was able to fix shortly after typing the above! I needed to remove a hard coded port value from the webpack config. So it was down to a port conflict. With that removed webpack assigns each instance a free port within the 8000 range. Seems ok now.

Interestingly though, the run time is actually slower running the tests in parallel (using an m1 macbook) than when doing it via single cypress instance. I suspect this is down to the overheard of launching 4 webpack instances.

So I actually am not sure cypress-parallel is worth it for when using Cypress for component mounting/testing

from cypress-parallel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.