d**e 发帖数: 6098 | 1 我太弱了,基本上和写source code各占一半时间,有时甚至更多,有时写着写着,发
现边边角角的case越来越多就越花时间。 | g*****g 发帖数: 34805 | 2 这个不是问题,让QA帮你找出来,更花时间。
【在 d**e 的大作中提到】 : 我太弱了,基本上和写source code各占一半时间,有时甚至更多,有时写着写着,发 : 现边边角角的case越来越多就越花时间。
| m*****e 发帖数: 4193 | | d**e 发帖数: 6098 | 4 那我平衡了
近来花得更多时间,所以越来越怀疑自己是不是有问题了
【在 m*****e 的大作中提到】 : More than 50%
| a***y 发帖数: 2803 | 5 en,test code也很难写.所以写程序前先做好计划,分析狠重要.表想到哪里写到哪里.据
说很多早期的程序员依赖酒精甚至大麻来找到灵感和兴奋.
【在 d**e 的大作中提到】 : 我太弱了,基本上和写source code各占一半时间,有时甚至更多,有时写着写着,发 : 现边边角角的case越来越多就越花时间。
| s***o 发帖数: 2191 | 6 这个时间还算合理吧
【在 d**e 的大作中提到】 : 我太弱了,基本上和写source code各占一半时间,有时甚至更多,有时写着写着,发 : 现边边角角的case越来越多就越花时间。
| s***o 发帖数: 2191 | 7 有啥unit testing 尤其是TDD的好书推荐?
【在 g*****g 的大作中提到】 : 这个不是问题,让QA帮你找出来,更花时间。
| g**********y 发帖数: 14569 | 8 Test-Driven Development (Kent Beck)
Refactoring (Martin Fowler), there is a chapter about test-driven dev. It's short but to the point. I learned a lot from that chapter, like:
- don't spend ages trying to write tests cover all areas
- the key to write test is think about features, guarantee those features are implemented as you thought
- a few good tests are better than thousands of marginal ones
- write tests where you have concern, where you cannot sleep well over it
...
When I worked for old company, they require ONE test per 10 lines of code. Well, we have 5000 lines of code, that needs 500 test cases to cover it. You know what I do? I write a test generator to generate those 500 test cases from source code. Of course, it is useless.
You force people to cheat, then people will cheat.
【在 s***o 的大作中提到】 : 有啥unit testing 尤其是TDD的好书推荐?
| D*******a 发帖数: 3688 | 9 if your manager is not pushy and understands the important of testing, spend
as much time testing as you can.
【在 d**e 的大作中提到】 : 那我平衡了 : 近来花得更多时间,所以越来越怀疑自己是不是有问题了
| g*****g 发帖数: 34805 | 10 TDD is good but shouldn't be followed religiously.
As I said, start with sunnyday cases, and add more
for marginal cases or when a bug is found.
s short but to the point. I learned a lot from that chapter, like:
are implemented as you thought
Well, we have 5000 lines of code, that needs 500 test cases to cover it.
You know what I do? I write a test generator to generate those 500 test
cases from source code. Of co
【在 g**********y 的大作中提到】 : Test-Driven Development (Kent Beck) : Refactoring (Martin Fowler), there is a chapter about test-driven dev. It's short but to the point. I learned a lot from that chapter, like: : - don't spend ages trying to write tests cover all areas : - the key to write test is think about features, guarantee those features are implemented as you thought : - a few good tests are better than thousands of marginal ones : - write tests where you have concern, where you cannot sleep well over it : ... : When I worked for old company, they require ONE test per 10 lines of code. Well, we have 5000 lines of code, that needs 500 test cases to cover it. You know what I do? I write a test generator to generate those 500 test cases from source code. Of course, it is useless. : You force people to cheat, then people will cheat.
| l*********s 发帖数: 5409 | 11 Though it is essential, but writing testing is kind of killing the fun. :-( | a***n 发帖数: 584 | 12 If things are done in the right way, I might spend more time in writing unit
test, and to have at least 90% core code coverage.
Test code is usually twice as long as the production code, especially if you
want to incorporate mock test and integration test. |
|