-1

I'm trying to rapidly develop my frontend, but every time I change my code I find myself refreshing my browser and running some macro to test whether the changes in my code solved the problem.

I tried changing the process to headless PySelenium, but it takes so long for the driver to launch every time I change my code.

I also tried Cypress.io, but after following the tutorial, the directory just didn't load.

I'm looking for a headless option that runs as fast as possible.

Ideally, the testing framework is be independent of the JS development framework (e.g., React or Angular).

7
  • 1
    I did not downvote, and I think there a perfectly justified question hidden in your post, but currently it sounds too much like a rant.
    – Doc Brown
    May 11 '20 at 5:45
  • Don't only end-to-end test. You haven't said what your frontend is created with, but e.g. Angular has lower-level testing built right in, and Testing Library covers a lot of ground.
    – jonrsharpe
    May 11 '20 at 6:44
  • 2
  • @jonrsharpe I made it less rant like.
    – libby
    May 11 '20 at 20:09
  • That was someone else, my suggestion still applies. If you find E2E testing too slow, I'd recommend research on unit testing.
    – jonrsharpe
    May 11 '20 at 20:10
0

You can try something like Puppeteer, CodeceptJS, and Chromium. We have had good success with that combination and the tests run fairly quickly.

Bear in mind any headless browser tests will be slower than unit tests. I consider the browser tests to be at the top of the test pyramid, so there should be fewer scenarios to run than unit tests and there will always be some overlap with unit tests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.