Re:Unit testing, Lean Startup, and everything in-between
by itamarst on Sunday March 12, 2017 @03:52PM
(#13852674)
Some automated test suites are inherently badly written: automated UI tests, for example, when the UI is rapidly changing. "Tests should be written so they would indicate breakage early and address unstable, complex, but highly used parts of program." Yes: if your UI is changing every two days your automated UI tests break every two days, with no knowledge gained!
For library code I'd use TDD, though.
UIs are more suited to human testing (though cost pushes towards automated testing once the UI is stable enough), APIs are more suited to automated testing. And if you're doing prototyping or usability testing you might not need either (you might not even need to write code, sometimes).
Re:Unit testing, Lean Startup, and everything in-between
by kkapelon on Sunday March 12, 2017 @05:39PM
(#13853277)
Effective UI tests use the page pattern and should be resilient against minor UI changes.
https://martinfowler.com/bliki/PageObject.html
There are several testing tools that support this pattern.
Re:Unit testing, Lean Startup, and everything in-between
by itamarst on Sunday March 12, 2017 @05:45PM
(#13853310)
In initial stages of product development the UI can change much more drastically than just minor tweaks.
Waste of time? I'd argue that right amount of unit and other automated tests actually decreases time to market as it allows make changes to the software much quicker and push it to production with more confidence. Yes, at early stages, when it is not clear whether anyone needs the software.
Sure a badly written test suite only slows down development. Tests should be written so they would indicate breakage early and address unstable, complex, but highly used parts of program.