We have tried to introduce unit testing front end logic on a recent project and the value of the tests are being questioned.
We were not code reviewing the tests so the quality of them is poor, developers copied poor tests creating more poor tests and so we have a lot of crap tests.
I still believe there is value in testing the presenters (we use MVP) but getting people on board with this is more difficult than I originally thought.
How can I get people into thinking front end tests are valuable and has anyone got any good resources to point me to, to back me up with this?
Thanks...
Unit testing front end logic is extremely hard since there are many parts that make it up like server side code changes to the front end and client side changes can all affect how the application appears.
On the Google testing blog they talked about the value of testing all the parts of a MVP and the value of testing AJAX by stubbing the expensive parts here. Misko Hevery talks about the different tests here and I feel that the Front End tests fall into his large test category so always have the chance of false negatives/positives but they need to be sorted because they still offer a lot of value
Front end tests are extremely valuable as they check the user functionality hasn't dropped off. This is why tools like Selenium and Watir are so popular.