News for hackers. Stuff that matters.

Ask HN: Do you test your webapp's front end code? How?

I was thinking about testing my frontend code. After looking at couple of frameworks, it appears that as a developer, I think its a much bigger and complicated task to setup and maintain the framework as compared to testing the backend code (Mocking responses, check DOM manipulations, running tests in various browsers). Generally speaking, how many people do it in the wild and how do they do it?
( 4 comments | 2 points | on HN )
Re:Ask HN: Do you test your webapp's front end code? How? by bryanrasmussen on Monday October 03, 2016 @10:28AM (#12627639)
I tend to test with cucumber ( the ruby version as opposed to the js version because the dsl seems nicer to me - although haven't looked at js version in more than a year so maybe off-base on this)

Cucumber can then drive different browser libraries including selenium.

Re:Ask HN: Do you test your webapp's front end code? How? by mcdevhammer on Monday October 03, 2016 @07:35PM (#12632260)
Full integration tests (I.e. click a button in the UI, check that something was updated in the database) with Fluentlenium in Java and unit tests for directives/controllers/services (Angular) using Jasmine.
Re:Ask HN: Do you test your webapp's front end code? How? by mattkrea on Monday October 03, 2016 @10:13AM (#12627546)
Pretty sure most people are still using http://docs.seleniumhq.org/
Re:Ask HN: Do you test your webapp's front end code? How? by cauterized on Tuesday October 04, 2016 @11:59AM (#12636474)
Selenium is ok for automating click-thru testing, but it's a pretty miserable unit testing platform.

Last front-end project I worked on we did unit testing with Jasmine