DEV Community

Discussion on: How To Test JavaScript Code In A Browser

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

There's another browser testing tool called Cypress which is quite useful and interesting for front-end testing that I would like to explore in the future.

Collapse
 
lexlohr profile image
Alex Lohr

Cypress currently only supports Chromium and electron. Testcafe will support almost every browser.

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

Interesting I had never heard of TestCafe till you had just suggested to me. I'll look it up to see if it's a useful alternative to Selenium or Cypress.

Thread Thread
 
lexlohr profile image
Alex Lohr

Selenium is more a heavy-weight solution for end to end testing, whereas testcafe is meant for in-browser integration testing.

Our testing pyramid currently looks like this:

  • selenium for e2e tests (+ a few manual tests not yet automated)
  • testcafe for integration tests
  • jest for unit tests
Collapse
 
muditsingh5000 profile image
Mudit Singh

While Cypress is an awesome tool no doubt, it still lacks browser compatibility testing features. The work is on going on it though and once this feature gets launched, it's gonna become a very serious competitor for Selenium.

But till then selenium will remain a widely preferred platform.