What does well written, readable tests look like?
Posted
by
Industrial
on Programmers
See other posts from Programmers
or by Industrial
Published on 2012-10-16T07:26:54Z
Indexed on
2012/10/16
11:23 UTC
Read the original article
Hit count: 200
testing
|unit-testing
Doing unit testing for the first time at a large scale, I find myself writing a lot of repetitive unit tests for my business logic. Sure, to create complete test suites I need to test all possibilities but readability feels compromised doing what I do - as shown in the psuedocode below.
How would a well written, readable test suit look like?
describe "UserEntity" ->
it "valid name validates"
...
it "invalid name doesnt validate"
...
it "valid list of followers validate"
..
© Programmers or respective owner