Run an Analysis

Creating a New Project

Your first step is to create and configure a project. You do that by clicking on the “New Project” button (see Fig. 3).

Create New Project button

Fig. 3 Click on the “Create New Project” button to create a project and configure it for analysis.

Once you click the “Create New Project” button you are prompted with six choices (see Fig. 4):

  1. Specify Paths if you plan to analyze just one or two repositories and enter the paths manually.
  2. Scan Directory to auto-import multiple repositories into your analysis project.
  3. Specify Remotes let you specify Git URLs (e.g. to GitHub) and CodeScene automatically clones the repositories.
  4. Clone Existing to copy an existing analysis configuration into a new configuration. This is useful if you want to provide different analysis views, for example for variying time periods, for the same codebase.
  5. Use Google Repo to let the Repo tool manage your repositories based on a remote manifest.
  6. Import Configuration to create a new project based on a previously exported configuration.
You have five different ways of specifying the repositories to analyze.

Fig. 4 Specify the paths to the Git repositories you want to analyze.

If you chose to Specify Paths, just type (or copy-paste) the path to your local Git repository clones. You can add as many repositories as you need.

Once you click “Continue”, you arrive at the “Project Details” page (see Fig. 5). There are a number of important configuration options in this step. The Configuration include advice on how you select an analysis period. When in doubt, specify the earliest possible starting date as indicated in the help text.

NOTE: It’s important that the Analysis Results file folder that you specify is writable for the Tomcat user; all analysis result content will be stored there.

Detailed project configuration

Fig. 5 The detailed configuration lets you specify analysis period and a result path.

Once you’ve created the project you’ll arrive at its configuration details. And yes, there’s a lot, really a lot, of configuration parameters. The good news are that you normally don’t have to change any of these parameters since they all have sensible defaults. However, you want to look at your Analysis Plan. Go to the “Analysis Plan” configuration as shown in Fig. 6 and specify a suitable interval, for example once every night.

Analysis plan

Fig. 6 Your analysis plan specifies how often an analysis is run.

From now on, CodeScene will run all analyses automatically according to your plan. However, you probably don’t want to wait for the next scheduled run to get results on your codebase. That’s why CodeScene supports a forced analysis as described in the next section.

Force an Analysis

CodeScene lets you run an analysis on demand. Just go to the dashboard and press the Run button as illustrated in Fig. 7.

Force an analysis

Fig. 7 Press the Run button to force an analysis.

Run a Retrospective

CodeScene also includes the option to run an analysis tailored to a Retrospective. This feature is located on the “History” tab of your analysis project as illustrated in Fig. 8.

Run a retrospective

Fig. 8 A retrospective lets you analyze the development activity in the past sprint/iteration.

For a detailed description of the use cases for Retrospectives, read the article The Happy Marriage of Retrospectives and Software Evolution.

Find your Way Around

We’ve worked to make CodeScene as easy as possible for you to use. Basically, you just need to remember three things:

  1. Click the cogs button of your project (see Fig. 9) to access details, configuration, and to force analyses.

    Access project configuration

    Fig. 9 The cogs button in the project tile takes you to the project details and configuration.

  2. Click on the tile representing your project to inspect your analysis results.

  3. Click on the “CODESCENE” logo in the top-left corner to return to the main screen, should you ever get lost.