Test case generation in terms of code smell refers to the features of the software that recognizes a code and design issues which make software hard to realize, evolve and preserve code. Generally, the maintenance and detection of the software applications become more difficult due to the presence of the smell. Programmers are unable to identify the source code applications and face issues to understand the source code of the project. Simultaneously, a code smell face problem to refractors and developers for upgrading and maintenance of the source code. Present, research is active in the automated detection and testing of the bad code smell. Without the knowledge of the code smell with diverse refactoring, and efficient tool make the detection of the code difficult. Particularly, the code smell in software is based on the programming of the source code, that may lead to difficulty in detection of bad code smell. This paper analysis the detection tools, method of code smells and methods for the detection of bad test code smell. The categories of different test code smells are described which includes applications, classes and different method-level code smells. Moreover, detail definition of the bad smell in source code and its types in source code is also elaborated. In addition to that, bad code smell detection is described which includes automated detection and machine learning methods for identifying the bad code smell. Additionally, the automated tools which are given as, a check style, décor, infusion, deodorant and iplasma. The detection methods are decision tree (DT), Learning group rules, Multilayer perceptron (MLP), Naïve Bayes (NB), Support Vector Machine (SVM), Radial basis system (RBS) network.