Skip to main content
Last updated June 09, 2016 07:08, by MichRomStudent
Feedicon  

QualitySpy


Introduction

QualitSpy is a framework for monitoring software development process. Failing to deliver requested feature on eligible schedule and quality may cause serious loss (e.g. financial). Therefore, it is important to keep an eye on the work progress and early identify problems. There are a number of tools employed in most of the software development environment. We believe that these tools are reliable source of metrics that can be used to evaluate project’s current state and predict about the further development. The QualitSpy framework is designed to integrate with the issue tracking system, the version control system, the continuous integration system and the source code itself by collecting raw data as well as software metrics. The collected data is used for research (empirical experimentation, estimation/prediction model creation) and for project evaluation.

Detailed information regarding project concept can be found in an article published in Journal of Theoretical and Applied Computer Science: http://staff.iiar.pwr.wroc.pl/marian.jureczko/QualitySpy.pdf

QualitySpy First Steps

The project is available as a package with source codes. Therefore, it must be compiled first using maven (execute mvn clean install in the main project directory). The QualitySpy tool is started using pl.wroc.pwr.qualityspy.gui.App from the qualityspy-gui subproject. Alternatively, the jar file generated in subproject qualityspy-acquisition can be used.

For the correct operation of the tool database is needed. Before first use it is important to create one with name, user and password. In application there is a configuration menu, in which we can then type those credentials. To configure database (assuming you have mysql) you need to type those commands:

 mysql -u root -p
 Enter password: Password_that_you_typed_while_installation
 mysql> CREATE DATABASE qs_dev;
 mysql> USE mysql;
 mysql> CREATE USER 'qs'@'localhost' IDENTIFIED BY 'qspass';
 mysql> GRANT ALL PRIVILEGES ON qs_dev.* to 'qs'@'localhost';
 mysql> FLUSH PRIVILEGES;
 mysql> EXIT;

Configuration with those creates:

  • Database: qs_dev
  • User: qs
  • Password: qspass

Settings for database in application can be found here:

Below you can see how the data is typed to connect correctly:

Starting QualitySpy released version

To start the application you need:

When the prerequisites is fulfilled do the following:

  1. Download the latest qualityspy-acquisition-*-run.zip package from: https://java.net/projects/qualityspy/downloads/
  2. > unzip qualityspy-acquisition-*-run.zip
  3. > cd qualityspy-acquisition-*-run
  4. > ./start.sh

(where * is version)

Starting QualitySpy snapshot version

To build and start the project you need:

When the prerequisites are fulfilled do the following:

  1. > svn checkout https://svn.java.net/svn/qualityspy~QualitySpy/trunk
  2. > mvn clean install
  3. > cd apps/qualityspy-acquisition/target/
  4. > unzip qualityspy-acquisition-*-run.zip
  5. > cd qualityspy-acquisition-*-run
  6. > ./start.sh

(where * is version)

Features and configuration

Before using QualitySpy tool, a proper configuration for each of QualitySpy's services (external tools/services which will be used with QualitySpy) needs to be provided. In order to do that there is a Configuation tab with 4 subtabs: CKJM, Repository, JIRA and CI:

In this section all configuration steps will be described in details. Each of the subsections describes all setting's fields in a particular Configuration's tabs. All described settings in that section refer to QualitySpy desktop application.

CKJM - Product metrics

More information about CKJM extended - http://gromit.iiar.pwr.wroc.pl/p_inf/ckjm/

CKJM configuration's fields descriptions:

  • ckjmSourceType

Type of the input artifact. Ckjm will be used to calculate metrics for this artifact. Allowed values: JAR - for a jar archive; CLASS - for a list of classes.

  • ckjmJar

Name with path (can be relative) of the jar file to analyse. It is used only when the CkjmSourceType is set to JAR.

  • CkjmClass

Path to the directory that contains classes to analyse (without package directores). It is used only when the CkjmSourceType is set to CLASS.

  • CkjmLibrariesSeparator

The character that is used to separate libraries on the property CkjmLibraries. If is not set, the default path separator ( ':' on Linux, ';' on Windows). Field is optional.

  • CkjmLibraries

