# Bad smells in test > 단위 테스트에서 나는 코드 악취: [단위 테스트](https://wiki.g15e.com/pages/Unit%20test.txt)에서 나는 [코드 악취](https://wiki.g15e.com/pages/Code%20smell.txt): > Here are some attributes of tests that suggest a design in trouble. > > - **Long setup code**: If you have to spend a hundred lines creating the objects for one simple assertion, then something is wrong. Your objects are too big and need to be split. > - **Setup duplication**: If you can’t easily find a common place for common setup code, then there are too many objects too tightly intertwined. > - **Long running tests**: [TDD](https://wiki.g15e.com/pages/Test-driven%20development.txt) tests that run a long time won’t be run often, and often haven’t been run for a while, and probably don’t work. Worse than this, they suggest that testing the bits and pieces of the application is hard. Difficulty testing bits and pieces is a problem, and needs to be addressed with design. (The equivalent of $9.8 m/s^2$ is the ten-minute test suite. Suites that take longer than ten minutes inevitably get trimmed, or the application tuned up, so the suite takes ten minutes again.) > - **Fragile tests**: Tests that break unexpectedly suggest that one part of the application is surprisingly affecting another part. You need to design until the effect at a distance is eliminated, either by breaking the connection or by bringing the two parts together. > > --Chapter 32, [Test-driven development: by example](https://wiki.g15e.com/pages/Test-driven%20development%20-%20By%20example.txt) ## See also - [Test-implementation coupling](https://wiki.g15e.com/pages/Test-implementation%20coupling.txt) -