Originally posted by Bhushan Jawle:
Seeing the table of contents, I should admit that I will buy the book even if I don't win. As I see from previous threads, it has been mentioned by the author that the book covers about best practices for directory structure(question which used to haut me a lot)
It seems to talk about JUnit automation. Does it provide general guidelines as
1> How to identify the candidates for automation and what not to automate
Not really. Actually it's only a question of ROI. I personally feel everything should be automated. However, if you find that it takes too long to write a test, or that the test keeps breaking, then you need to decide:
- whether it is because your implementation is too complex and could be simplified (which would also lead to a simple test). This is good because if it's hard for the test to verify some API, it means it's going to be hard for the portion of the code that will be using it too.
- whether it is because you're not using the correct testing strategy. Thus for me, it's more a matter of being experienced in knowing what testing strategy fits better a specific testing need. And this is discussed in all the book.
2> Does it talk about guidelines on when to stop writing test cases (I know this question might draw a lot of comments. I am not against thorough testing, but, I think, at least in my case, there is a tendency to overdo the test cases :-) )
Thanks
Again, it's not a black or white question. The book does explain what is test coverage and shows some examples using Clover. That will show you what portion of the code you have covered in your test. However getting 100% is not a panacea (although it's very useful as a guide). What's more important is to write good tests. Kent Beck (I think) says "test until fear turns to boredom". That sums it up I guess...