SlideShare a Scribd company logo
1 of 28
Download to read offline
27 au 29 mars 2013Vincent Massol, Oct2017
Creating your own project’s
Quality Dashboard
Agenda
• Why XWiki?
• Quality metrics to monitor
• Storing data in the wiki
• Caching to improve performance
• Send email on conditions
• Custom skin
• Q&A
Let’s do this live!
Why XWiki?
• A wiki but more importantly a web dev platform
• Reusing existing building blocks instead of starting from scratch
• Live site and thus easy to test
• Will use the following features of XWiki
• Scripting (especially Groovy)
• Graph Macro
• Dashboard Macro
• Scheduler feature
• JIRA Macro
• GitHub Stats Application
• L&F customisation
• And more (authentication,
permissions, etc)
Quality metrics to monitor
• Context: Java development project
• Goal: Create a dashboard to monitor the following metrics
• Number of tests (from Jenkins)
• Number of code bugs (from SonarQube)
• Open Blocker issues from the issue tracker (from JIRA)
• (for fun) Committer stats (from GitHub)
27 au 29 mars 2013
Number of Tests
Jenkins Integration
Number of tests - Retrieval
• Using Jenkins REST API
{{groovy}}
def url = 'http://ci.xwiki.org/job/xwiki-commons/
lastSuccessfulBuild/testReport/api/xml?
pretty=true&depth=-1'.toURL().text
def root = new XmlSlurper().parseText(url)
println "Tests for XWiki Commons: ${root.totalCount}"
{{/groovy}}
Demo
Storing Data locally
• Why?
• Performance reasons for viewing collected data
• Ability to graph evolution of metrics
• How?
• Create data structure (XClass)
• Script to import data from remote sites and store them in wiki pages
(XObjects = instances of XClass)
• Scheduler job to run it every day (for example)
Number of tests - Our goal
Number of tests - Class & Objects
Number of tests - Storing code
{{groovy}}
def url = 'http://ci.xwiki.org/job/xwiki-commons/lastSuccessfulBuild/testReport/api/xml?
pretty=true&depth=-1'.toURL().text
def root = new XmlSlurper().parseText(url)
def count = root.totalCount
// Compute new doc name
def countQuery = 'from doc.object(Quality.Jenkins.TestNumberClass) as record'
def recordCount = services.query.xwql(countQuery).count()
def newRecordReference = "Quality.Jenkins.Data.Count${recordCount + 1}"
// Only create a new record if none exist for today's date
def date = new Date()
date.clearTime()
def existQuery = 'from doc.object(Quality.Jenkins.TestNumberClass) as record where record.date
= :date'
def todayCount = services.query.xwql(existQuery).bindValue('date', date).count()
if (todayCount == 0) {
def recordDoc = xwiki.getDocument(newRecordReference)
def object = recordDoc.newObject('Quality.Jenkins.TestNumberClass')
object.set('date', date.format('dd/MM/yyyy'))
object.set('count', count.text())
recordDoc.save()
}
{{/groovy}}
Demo
Graph Macro
Number of tests - Graphing
{{groovy}}
def labels = []
def values = []
def records = services.query.xwql('select record.date, record.count, doc.fullName from Document
doc, doc.object(Quality.Jenkins.TestNumberClass) as record order by record.date').execute()
records.each() {
labels.add(it[0].toString().split(' ')[0])
values.add(it[1])
}
println '{{chartjs type="line"}}'
println '{'
println " "labels": [${labels.collect{'"' + it + '"'}.join(',')}],"
println " "datasets": [{"data": [${values.join(',')}]}]"
println '}'
println '{{/chartjs}}'
{{/groovy}}
Demo
Number of tests - Scheduler Demo
Dashboard
• Dashboard Macro
{{dashboard/}}
Demo
27 au 29 mars 2013
Code bugs
SonarQube Integration
Code bugs - Retrieval
• Using SonarQube REST API
{{groovy}}
import groovy.json.JsonSlurper
def url = 'https://sonarcloud.io/api/issues/search?
componentRoots=org.xwiki.commons%3Axwiki-
commons&types=BUG&statuses=OPEN'.toURL().text
def root = new JsonSlurper().parseText(url)
println '|=Severity|=Component|=Message|=Line'
root.issues.each() { issue ->
println "|${issue.severity}|${issue.project} - $
{issue.subProject} - $
{StringUtils.substringAfterLast(issue.component, '/')}|$
{issue.message}|${issue.line}"
}
{{/groovy}}
Demo
Code bugs - Results
Cache Macro
{{cache id="bugs" timeToLive="86400"}}
{{groovy}}
...
{{/groovy}}
{{/cache}}
• Example: cache of one day
Demo
Code bugs - Dashboard Demo
Send mail on condition
• Example: Send mail when # bugs > 10
• Using a Scheduler job for example or when fetching data
{{groovy}}
[…]
if (root.issues.size() >= 10) {
def message = services.mailsender.createMessage(
"vincent@massol.net", "Alert: too many bugs!")
message.addPart("text/plain", "text content")
services.mailsender.send([message], 'database')
}
{{/groovy}}
27 au 29 mars 2013
Tracker Issues
JIRA Integration
Tracker Issues - JIRA Macro
• Using XWiki’s JIRA Macro
{{jira id="xwikiorg" style="table" source="jql"}}
category = 10000 AND priority = blocker AND resolution = open
{{/jira}}
Tracker Issues - Dashboard
27 au 29 mars 2013
Commit Stats
GitHub Integration
Commit Stats
• Using XWiki’s GitHub Stats
Application
{{committers since="365" repositories="xwiki/*"
contributors="true" inactives="false" type="list"/}}
Full Dashboard
Custom Skin
Q&A
• Going further: http://xwiki.org
Me

More Related Content

What's hot

BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...Mark A
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBChun-Kai Wang
 
jclouds overview
jclouds overviewjclouds overview
jclouds overviewAdrian Cole
 
"Ускорение сборки большого проекта на Objective-C + Swift" Иван Бондарь (Avito)
"Ускорение сборки большого проекта на Objective-C + Swift" Иван Бондарь (Avito)"Ускорение сборки большого проекта на Objective-C + Swift" Иван Бондарь (Avito)
"Ускорение сборки большого проекта на Objective-C + Swift" Иван Бондарь (Avito)AvitoTech
 
The Ring programming language version 1.9 book - Part 74 of 210
The Ring programming language version 1.9 book - Part 74 of 210The Ring programming language version 1.9 book - Part 74 of 210
The Ring programming language version 1.9 book - Part 74 of 210Mahmoud Samir Fayed
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Luciano Mammino
 
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払いクリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払いShinya Mochida
 
Nikolay Kozhukharenko ''Component driven development how to guide''
Nikolay Kozhukharenko ''Component driven development how to guide''Nikolay Kozhukharenko ''Component driven development how to guide''
Nikolay Kozhukharenko ''Component driven development how to guide''OdessaJS Conf
 
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...Maarten Balliauw
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.jsDinesh U
 
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.Icinga
 
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflixaspyker
 
Streaming Data with scalaz-stream
Streaming Data with scalaz-streamStreaming Data with scalaz-stream
Streaming Data with scalaz-streamGaryCoady
 
From MySQL to MongoDB at Wordnik (Tony Tam)
From MySQL to MongoDB at Wordnik (Tony Tam)From MySQL to MongoDB at Wordnik (Tony Tam)
From MySQL to MongoDB at Wordnik (Tony Tam)MongoSF
 

What's hot (20)

BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
jclouds overview
jclouds overviewjclouds overview
jclouds overview
 
Fetch data from form
Fetch data from formFetch data from form
Fetch data from form
 
"Ускорение сборки большого проекта на Objective-C + Swift" Иван Бондарь (Avito)
"Ускорение сборки большого проекта на Objective-C + Swift" Иван Бондарь (Avito)"Ускорение сборки большого проекта на Objective-C + Swift" Иван Бондарь (Avito)
"Ускорение сборки большого проекта на Objective-C + Swift" Иван Бондарь (Avito)
 
The Ring programming language version 1.9 book - Part 74 of 210
The Ring programming language version 1.9 book - Part 74 of 210The Ring programming language version 1.9 book - Part 74 of 210
The Ring programming language version 1.9 book - Part 74 of 210
 
Sbt for mere mortals
Sbt for mere mortalsSbt for mere mortals
Sbt for mere mortals
 
Node.js Introduction
Node.js IntroductionNode.js Introduction
Node.js Introduction
 
Developing XWiki
Developing XWikiDeveloping XWiki
Developing XWiki
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
 
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払いクリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
クリーンアーキテクチャーを強制する方法を考えてみた(N番煎じ) #すえなみチャンス暑気払い
 
Nikolay Kozhukharenko ''Component driven development how to guide''
Nikolay Kozhukharenko ''Component driven development how to guide''Nikolay Kozhukharenko ''Component driven development how to guide''
Nikolay Kozhukharenko ''Component driven development how to guide''
 
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
 
Linq
LinqLinq
Linq
 
Nodejs intro
Nodejs introNodejs intro
Nodejs intro
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
 
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflix
 
Streaming Data with scalaz-stream
Streaming Data with scalaz-streamStreaming Data with scalaz-stream
Streaming Data with scalaz-stream
 
From MySQL to MongoDB at Wordnik (Tony Tam)
From MySQL to MongoDB at Wordnik (Tony Tam)From MySQL to MongoDB at Wordnik (Tony Tam)
From MySQL to MongoDB at Wordnik (Tony Tam)
 

Similar to Creating your own project's Quality Dashboard

Intellias CQRS Framework
Intellias CQRS FrameworkIntellias CQRS Framework
Intellias CQRS FrameworkSergey Seletsky
 
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Roy de Kleijn
 
Surviving UI Automation Armageddon with BELLATRIX.pptx
Surviving UI Automation Armageddon with BELLATRIX.pptxSurviving UI Automation Armageddon with BELLATRIX.pptx
Surviving UI Automation Armageddon with BELLATRIX.pptxNikolayAvramov4
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionBrennan Saeta
 
Quick start with AngularJS
Quick start with AngularJSQuick start with AngularJS
Quick start with AngularJSIuliia Baranova
 
How to use the new Domino Query Language
How to use the new Domino Query LanguageHow to use the new Domino Query Language
How to use the new Domino Query LanguageTim Davis
 
Interactive Kafka Streams
Interactive Kafka StreamsInteractive Kafka Streams
Interactive Kafka Streamsconfluent
 
Web based automation testing on Node.js environment
Web based automation testing on Node.js environmentWeb based automation testing on Node.js environment
Web based automation testing on Node.js environmentYu-Lin Huang
 
Exploring an API with Blocks
Exploring an API with BlocksExploring an API with Blocks
Exploring an API with BlocksPronovix
 
WinAppDriver Development
WinAppDriver DevelopmentWinAppDriver Development
WinAppDriver DevelopmentJeremy Kao
 
Geek Sync I Learn to Troubleshoot Query Performance in Analysis Services
Geek Sync I Learn to Troubleshoot Query Performance in Analysis ServicesGeek Sync I Learn to Troubleshoot Query Performance in Analysis Services
Geek Sync I Learn to Troubleshoot Query Performance in Analysis ServicesIDERA Software
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Andrew Eisenberg
 
MSFT Dumaguete 061616 - Building High Performance Apps
MSFT Dumaguete 061616 - Building High Performance AppsMSFT Dumaguete 061616 - Building High Performance Apps
MSFT Dumaguete 061616 - Building High Performance AppsMarc Obaldo
 

Similar to Creating your own project's Quality Dashboard (20)

Intellias CQRS Framework
Intellias CQRS FrameworkIntellias CQRS Framework
Intellias CQRS Framework
 
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
 
Surviving UI Automation Armageddon with BELLATRIX.pptx
Surviving UI Automation Armageddon with BELLATRIX.pptxSurviving UI Automation Armageddon with BELLATRIX.pptx
Surviving UI Automation Armageddon with BELLATRIX.pptx
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline Execution
 
Building XWiki
Building XWikiBuilding XWiki
Building XWiki
 
Quick start with AngularJS
Quick start with AngularJSQuick start with AngularJS
Quick start with AngularJS
 
How to use the new Domino Query Language
How to use the new Domino Query LanguageHow to use the new Domino Query Language
How to use the new Domino Query Language
 
Learning with F#
Learning with F#Learning with F#
Learning with F#
 
Interactive Kafka Streams
Interactive Kafka StreamsInteractive Kafka Streams
Interactive Kafka Streams
 
Web based automation testing on Node.js environment
Web based automation testing on Node.js environmentWeb based automation testing on Node.js environment
Web based automation testing on Node.js environment
 
Exploring an API with Blocks
Exploring an API with BlocksExploring an API with Blocks
Exploring an API with Blocks
 
jQuery On Rails
jQuery On RailsjQuery On Rails
jQuery On Rails
 
WinAppDriver Development
WinAppDriver DevelopmentWinAppDriver Development
WinAppDriver Development
 
Geek Sync I Learn to Troubleshoot Query Performance in Analysis Services
Geek Sync I Learn to Troubleshoot Query Performance in Analysis ServicesGeek Sync I Learn to Troubleshoot Query Performance in Analysis Services
Geek Sync I Learn to Troubleshoot Query Performance in Analysis Services
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Tdd
TddTdd
Tdd
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015
 
J query module1
J query module1J query module1
J query module1
 
MSFT Dumaguete 061616 - Building High Performance Apps
MSFT Dumaguete 061616 - Building High Performance AppsMSFT Dumaguete 061616 - Building High Performance Apps
MSFT Dumaguete 061616 - Building High Performance Apps
 
Deep dive into SoapUI
Deep dive into SoapUIDeep dive into SoapUI
Deep dive into SoapUI
 

More from Vincent Massol

XWiki Testing with TestContainers
XWiki Testing with TestContainersXWiki Testing with TestContainers
XWiki Testing with TestContainersVincent Massol
 
Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019Vincent Massol
 
New types of tests for Java projects
New types of tests for Java projectsNew types of tests for Java projects
New types of tests for Java projectsVincent Massol
 
Configuration Testing with Docker & TestContainers
Configuration Testing with Docker & TestContainersConfiguration Testing with Docker & TestContainers
Configuration Testing with Docker & TestContainersVincent Massol
 
New types of tests for Java projects
New types of tests for Java projectsNew types of tests for Java projects
New types of tests for Java projectsVincent Massol
 
What's new in XWiki 9.x and 10.x
What's new in XWiki 9.x and 10.xWhat's new in XWiki 9.x and 10.x
What's new in XWiki 9.x and 10.xVincent Massol
 
XWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and SharepointXWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and SharepointVincent Massol
 
XWiki Status - July 2015
XWiki Status - July 2015XWiki Status - July 2015
XWiki Status - July 2015Vincent Massol
 
XWiki SAS development practices
XWiki SAS development practicesXWiki SAS development practices
XWiki SAS development practicesVincent Massol
 
XWiki SAS: An open source company
XWiki SAS: An open source companyXWiki SAS: An open source company
XWiki SAS: An open source companyVincent Massol
 
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014XWiki: A web dev runtime for writing web apps @ FOSDEM 2014
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014Vincent Massol
 
XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014Vincent Massol
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java ProjectVincent Massol
 
Implementing Quality on Java projects (Short version)
Implementing Quality on Java projects (Short version)Implementing Quality on Java projects (Short version)
Implementing Quality on Java projects (Short version)Vincent Massol
 
Implementing quality in Java projects
Implementing quality in Java projectsImplementing quality in Java projects
Implementing quality in Java projectsVincent Massol
 
Implementing Quality on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projectsVincent Massol
 
Combining open source ethics with private interests
Combining open source ethics with private interestsCombining open source ethics with private interests
Combining open source ethics with private interestsVincent Massol
 
Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013Vincent Massol
 

More from Vincent Massol (20)

XWiki Testing with TestContainers
XWiki Testing with TestContainersXWiki Testing with TestContainers
XWiki Testing with TestContainers
 
Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019
 
New types of tests for Java projects
New types of tests for Java projectsNew types of tests for Java projects
New types of tests for Java projects
 
Configuration Testing with Docker & TestContainers
Configuration Testing with Docker & TestContainersConfiguration Testing with Docker & TestContainers
Configuration Testing with Docker & TestContainers
 
New types of tests for Java projects
New types of tests for Java projectsNew types of tests for Java projects
New types of tests for Java projects
 
What's new in XWiki 9.x and 10.x
What's new in XWiki 9.x and 10.xWhat's new in XWiki 9.x and 10.x
What's new in XWiki 9.x and 10.x
 
QDashboard 1.2
QDashboard 1.2QDashboard 1.2
QDashboard 1.2
 
XWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and SharepointXWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and Sharepoint
 
XWiki Status - July 2015
XWiki Status - July 2015XWiki Status - July 2015
XWiki Status - July 2015
 
XWiki SAS development practices
XWiki SAS development practicesXWiki SAS development practices
XWiki SAS development practices
 
XWiki SAS: An open source company
XWiki SAS: An open source companyXWiki SAS: An open source company
XWiki SAS: An open source company
 
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014XWiki: A web dev runtime for writing web apps @ FOSDEM 2014
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014
 
XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java Project
 
Implementing Quality on Java projects (Short version)
Implementing Quality on Java projects (Short version)Implementing Quality on Java projects (Short version)
Implementing Quality on Java projects (Short version)
 
Implementing quality in Java projects
Implementing quality in Java projectsImplementing quality in Java projects
Implementing quality in Java projects
 
Implementing Quality on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projects
 
Combining open source ethics with private interests
Combining open source ethics with private interestsCombining open source ethics with private interests
Combining open source ethics with private interests
 
Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013
 
Developing XWiki
Developing XWikiDeveloping XWiki
Developing XWiki
 

Recently uploaded

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 

Recently uploaded (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Creating your own project's Quality Dashboard

  • 1. 27 au 29 mars 2013Vincent Massol, Oct2017 Creating your own project’s Quality Dashboard
  • 2. Agenda • Why XWiki? • Quality metrics to monitor • Storing data in the wiki • Caching to improve performance • Send email on conditions • Custom skin • Q&A Let’s do this live!
  • 3. Why XWiki? • A wiki but more importantly a web dev platform • Reusing existing building blocks instead of starting from scratch • Live site and thus easy to test • Will use the following features of XWiki • Scripting (especially Groovy) • Graph Macro • Dashboard Macro • Scheduler feature • JIRA Macro • GitHub Stats Application • L&F customisation • And more (authentication, permissions, etc)
  • 4. Quality metrics to monitor • Context: Java development project • Goal: Create a dashboard to monitor the following metrics • Number of tests (from Jenkins) • Number of code bugs (from SonarQube) • Open Blocker issues from the issue tracker (from JIRA) • (for fun) Committer stats (from GitHub)
  • 5. 27 au 29 mars 2013 Number of Tests Jenkins Integration
  • 6. Number of tests - Retrieval • Using Jenkins REST API {{groovy}} def url = 'http://ci.xwiki.org/job/xwiki-commons/ lastSuccessfulBuild/testReport/api/xml? pretty=true&depth=-1'.toURL().text def root = new XmlSlurper().parseText(url) println "Tests for XWiki Commons: ${root.totalCount}" {{/groovy}} Demo
  • 7. Storing Data locally • Why? • Performance reasons for viewing collected data • Ability to graph evolution of metrics • How? • Create data structure (XClass) • Script to import data from remote sites and store them in wiki pages (XObjects = instances of XClass) • Scheduler job to run it every day (for example)
  • 8. Number of tests - Our goal
  • 9. Number of tests - Class & Objects
  • 10. Number of tests - Storing code {{groovy}} def url = 'http://ci.xwiki.org/job/xwiki-commons/lastSuccessfulBuild/testReport/api/xml? pretty=true&depth=-1'.toURL().text def root = new XmlSlurper().parseText(url) def count = root.totalCount // Compute new doc name def countQuery = 'from doc.object(Quality.Jenkins.TestNumberClass) as record' def recordCount = services.query.xwql(countQuery).count() def newRecordReference = "Quality.Jenkins.Data.Count${recordCount + 1}" // Only create a new record if none exist for today's date def date = new Date() date.clearTime() def existQuery = 'from doc.object(Quality.Jenkins.TestNumberClass) as record where record.date = :date' def todayCount = services.query.xwql(existQuery).bindValue('date', date).count() if (todayCount == 0) { def recordDoc = xwiki.getDocument(newRecordReference) def object = recordDoc.newObject('Quality.Jenkins.TestNumberClass') object.set('date', date.format('dd/MM/yyyy')) object.set('count', count.text()) recordDoc.save() } {{/groovy}} Demo
  • 12. Number of tests - Graphing {{groovy}} def labels = [] def values = [] def records = services.query.xwql('select record.date, record.count, doc.fullName from Document doc, doc.object(Quality.Jenkins.TestNumberClass) as record order by record.date').execute() records.each() { labels.add(it[0].toString().split(' ')[0]) values.add(it[1]) } println '{{chartjs type="line"}}' println '{' println " "labels": [${labels.collect{'"' + it + '"'}.join(',')}]," println " "datasets": [{"data": [${values.join(',')}]}]" println '}' println '{{/chartjs}}' {{/groovy}} Demo
  • 13. Number of tests - Scheduler Demo
  • 15. 27 au 29 mars 2013 Code bugs SonarQube Integration
  • 16. Code bugs - Retrieval • Using SonarQube REST API {{groovy}} import groovy.json.JsonSlurper def url = 'https://sonarcloud.io/api/issues/search? componentRoots=org.xwiki.commons%3Axwiki- commons&types=BUG&statuses=OPEN'.toURL().text def root = new JsonSlurper().parseText(url) println '|=Severity|=Component|=Message|=Line' root.issues.each() { issue -> println "|${issue.severity}|${issue.project} - $ {issue.subProject} - $ {StringUtils.substringAfterLast(issue.component, '/')}|$ {issue.message}|${issue.line}" } {{/groovy}} Demo
  • 17. Code bugs - Results
  • 18. Cache Macro {{cache id="bugs" timeToLive="86400"}} {{groovy}} ... {{/groovy}} {{/cache}} • Example: cache of one day Demo
  • 19. Code bugs - Dashboard Demo
  • 20. Send mail on condition • Example: Send mail when # bugs > 10 • Using a Scheduler job for example or when fetching data {{groovy}} […] if (root.issues.size() >= 10) { def message = services.mailsender.createMessage( "vincent@massol.net", "Alert: too many bugs!") message.addPart("text/plain", "text content") services.mailsender.send([message], 'database') } {{/groovy}}
  • 21. 27 au 29 mars 2013 Tracker Issues JIRA Integration
  • 22. Tracker Issues - JIRA Macro • Using XWiki’s JIRA Macro {{jira id="xwikiorg" style="table" source="jql"}} category = 10000 AND priority = blocker AND resolution = open {{/jira}}
  • 23. Tracker Issues - Dashboard
  • 24. 27 au 29 mars 2013 Commit Stats GitHub Integration
  • 25. Commit Stats • Using XWiki’s GitHub Stats Application {{committers since="365" repositories="xwiki/*" contributors="true" inactives="false" type="list"/}}
  • 28. Q&A • Going further: http://xwiki.org Me