7. Data Sources¶
To import data from reports in MQC, the data has to be provided as files. These files can be located in the local file system, a network path or a git repository.
A new data source can be added through a browser in the data source dialog. The type of the data source has to be selected first and then the respective directory, files or git repository can be added. You can also have multiple data sources added to your project.
7.1. Local File System / Network¶
The local file system and network types function similarly. A directory, and therefore all subdirectories and files within, or a single file can be selected as the data source. At any point, the allowed file extensions that can be read by MQC are displayed below.
Navigating through the file system works like a windows explorer. Double-clicking a directory opens it. The current path is displayed at the top of the browser and can be used to navigate upwards in the file system. You can also add the path manually.
The local file system of the server is not accessible when using the web player.
7.2. Version Control Systems¶
MQC also allows version control systems to be used as a data source. Currently only Git is supported.
7.2.1. Git (Beta)¶
After selecting Git as the data source type, all previously configured git repositories in the project are available for selection.
By clicking on “Manage repositories” git repositories can be added and already configured repositories can be deleted or modified.
Note
If git is not installed, locally (if using the MQC desktop client) or on the server (if using the web player), an error is shown.
Git for windows can be found here: https://git-scm.com/downloads
Git repositories can be added by ssh or https urls.
An rsa private key can be provided for authentification of ssh urls if it is not configured as the default ssh key for the current user.
For an https url the authentification has to be done by entering the username and password, if it is not already stored in the windows credential store.
When a repository is saved, it is validated. If the authentification fails, a error message is shown.
You can select a branch of a configured git repository. For further configurations of the data source, the selected branch of the repository should be checked out first.
The selected branch for a git repository can be manually checked out using
the Update Repository Branch
.
The selected branch can then be added as a data source so that it’s entire commit history can be used by MQC. Since your commit history might contain commits not relevant for your MQC quality analysis, you have the possibility of filtering these commits in the Commit Filters section of this dialog.
The Commit Filters section provides three possible targets to filter, namely,
Message
, Author
and Tag
. You can further choose to either include
or exclude the commits matching this filter by clicking on the toggle button
below Apply
. The green colored +
stands for include and the red colored
-
stands for exclude. Next you need to add the suitable regular expression
in RegEx
text box and the filtered commits matching all the configured
filters can be seen on the Filtered Commits
panel at the right side. All
the filters to the same target are connected with an OR
whereas different
targets are connected with an AND
.
For example, the configured filters as seen in the image below would be
interpreted as, All commits with the Message "#mqc-reports" AND Tag "MQC"
.
If there was another filter for Tag
then it would be,
All commits with the Message "#mqc-reports" AND (Tag "MQC" OR Tag "Reports")
.
Once you have filtered the relevant commits, you might also want to select specific folders or files relevant to your analysis. MQC provides two possibilties to do this.
If you select the Regular Expressions
option in
the drop down, then you can add multiple regular expressions as done in the
Commit Filters section.
If you select Browser Selection
option, one file or folder can be chosen
as the data source, similar to the selection for local or network.
If a git data source has been added, the monitoring service checks every 10 seconds if a new commit is made on the remote. When data is refreshed, the git repository is updated and all remote changes are fetched.