Read this in Portuguese / Ler em Português
DANTES is a web tool designed to detect and refactor test smells in Java unit test code using JUnit. Currently, DANTES offers detection and refactoring coverage for 11 different types of test smells and is capable of refactoring an entire test class with a single button click.
To use DANTES, you need to have the following dependencies installed:
- Java: available at www.java.com
- NodeJS: available at em www.nodejs.org
O processo de instalação consiste nos seguintes passos:
- Download or clone the repository
- Navigate to the project folder
- Open a terminal in the project folder
- Run the command
npm installin the terminal - Run the command
node app.jsin the terminal - Open a browser at the address http://localhost:3000/
git clone https://github.com/arieslab/DANTES.git
cd DANTES
npm install
node app.jsWhen opening the tool's page, this should be its structure. Marked in red circles numbered from one to nine are some important points of the tool:

- This is the main text box of the tool; here the user can write or paste the test code they wish to submit for analysis;
- With this button, the user can switch the theme between light and dark;
- The "Detect" button must be clicked for the tool to perform test smell detection on the provided code;
- The user can click the "Upload a file" button to choose a file and copy its content directly into the text box;
- In this dropdown menu, the user can select different ways to sort the display of the found test smells:
- Select "Order by Position in Code" to sort according to the order of appearance of the smells in the code;
- Select "Order by Smell Type" to sort by the alphabetical order of the test smell names;
- After the test smells are detected, this box will be updated with a list of all found test smells;
- This box will display the code submitted for analysis, with the lines containing test smells marked in red;
- After a refactoring is performed, the refactored code will be displayed in this box, with the refactored lines marked in green;
- The user can click this button to copy the entire content of the displayed code to the clipboard.
After submitting the code and performing the detection, the box marked with number 6 will be updated as such:

- Above the box, this line is updated to display how many test smells were found in the submitted file or if there was any errors during execution;
- Inside the box, each line corresponds to an occurrence of a test smell found in the code. The line details the type of smell, the method where it was found, and the line number;
- For each smell, a green button is provided for the refactoring to be performed for that smell. To execute it, simply press the button, and the tool will perform the refactoring named on the button;
- By clicking this button, all test smells found in the code will be refactored at once.