List of libraries (jar files) that are neccessary to calculate metrics. A jar archive is neccessary to calculate the metrics when at least one of the measured classes refers to a class that is in the jar archive. Field is optional.

Repository

SVN

  • Reposvnuser

Login to the svn repository. User is unnecessary to login to the git repository.

  • Reposvnpass

Password to the svn repository. Password is unnecessary to login to the git repository.

  • Repofileseparator

A charactes used as a path separator. Default is '/'. Allowed values are '/' (slash) or '\' (backslash).

  • Repotype

Type of used repository. Allowed values are: "svn" or "git".

  • Repourl

URL of the svn or git repository, e.g. http://svn.apache.org/repos/asf/tomcat/trunk. Allowed values: url addresses

  • Repopath

Exact path to the project's repository (continuation fo URL specified in repourl fiel). Allowed values: char sequence divided by separators specifying repository's access path.

  • Repocontentregex

Obtains information about files in repository based on filenames, which are described by inserted regular expression. Allowed values: regular expression

  • Repodiffregex

Regular expression describing on which files should diff operation be executed (comparing files between the revisions and setting how many lines were added/deleted).

  • Repoworkingcopy

Path for a local repository copy (working directory). Allowe values: char sequence divided by separators defining a path in the file system.

  • Repostartrev

Specifies the revision where the analyze should start. It's a number for the svn. And for git it`s a date (char sequence).

  • Repoendrev

Specifies the revision where the analyze should end. It's a number for the svn. And for git it`s a date (char sequence).

Jira

Jira & GitHub issue trackers settings

Jira

  • Bugtracker

Name of issue tracking tool. Allowed values: "jira" or "github"

  • JiraUrl

URL address of the Jira system, e.g. https://jira.atlassian.com Allowed values: URL addresses

  • JiraLogin

Login name to the Jira system

  • JiraPasswd

Password to the Jira system.

  • JiraTimeout

Timeout in ms, when no timeout is specified 60 000 ms is used.

  • JiraJQLString

JQL query - filter for searching issues in JIRA, e.g.: Query: project=crucible and fixVersion=3.0'.2'., returns issues from project crucible fixed in version 3.0.2.

Github

  • githubIssueRepo

Github repository's name.

  • creator

Enter name of a user who creates an issue in Guthub repository.

  • state

State of the issues to return. Allowed values: "open", "closed", "all". Default: "open".

  • number

Issue number in Github repository, preceded by "#" sign. Allowed values: number values preceded by "#" sign.

  • assignee

ID (eg. name) of use who assignees issue. Allowed values: any user name; "none" for issues with no assigned user or "*" for issues assigned to any user.

  • labels

Name of label/labels which identifies issue/issues on Github repository.

  • since

Show issues updated at or after entered time. Time is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Allowed values: timestamp in the following format: : YYYY-MM-DDTHH:MM:SSZ

  • githubOwner

The name of the owner of Github's repository.

  • Login

Github repository's owner's name.

  • Password

Github account password.

  • Title

Filter for issues, issue title.

  • Reporter

Filter for issues, issue reporter.

  • CreatedAt

Filter for issues, date of issue creation.

  • UpdatedAt

Filter for issues, date of issue update.

  • mentioned

Name of the user mentioned in the issue.

CI (Continuous integration)

Hudson & Jenkins

  • CI sever type

Name of continuous integration server used. Allowed values: "Hudson", "Jenkins", "UNKNOWN"

  • CI server URL

URL address of CI server eg. https://jenkins.qa.ubuntu.com/ Allowed values: URL addresses

  • CI server login

User login name for CI server.

  • CI server password

User password for CI server.

  • CI job name

Job name for CI server.

Viewing collected data

Having some projects properly configured in QualitySpy tool it is possible to use "Fetch all" or different fetching options to collect the data for the specified project's version. After doing so in Collected Data tab all data collected for selected project will be present.

