Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Question to audience?
- How to write untestable code?
- Test your code
- - Choose automation
- - Make it easy to test & modify
- - Not test - No agile
- - Agile is out of reach if you don’t focus on tests
- - Pay for testing
- why we hate testing
- - understanding of req is not clear. so no edge cover
- - taking time more than implementation
- - Not used to it
- - having party in evening
- - Yes we all kids
- Best practice on test
- - Don't test your implementation, Test your behaviour
- - Think you are testing one of public api
- - Provide appropritate name for your test with domain / natual language / descriptive
- - Diagnostics
- - assertTrue(a == 1); vs asertEquals(1,a);
- - asertEquals("Failed, Becoz we are not one",1,a);
- TDD
- write test before your implementation
- dependency injection
- Better OO code
- Red green refactor
- Few important clean code principal
- - DRI
- - Magic number
- - Tell don't ask
- - Yagni
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement