Configuring dotEASY Walkthrough

This section contains a walkthrough of how to configure dotEASY with a simple example

Let’s take a deeper look to dotEASY following a simple walkthrough. Suppose you or your team works under the paradigm of extreme programming and you want dotEASY to help you during development. Let’s see step by step what you need to do in order to configure dotEASY efficiently.

We’ll create a Category, configure the metrics then we’ll create a couple of Attributes then we’ll create a Code Smell and an Advice and finally we’ll configure the reports.

Part 1: Categories

First, you should create a Category in order to sort your configuration, so go to the tools menu>dotEASY>Configuration>Categories and write on the name box “Extreme Programming” and on the description box write “Category for Extreme Programming”. Then click the “Add” button and your category will appear on the Categories list. See also configuring categories.

Part 2: Metrics

Now you may want to choose which code element is the most important for you, so you should first select what metrics you want dotEASY to calculate, so you should go to the tools menu>dotEASY>Configuration>Metrics. There, suppose you choose to work heavily on classes, so check the Class Metrics item and uncheck the rest. This will select all class metrics. If you want specific metrics to be calculated and not all class metrics, simply check or uncheck the ones you desire to be calculated. We’ll assume that we have selected all class metrics. See also configuring metrics.

Part 3: Attributes

Then, it’s time to define attributes for your advices, so go to the tools menu>dotEASY>Configuration>Attributes. There add a new attribute named “performance” by writing it on the name text box and add the description “improves the performance of the code”. Then click the “add button” and the Attribute will appear on the Attribute list. Finally, add a second attribute named “Understablility” with any description. See also configuring attributes.

Part 4: Code Smells and Advices

Now, if we want dotEASY to detect anomalies in our code, we should define Code Smells and Advices.

 

 

 

 

Now, let’s add a new advice that gives us a hint of what to do when the Code Smell is detected. To do this, go to the tools menu>dotEASY>Configuration>Advices. There, press the button “add new”. A second window will appear containing the four tabs mentioned on the configuration section.

 

 

 

The final thing you should do is associate the Advice with the Code Smell. To do this go to tools menu>dotEASY>Configuration>Code Smells. There, go to the second tab and select the Advice we’ve just created (“Extract SubClass”) and click the button “add”.

We’re done. Now, every time you request for a code Evaluation and a class with more than 1000 lines of code is detect, the Code Smell is triggered and the advice is shown to the user.

Part 5: Reports

The final thing you want to configure is the report. Let’s say that you want the metric report to show only the Metric abbreviation and its name, sorted by name on the metrics reports and the Advice name, Advice description and Code Smell name on the Advice Reports. Go to the tools menu>dotEASY>Configuration>Reports and select the “metrics report” tab. Click on the “metrics name” check box and select sorted by name on the “sorted by” option. Then, go to the “Advice report” tab and check Advice name, Advice description and Code Smell name. See also configuring reports.

     

                                                                                                                                                                                                                                                                                              

See also