In the Collected data tab output is always organized the same way: on the left side there are some entries connected with a particular data types obtained for the project and on the right side some details of selected entry from the left side are visible (e.g. for selected CI system's job builds made by that job will be visible). The sample Collected data output might be similar to that one:

  • ProjectHistories

These entries are connected with particular versions of project.

  • job

Continuous Integration's system (e.g. Jenkins) jobs alongside with their details and builds made by that particular job.

  • Revisions

Repository system revisions entries.

  • Classes

Project's obtained classes.

  • Issues

Issues entries obtained from issue system (e.g. from Jira) with their numbers and details.

For instance, here is the Collected data output when there are some resivions obtained for selected project:

The following example shows how Collected data looks when some project's classes have been obtained:

Tests implementation

Unit tests

JUnit tests are the simple and fast tests that use mocks to check simple, single functionality. You should write JUnit to check every function that you use in your code. JUnit must be fast, it should be matters of seconds to run that test. Naming param is *className*Test.java

Integration tests

Integration tests are here to check whenever the functions that you use in code work well together. Those tests may take longer to run. In maven they are run in integration-test phase. Naming param is *className*IT.java, or you can use IntegrationTest instead IT, if you would like.

Acceptance tests

You write acceptance tests to check if your code fulfill, the requirements of project. Naming param is *className*Acceptancetest.java, we run these tests in integration-test phase.

Database

Simple data

There is simple sql file that you can import to your database and use within this projects. It contains single row for every table.

Dropbox

Mega

Configuration Parameter

Configuration Parameter - Step by step

There is a simple instruction how to add new configuration parameter.

First of all You have to open project, next go to quality-spy-common - its GUI module.

Next click: Source Packages and choose Propertis.java

Here You have screen how to add test parameter to project, its very simple:

Function getaddTestHomeKey return string, this string will be show in program.

OK, if You done this, go to next step.

You have to add Key() function:

TODO: getaddTestSeparator should be remove.

Please open ConfigJPanel.java file and type code similar to this. By this function You add row to Your table.

Well done, if You do not mistake it should be look like this:

TODO: There are component dedicated interfaces with subsets of parameters that should be updated.

Web application

To start web application you need:

Then you should do the following:

  • Checkout a project from https://svn.java.net/svn/qualityspy~QualitySpy/trunk
  • Execute command: mvn clean install (or mvn clean install -DskipTests if you want to skip tests)
  • Find a war file (\apps\qualityspy-server\target) and copy it into the webapps directory of Tomcat (\apache-tomcat-8.0.32\webapps)
  • Go to bin directory of Tomcat (\apache-tomcat-8.0.32\bin) then run catalina.bat and startup.bat
  • Run MySQL (e.g. using Xampp)
  • You can access your application from: http://localhost:8080/test/ where test is a name of war file which you copied into the webapps directory of Tomcat (check your webapps folder for an extracted folder test - if you do not see this folder, it means you did not start Tomcat properly)
  • In a web browser you can see a start page of web application:

Web application has only one functionality: when you click REST, you can see a list of available REST:

Acknowledgement

We would like to acknowledge all the students that were involved in the development process:

2010/2011

  • Jakub Matczak
  • Karol Zawadzki
  • Konrad Kowalewski
  • Krzysztof Abramczyk
  • Mateusz Frąckowiak
  • Michal Szczech
  • Patryk Matuszewski
  • Paweł Bochniak
  • Piotr Lenartowicz
  • Radosław Wyroslak
  • Rafal Szalanski
  • Stefan Zimecki
  • Tadeusz Tagowski
  • Tobiasz Marciniak
  • Wojciech Andruszczyszyn

2011/2012

  • Tomasz Duda
  • Kamil Kopytko
  • Tomasz Bruzdzinski
  • Radosław Iglantowicz
  • Mateusz Bilski
  • Marcin Wojciechowski
  • Przemysław Fudali
  • Piotr Dziwiński
  • Krzysztof Cywiński
  • Mateusz Adamiak
  • Roman Tsiselsky
  • Grzegorz Grzegorczyk
  • Daniel Zacharski
  • Michał Krzemiński
  • Michał Stodolny
  • Paweł Powroznik

2012/2013

  • Piotr Fraszczak
  • Kacper Rychel
  • Rafal Zajfert
  • Damian Kmak
  • Benedykt Maczka
  • Daniel Matula
  • Paweł Rak
  • Artur Gruchała
  • Bartosz Ścibisz
  • Filip Bieleszuk
  • Rafał Kubow
  • Marcin Mianowski
  • Jacek Burzyński
  • Jakub Szczyrzyca
  • Paweł Zimmer
  • Grzegorz Janik

2013/2014

  • Mateusz Piórko
  • Andrzej Listowiecki
  • Marcin Ławski
  • Bartosz Kacperkiewicz
  • Benedykt Mączka
  • Arkadiusz Janz
  • Marcin Wincek
  • Maciej Baj
  • Marcin Jackowski
  • Brian Bartkowiak
  • Paweł Jabłoński
  • Mateusz Cholewa
  • Arkadiusz Pukocz
  • Aleksander Kaszubski
  • Roman Kłoczko
  • Michał Kozakiewicz
  • Marek Pachołek
  • Tobiasz Zabiega
  • Michał Tyc
  • Piotr Wilczyński
  • Adam Małek
  • Mikalai Barysan
  • Stanislav Liubchynskyi
  • Karol Burdziński

History

Version 0.2

Project configuration

In order to use the QualitySpy tool a detailed configuration for each of its connectors must be given.

Version control (SVN)

  • Repotype

Repository type; currently only svn is supported

  • Repourl

URL of the svn or cvs repository, e.g. http://svn.apache.org/repos/asf/tomcat/trunk

  • Repostartrev

Specifies the revision where the analyze should start. It's a number for the svn

  • Repoendrev

Specifies the revision where the analyze should end. It's a number for the svn repositories.

  • Reposvnuser

Login to the svn repository.

  • Reposvnpass

Password to the svn repository.

  • Reposrcpathprefixregex

Regular expression. Source code prefix, e.g. .*/src/main/java/

  • Reposrcpathprefixregex

Regular expression. Source code postfix e.g. .java

  • Repofileseparator

Path separator. Default is '/'

Product metrics (ckjm)

  • CkjmJar

Name with path (can be relative) of the jar file to analyse. It is used only when the CkjmSourceType is set to JAR.

  • CkjmClass

Path to the directory that contains classes to analyse (without package directores). It is used only when the CkjmSourceType is set to CLASS.

  • CkjmLibrariesSeparator

The character that is used to separate libraries on the property CkjmLibraries. If is not set, the default path separator (File.pathSeparator, ':' on Linux, ';' on Windows) is used.

  • CkjmLibraries

List of libraries (jar files) that are neccessary to calculate metrics. A jar archive is neccessary to calculate the metrics when at leas one of the measured classes refers to a class that is in the jar archive.

  • CkjmSourceType

Type of the input artifact. Ckjm will be used to calculate metrics for this artifact. Possible values: JAR - for a jar archive; CLASS - for a list of classes.

Issue tracking (Jira)

  • JiraTimeout

Timeout in ms, when no timeout is specified 60 000 ms is used.

  • JiraLogin

Login to the Jira system.

  • JiraIssuesUpdatedAfter

Filter for issues, e.g. 2012-01-01.

  • JiraIssuesCreatedBefore

Filter for issues, e.g. 2012-04-01.

  • JiraIssuesReporter

Filter for issues.

  • JiraIssuesUpdatedBefore

Filter for issues, e.g. 2012-04-01.

  • JiraIssuesResolution

Filter for issues.

  • JiraIssuesSearchText

Filter for issues.

  • JiraIssuesVersion

Filter for issues.

  • JiraIssuesAssignee

Filter for issues.

  • JiraIssuesCreatedAfter

Filter for issues, e.g. 2000-01-17.

  • JiraIssuesProject

Filter for issues.

  • JiraIssuesType

Filter for issues, e.g. bug.

  • JiraPasswd=jiraconnector

Password to the Jira system.

  • JiraIssuesStatus

Filter for issues, e.g. closed.

  • JiraIssuesPriority

Filter for issues.

  • JiraUrl

Url of the Jira system, e.g. https://jira.atlassian.com

 
 
Close
loading
Please Confirm
Close