SlideShare a Scribd company logo
27 au 29 mars 2013Vincent Massol,April 2019
Building XWiki
Vincent Massol
• CTO XWiki SAS
• Open source developer
• My Projects
• XWiki (community-driven open source project)
• Past: Maven,Apache Cargo,Apache Cactus, Pattern Testing
• Other Credentials:
• LesCastCodeurs podcast about Java news
• Creator of OSSGTP open source group in Paris
• 3 books: JUnit in Action, Maven:A Developer’s Notebook, BBWM
Agenda
• Part 0: XWiki
• The project
• Part 1:The XWiki Build
• Automated quality checks
• Different types of tests
• Part 2:The CI (Jenkins)
• The various XWiki pipelines
• Part 3: Release Process
• Putting it all together
• Future
Agenda
• Part 0: XWiki
• The project
• Part 1:The XWiki Build
• Automated quality checks
• Different types of tests
• Part 2:The CI (Jenkins)
• The various XWiki pipelines
• Part 3: Release Process
• Putting it all together
• Future
What is XWiki? (1/2)
• A structured open source enterprise wiki
What is XWiki? (2/2)
• A platform for developing content-based web applications
Project Stats
Source: http://dev.xwiki.org/xwiki/bin/view/Community/ProjectHealth
Motivation
• Change the world!
• Needs impact
• Needs max number of users
• Open source
• Needs to show progress
• Release often
• Needs developers / contributors
• Community-driven
• Requires Time-boxing
• XWiki releases every month (3
weeks for RC1, 1w for final)
• Requires integration between all
parts
• Requires CI tool
• Requires quality-control
• Requires automated Tests
• Requires releases as automated as
possible
• Requires automated Build
• Requires good communication
Global Development Workflow
Governance
• Complete separation from
XWiki SAS and XWiki.org
• Only individuals working on the
open source project
• Rules similar to the ASF
• Committership, voting (0, +1, -1),
lazy consensus
• xwiki.org governance and
company advertising:
sponsoring companies
Source: http://dev.xwiki.org/xwiki/bin/view/Community/Governance
Agenda
• Part 0: XWiki
• The project
• Part 1: The XWiki Build
• Automated quality checks
• Different types of tests
• Part 2:The CI (Jenkins)
• The various XWiki pipelines
• Part 3: Release Process
• Putting it all together
• Future
Build
• Maven-based with several custom
plugins
• Active Quality vs Passive Quality.
• Strategy: if it’s not in the build it
doesn’t exist!
• Common to everyone
• If something is important it must fail
the build, otherwise it’s not important
• Try to reduce CI code to the
maximum for local reproducibility and
to be less tied to the CI
Source: http://dev.xwiki.org/xwiki/bin/view/Community/Building
Build = implement quality
Automated Checks
• Standard ones: compilation, tests, javadoc linter, etc
• Test execution: unit, functional, configuration,WCAG, HTML
validation
• Backward compatibility checks
• Code quality checks
• Best practices checks
• Test coverage checks
• Test quality checks
Tests (1/3)
• Unit tests with JUnit5 & Mockito
• XWiki is Component-based and we have some JUnit5 Extensions to
make it easy to test/mock dependent components
@ComponentTest
public class DefaultVelocityConfigurationTest
{
@InjectMockComponents
private DefaultVelocityConfiguration configuration;
@Test
public void getToolsReturnsDefaultTools()
{
assertEquals(ListTool.class.getName(), this.configuration.getTools().get("listtool"));
}
}
Tests (2/3)
• Functional tests with Selenium/WebDriver
• Using a PageObjects strategy
Tests (3/3)
• Configuration tests, based on Docker
• Based on TestContainers
• Supported Browsers, Servlet Engines & Databases
• Usable on dev machine, in the IDE!
• Various other more exotic configurations: LibreOffice
server, Clustering, External SOLR server
• Supports Docker Out Of Docker (DOOD)
@UITest(database = Database.MYSQL, databaseTag = "5", servletEngine = ServletEngine.TOMCAT,
servletEngineTag = “8", browser = Browser.CHROME)
public class MenuIT
...
Backward Compatibility Strategy
• Check in the build with Revapi
• When wanted failure, add to
ignore list in pom.xml
• @Deprecated then move to
Legacy module using AspectJ
• Use @Unstable + @Since for
young APIs
• Custom checkstyle check in build to prevent @Unstable from staying more
than 1 cycle
• {{backwardCompatibility}} xwiki macro in release notes
Source: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBackwardCompatibility
Code Quality Checks
• Checkstyle with custom rules. For example
• Verify that Script Services are not located in the internal package
• Verify that @since javadoc tags have the correct format
• Verify that @Unstable annotation don't stay too long
• Verify that components.txt contains all Components
• Verify that JUnit tests don't output content to stdout or stderr. 
• Verify header licenses
• And more…
Best Practices Checks
• Spoon checks
• Verify none of the listed methods are called in our Java code
• File#deleteOnExit() - Causes memory leaks since not
guaranteed to be called. Not good with server software.
• URL#equals() -Very slow, access the host with HTTP calls
• Verify that we don't use Commons Lang < 3 (i.e. that commons-
lang:commons-lang artifact is forbidden)
• Verify we don't use Commons Logging or Log4j (since we use SLF4J)
• And a lot more…
Test Coverage Checks - Local
• Using Jacoco and Clover
• Strategy - “Ratchet effect”:
• Each Maven module has a threshold
• Jacoco Maven plugin fails if new code has less
coverage than before in %
• Dev is allowed to increase threshold
• Global Coverage addressed in CI (see later)
Test Quality Checks
• Using PIT/Descartes Maven plugin
• Concepts of PIT
• Modify code under test (mutants) and run tests
• Good tests kill mutants
• Generates a mutation score similar to the coverage %
• Descartes = extreme mutations that execute fast and have high values
Mutation - Example
result =
   (getId() == macroId.getId() || (getId() != null && getId().equals(macroId.getId())))
   && (getSyntax() == macroId.getSyntax() || (getSyntax() != null && getSyntax().equals(
    macroId.getSyntax())));
Mutation Example
@Test
public void testEquality()
{
    MacroId id1 = new MacroId("id", Syntax.XWIKI_2_0);
    MacroId id2 = new MacroId("id", Syntax.XWIKI_2_0);
    MacroId id3 = new MacroId("otherid", Syntax.XWIKI_2_0);
    MacroId id4 = new MacroId("id", Syntax.XHTML_1_0);
    MacroId id5 = new MacroId("otherid", Syntax.XHTML_1_0);
    MacroId id6 = new MacroId("id");
    MacroId id7 = new MacroId("id");
    Assert.assertEquals(id2, id1);
   // Equal objects must have equal hashcode
   Assert.assertTrue(id1.hashCode() == id2.hashCode());
    Assert.assertFalse(id3 == id1);
    Assert.assertFalse(id4 == id1);
    Assert.assertFalse(id5 == id3);
    Assert.assertFalse(id6 == id1);
    Assert.assertEquals(id7, id6);
   // Equal objects must have equal hashcode
   Assert.assertTrue(id6.hashCode() == id7.hashCode());
}
Not testing
for inequality!
Improved thanks to Descartes!
Mutation Limitations
• Takes time to find interesting things to look at and decide if
that’s an issue to handle or not. Need better categorisation in
report (now reported by Descartes):
• Strong pseudo-tested methods:The worst! No matter what the return
values are the tests always fail
• Pseudo-tested methods: Grey area.The tests pass with at least one
modified value.
• Multi module support - PITmp
• But slow on large projects (e.g. 7+ hours just for xwiki-rendering)
Test Quality Checks - Strategy
• Fail the build when the mutation score of a given module is below a
defined threshold in the pom.xml
• The idea is that new tests should, in average, be of quality equal or better
General goal with coverage + mutation: maintain qualitythan past tests.
• Other idea: hook on CI to run it only on modified code/tests.
• Still some hiccups regarding the mutation score stability!
General goal with coverage + mutation: maintain quality
Agenda
• Part 0: XWiki
• The project
• Part 1:The XWiki Build
• Automated quality checks
• Different types of tests
• Part 2: The CI (Jenkins)
• The various XWiki pipelines
• Part 3: Release Process
• Putting it all together
• Future
XWiki’s CI - Jenkins
• XWiki Jobs are Pipeline jobs
• Using “GitHub Organization” type of jobs
• Autodiscovering of all Jenkinsfile in a GitHub organization
• Automatic handling of branches (job creation/deletion)
• Shared Pipeline library for all jobs
• Clover Pipeline job to compute global TPC
• Docker Pipeline jobs for running Docker-based tests on all
configurations
• Moving to Docker agent and DOOD (Docker Out of Docker)
Shared Pipeline Library
• Features
• Maven build
• Check for flickers both environment flickers and test flickers and don’t
send false positives emails in this case. Examples of environment
flickers:
• JVM crash
• GitHub connection issue
• X Display not ready for UI tests
• Uses JIRA to log test flickers
• Display screenshot of failing test in job report
Standard Pipeline Jobs
• 1 job = several builds (13+ in our case)
• Validates different things:
• “Main”: compile and test execution including functional tests
• “Quality”: Revapi checks, checkstyle, Descartes, Jacoco
• “TestRelease”: Simulate a release.Verifies Maven Central
requirements (javadoc, etc)
• “Flavor*”:Various types of functional tests
• Parallel execution for some jobs
Clover Pipeline
• Issue: Local coverage can increase
and global decrease
• Removed code with high TPC
• Code tested indirectly by
functional tests and code
refactoring led to different paths
used
• New module with lower TPC
than average
• Strategy: Fail the CI build if Global
TPC decreases for the current
version
Docker Pipeline Jobs
• Currently a separate pipeline from the main one
• Two issues
• Requires Jenkins Docker agent to be used (Docker
doesn’t work inside vServer that we use). Migration in
progress.
• Long to execute since it tests all configurations and thus
should only be executed once per day.
• Finds all Docker test modules and run Maven on
each of them, passing the configuration as system
properties.
DOOD
• Jenkins agent running as a Docker container
• Pipeline (and thus Maven) executing inside Docker
• Thus Functional tests based on Docker executing inside Docker
• To make it work:
• Mount Docker socket (only Docker client inside Docker)
• Don’t mount volumes: copy data (in and out)
• Requires special care when writing the JUnit5 Test Container
extension
Jenkins Docker Cloud Configuration
• 3 volumes:
• Docker socket
• Maven settings.xml since it
contains passwords
• SSH keys (private data)
Copying with TestContainers
Agenda
• Part 0: XWiki
• The project
• Part 1:The XWiki Build
• Automated quality checks
• Different types of tests
• Part 2:The CI (Jenkins)
• The various XWiki pipelines
• Part 3: Release Process
• Putting it all together
• Future
Release Process
• Ongoing Release Notes and
reference documentation
• Marked in JIRA with 2 custom
fields
• Rolling Release Managers
Source: http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/
• Create Release Plan for the release
Release Plans (1/2)
Source: http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/
Release Plans (2/2)
• Release in JIRA
• Check that all issues are
documented
• Check Release Notes
• Import translations
• Build the Release
• Create mail
announcement
• Push to Maven Central
• Update Docker official
image
• etc
Source: http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/ReleasePlan845
Agenda
• Part 0: XWiki
• The project
• Part 1:The XWiki Build
• Automated quality checks
• Different types of tests
• Part 2:The CI (Jenkins)
• The various XWiki pipelines
• Part 3: Release Process
• Putting it all together
• Future
Future - Build Level
• Move Test configurations to the build
• Fix UI flickerings which are a plague
• Idea: Change our DSL so that all calls always wait on something
Future - CI Level
• Docker pipeline integrated into main Pipeline library
• To handle branches (a pain right now)
• Needs Parametrized Scheduler Plugin
• Move to CD, i.e. implement the release steps in the CI
• Need to resolve Maven versions and put on staging & promote when
we want
• Auto deploy on myxwiki.org
• STAMP: DSpot on diffs, Evocrash (JIRA -> CI)
Q&A
Me

More Related Content

What's hot (20)

(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine
(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine
(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine
ZongXian Shen
 
Security DevOps - Wie Sie in agilen Projekten trotzdem sicher bleiben // DevO...
Security DevOps - Wie Sie in agilen Projekten trotzdem sicher bleiben // DevO...Security DevOps - Wie Sie in agilen Projekten trotzdem sicher bleiben // DevO...
Security DevOps - Wie Sie in agilen Projekten trotzdem sicher bleiben // DevO...
Christian Schneider
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)
Gopi Raghavendra
 
Testing basics for developers
Testing basics for developersTesting basics for developers
Testing basics for developers
Anton Udovychenko
 
基於 Flow & Path 的 MVP 架構
基於 Flow & Path 的 MVP 架構基於 Flow & Path 的 MVP 架構
基於 Flow & Path 的 MVP 架構
玄武 Wu
 
Quickly Testing Legacy C++ Code with Approval Tests
Quickly Testing Legacy C++ Code with Approval TestsQuickly Testing Legacy C++ Code with Approval Tests
Quickly Testing Legacy C++ Code with Approval Tests
Clare Macrae
 
First adoption hackathon at BGJUG
First adoption hackathon at BGJUGFirst adoption hackathon at BGJUG
First adoption hackathon at BGJUG
Ivan Ivanov
 
Quickly and Effectively Testing Legacy C++ Code with Approval Tests
Quickly and Effectively Testing Legacy C++ Code with Approval TestsQuickly and Effectively Testing Legacy C++ Code with Approval Tests
Quickly and Effectively Testing Legacy C++ Code with Approval Tests
Clare Macrae
 
Finding Needles in Haystacks
Finding Needles in HaystacksFinding Needles in Haystacks
Finding Needles in Haystacks
snyff
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
Marakana Inc.
 
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Christian Schneider
 
A Taste of Pharo 7.0
A Taste of Pharo 7.0A Taste of Pharo 7.0
A Taste of Pharo 7.0
ESUG
 
Introduction to Eclipse Microprofile
Introduction to Eclipse MicroprofileIntroduction to Eclipse Microprofile
Introduction to Eclipse Microprofile
Red Hat Developers
 
Bug zillatestopiajenkins
Bug zillatestopiajenkinsBug zillatestopiajenkins
Bug zillatestopiajenkins
Samira Kumar Nanda
 
Ln monitoring repositories
Ln monitoring repositoriesLn monitoring repositories
Ln monitoring repositories
snyff
 
Jwt == insecurity?
Jwt == insecurity?Jwt == insecurity?
Jwt == insecurity?
snyff
 
Deserialization vulnerabilities
Deserialization vulnerabilitiesDeserialization vulnerabilities
Deserialization vulnerabilities
GreenD0g
 
Testing JSF with Arquillian and Selenium
Testing JSF with Arquillian and SeleniumTesting JSF with Arquillian and Selenium
Testing JSF with Arquillian and Selenium
Lukáš Fryč
 
Real Java EE Testing with Arquillian and ShrinkWrap
Real Java EE Testing with Arquillian and ShrinkWrapReal Java EE Testing with Arquillian and ShrinkWrap
Real Java EE Testing with Arquillian and ShrinkWrap
Dan Allen
 
Arquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made EasyArquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made Easy
JBUG London
 
(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine
(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine
(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine
ZongXian Shen
 
Security DevOps - Wie Sie in agilen Projekten trotzdem sicher bleiben // DevO...
Security DevOps - Wie Sie in agilen Projekten trotzdem sicher bleiben // DevO...Security DevOps - Wie Sie in agilen Projekten trotzdem sicher bleiben // DevO...
Security DevOps - Wie Sie in agilen Projekten trotzdem sicher bleiben // DevO...
Christian Schneider
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)
Gopi Raghavendra
 
Testing basics for developers
Testing basics for developersTesting basics for developers
Testing basics for developers
Anton Udovychenko
 
基於 Flow & Path 的 MVP 架構
基於 Flow & Path 的 MVP 架構基於 Flow & Path 的 MVP 架構
基於 Flow & Path 的 MVP 架構
玄武 Wu
 
Quickly Testing Legacy C++ Code with Approval Tests
Quickly Testing Legacy C++ Code with Approval TestsQuickly Testing Legacy C++ Code with Approval Tests
Quickly Testing Legacy C++ Code with Approval Tests
Clare Macrae
 
First adoption hackathon at BGJUG
First adoption hackathon at BGJUGFirst adoption hackathon at BGJUG
First adoption hackathon at BGJUG
Ivan Ivanov
 
Quickly and Effectively Testing Legacy C++ Code with Approval Tests
Quickly and Effectively Testing Legacy C++ Code with Approval TestsQuickly and Effectively Testing Legacy C++ Code with Approval Tests
Quickly and Effectively Testing Legacy C++ Code with Approval Tests
Clare Macrae
 
Finding Needles in Haystacks
Finding Needles in HaystacksFinding Needles in Haystacks
Finding Needles in Haystacks
snyff
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
Marakana Inc.
 
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Christian Schneider
 
A Taste of Pharo 7.0
A Taste of Pharo 7.0A Taste of Pharo 7.0
A Taste of Pharo 7.0
ESUG
 
Introduction to Eclipse Microprofile
Introduction to Eclipse MicroprofileIntroduction to Eclipse Microprofile
Introduction to Eclipse Microprofile
Red Hat Developers
 
Ln monitoring repositories
Ln monitoring repositoriesLn monitoring repositories
Ln monitoring repositories
snyff
 
Jwt == insecurity?
Jwt == insecurity?Jwt == insecurity?
Jwt == insecurity?
snyff
 
Deserialization vulnerabilities
Deserialization vulnerabilitiesDeserialization vulnerabilities
Deserialization vulnerabilities
GreenD0g
 
Testing JSF with Arquillian and Selenium
Testing JSF with Arquillian and SeleniumTesting JSF with Arquillian and Selenium
Testing JSF with Arquillian and Selenium
Lukáš Fryč
 
Real Java EE Testing with Arquillian and ShrinkWrap
Real Java EE Testing with Arquillian and ShrinkWrapReal Java EE Testing with Arquillian and ShrinkWrap
Real Java EE Testing with Arquillian and ShrinkWrap
Dan Allen
 
Arquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made EasyArquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made Easy
JBUG London
 

Similar to Building XWiki (20)

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
Vincent Massol
 
Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019
Vincent Massol
 
Developing XWiki
Developing XWikiDeveloping XWiki
Developing XWiki
Vincent 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 projects
Vincent Massol
 
Building Top-Notch Androids SDKs
Building Top-Notch Androids SDKsBuilding Top-Notch Androids SDKs
Building Top-Notch Androids SDKs
relayr
 
XWiki SAS development practices
XWiki SAS development practicesXWiki SAS development practices
XWiki SAS development practices
Vincent Massol
 
Qt test framework
Qt test frameworkQt test framework
Qt test framework
ICS
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
Mats Bryntse
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!
Ortus Solutions, Corp
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
33rd degree
33rd degree33rd degree
33rd degree
Dariusz Kordonski
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using Jenkins
Rogue Wave Software
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
Rob Scaduto
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java Project
Vincent Massol
 
MyHeritage - QA Automations in a Continuous Deployment environment
MyHeritage -  QA Automations in a Continuous Deployment environmentMyHeritage -  QA Automations in a Continuous Deployment environment
MyHeritage - QA Automations in a Continuous Deployment environment
MatanGoren
 
Test box bdd
Test box bddTest box bdd
Test box bdd
ColdFusionConference
 
Unit Testing and Tools
Unit Testing and ToolsUnit Testing and Tools
Unit Testing and Tools
William Simms
 
Advanced Java Testing
Advanced Java TestingAdvanced Java Testing
Advanced Java Testing
Vincent 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 projects
Vincent Massol
 
Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019
Vincent 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 projects
Vincent Massol
 
Building Top-Notch Androids SDKs
Building Top-Notch Androids SDKsBuilding Top-Notch Androids SDKs
Building Top-Notch Androids SDKs
relayr
 
XWiki SAS development practices
XWiki SAS development practicesXWiki SAS development practices
XWiki SAS development practices
Vincent Massol
 
Qt test framework
Qt test frameworkQt test framework
Qt test framework
ICS
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
Mats Bryntse
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!
Ortus Solutions, Corp
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using Jenkins
Rogue Wave Software
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
Rob Scaduto
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java Project
Vincent Massol
 
MyHeritage - QA Automations in a Continuous Deployment environment
MyHeritage -  QA Automations in a Continuous Deployment environmentMyHeritage -  QA Automations in a Continuous Deployment environment
MyHeritage - QA Automations in a Continuous Deployment environment
MatanGoren
 
Unit Testing and Tools
Unit Testing and ToolsUnit Testing and Tools
Unit Testing and Tools
William Simms
 

More from Vincent Massol (20)

XWiki Testing with TestContainers
XWiki Testing with TestContainersXWiki Testing with TestContainers
XWiki Testing with TestContainers
Vincent Massol
 
XWiki: The best wiki for developers
XWiki: The best wiki for developersXWiki: The best wiki for developers
XWiki: The best wiki for developers
Vincent Massol
 
Configuration Testing with Docker & TestContainers
Configuration Testing with Docker & TestContainersConfiguration Testing with Docker & TestContainers
Configuration Testing with Docker & TestContainers
Vincent 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.x
Vincent Massol
 
QDashboard 1.2
QDashboard 1.2QDashboard 1.2
QDashboard 1.2
Vincent Massol
 
Creating your own project's Quality Dashboard
Creating your own project's Quality DashboardCreating your own project's Quality Dashboard
Creating your own project's Quality Dashboard
Vincent 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 Sharepoint
Vincent Massol
 
Creating your own project's Quality Dashboard
Creating your own project's Quality DashboardCreating your own project's Quality Dashboard
Creating your own project's Quality Dashboard
Vincent Massol
 
XWiki: The web's Swiss Army Knife
XWiki: The web's Swiss Army KnifeXWiki: The web's Swiss Army Knife
XWiki: The web's Swiss Army Knife
Vincent Massol
 
Leading a Community-Driven Open Source Project
Leading a Community-Driven Open Source ProjectLeading a Community-Driven Open Source Project
Leading a Community-Driven Open Source Project
Vincent Massol
 
XWiki Status - July 2015
XWiki Status - July 2015XWiki Status - July 2015
XWiki Status - July 2015
Vincent Massol
 
XWiki SAS: An open source company
XWiki SAS: An open source companyXWiki SAS: An open source company
XWiki SAS: An open source company
Vincent 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 2014
Vincent Massol
 
XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014
Vincent 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 on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projects
Vincent 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 interests
Vincent Massol
 
Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013
Vincent Massol
 
Developing XWiki
Developing XWikiDeveloping XWiki
Developing XWiki
Vincent Massol
 
XWiki: Developing simple apps quickly
XWiki: Developing simple apps quicklyXWiki: Developing simple apps quickly
XWiki: Developing simple apps quickly
Vincent Massol
 
XWiki Testing with TestContainers
XWiki Testing with TestContainersXWiki Testing with TestContainers
XWiki Testing with TestContainers
Vincent Massol
 
XWiki: The best wiki for developers
XWiki: The best wiki for developersXWiki: The best wiki for developers
XWiki: The best wiki for developers
Vincent Massol
 
Configuration Testing with Docker & TestContainers
Configuration Testing with Docker & TestContainersConfiguration Testing with Docker & TestContainers
Configuration Testing with Docker & TestContainers
Vincent 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.x
Vincent Massol
 
Creating your own project's Quality Dashboard
Creating your own project's Quality DashboardCreating your own project's Quality Dashboard
Creating your own project's Quality Dashboard
Vincent 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 Sharepoint
Vincent Massol
 
Creating your own project's Quality Dashboard
Creating your own project's Quality DashboardCreating your own project's Quality Dashboard
Creating your own project's Quality Dashboard
Vincent Massol
 
XWiki: The web's Swiss Army Knife
XWiki: The web's Swiss Army KnifeXWiki: The web's Swiss Army Knife
XWiki: The web's Swiss Army Knife
Vincent Massol
 
Leading a Community-Driven Open Source Project
Leading a Community-Driven Open Source ProjectLeading a Community-Driven Open Source Project
Leading a Community-Driven Open Source Project
Vincent Massol
 
XWiki Status - July 2015
XWiki Status - July 2015XWiki Status - July 2015
XWiki Status - July 2015
Vincent Massol
 
XWiki SAS: An open source company
XWiki SAS: An open source companyXWiki SAS: An open source company
XWiki SAS: An open source company
Vincent 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 2014
Vincent Massol
 
XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014
Vincent 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 on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projects
Vincent 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 interests
Vincent Massol
 
Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013Evolutions XWiki 2012/2013
Evolutions XWiki 2012/2013
Vincent Massol
 
XWiki: Developing simple apps quickly
XWiki: Developing simple apps quicklyXWiki: Developing simple apps quickly
XWiki: Developing simple apps quickly
Vincent Massol
 

Recently uploaded (20)

Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 

Building XWiki

  • 1. 27 au 29 mars 2013Vincent Massol,April 2019 Building XWiki
  • 2. Vincent Massol • CTO XWiki SAS • Open source developer • My Projects • XWiki (community-driven open source project) • Past: Maven,Apache Cargo,Apache Cactus, Pattern Testing • Other Credentials: • LesCastCodeurs podcast about Java news • Creator of OSSGTP open source group in Paris • 3 books: JUnit in Action, Maven:A Developer’s Notebook, BBWM
  • 3. Agenda • Part 0: XWiki • The project • Part 1:The XWiki Build • Automated quality checks • Different types of tests • Part 2:The CI (Jenkins) • The various XWiki pipelines • Part 3: Release Process • Putting it all together • Future
  • 4. Agenda • Part 0: XWiki • The project • Part 1:The XWiki Build • Automated quality checks • Different types of tests • Part 2:The CI (Jenkins) • The various XWiki pipelines • Part 3: Release Process • Putting it all together • Future
  • 5. What is XWiki? (1/2) • A structured open source enterprise wiki
  • 6. What is XWiki? (2/2) • A platform for developing content-based web applications
  • 8. Motivation • Change the world! • Needs impact • Needs max number of users • Open source • Needs to show progress • Release often • Needs developers / contributors • Community-driven • Requires Time-boxing • XWiki releases every month (3 weeks for RC1, 1w for final) • Requires integration between all parts • Requires CI tool • Requires quality-control • Requires automated Tests • Requires releases as automated as possible • Requires automated Build • Requires good communication
  • 10. Governance • Complete separation from XWiki SAS and XWiki.org • Only individuals working on the open source project • Rules similar to the ASF • Committership, voting (0, +1, -1), lazy consensus • xwiki.org governance and company advertising: sponsoring companies Source: http://dev.xwiki.org/xwiki/bin/view/Community/Governance
  • 11. Agenda • Part 0: XWiki • The project • Part 1: The XWiki Build • Automated quality checks • Different types of tests • Part 2:The CI (Jenkins) • The various XWiki pipelines • Part 3: Release Process • Putting it all together • Future
  • 12. Build • Maven-based with several custom plugins • Active Quality vs Passive Quality. • Strategy: if it’s not in the build it doesn’t exist! • Common to everyone • If something is important it must fail the build, otherwise it’s not important • Try to reduce CI code to the maximum for local reproducibility and to be less tied to the CI Source: http://dev.xwiki.org/xwiki/bin/view/Community/Building Build = implement quality
  • 13. Automated Checks • Standard ones: compilation, tests, javadoc linter, etc • Test execution: unit, functional, configuration,WCAG, HTML validation • Backward compatibility checks • Code quality checks • Best practices checks • Test coverage checks • Test quality checks
  • 14. Tests (1/3) • Unit tests with JUnit5 & Mockito • XWiki is Component-based and we have some JUnit5 Extensions to make it easy to test/mock dependent components @ComponentTest public class DefaultVelocityConfigurationTest { @InjectMockComponents private DefaultVelocityConfiguration configuration; @Test public void getToolsReturnsDefaultTools() { assertEquals(ListTool.class.getName(), this.configuration.getTools().get("listtool")); } }
  • 15. Tests (2/3) • Functional tests with Selenium/WebDriver • Using a PageObjects strategy
  • 16. Tests (3/3) • Configuration tests, based on Docker • Based on TestContainers • Supported Browsers, Servlet Engines & Databases • Usable on dev machine, in the IDE! • Various other more exotic configurations: LibreOffice server, Clustering, External SOLR server • Supports Docker Out Of Docker (DOOD) @UITest(database = Database.MYSQL, databaseTag = "5", servletEngine = ServletEngine.TOMCAT, servletEngineTag = “8", browser = Browser.CHROME) public class MenuIT ...
  • 17. Backward Compatibility Strategy • Check in the build with Revapi • When wanted failure, add to ignore list in pom.xml • @Deprecated then move to Legacy module using AspectJ • Use @Unstable + @Since for young APIs • Custom checkstyle check in build to prevent @Unstable from staying more than 1 cycle • {{backwardCompatibility}} xwiki macro in release notes Source: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBackwardCompatibility
  • 18. Code Quality Checks • Checkstyle with custom rules. For example • Verify that Script Services are not located in the internal package • Verify that @since javadoc tags have the correct format • Verify that @Unstable annotation don't stay too long • Verify that components.txt contains all Components • Verify that JUnit tests don't output content to stdout or stderr.  • Verify header licenses • And more…
  • 19. Best Practices Checks • Spoon checks • Verify none of the listed methods are called in our Java code • File#deleteOnExit() - Causes memory leaks since not guaranteed to be called. Not good with server software. • URL#equals() -Very slow, access the host with HTTP calls • Verify that we don't use Commons Lang < 3 (i.e. that commons- lang:commons-lang artifact is forbidden) • Verify we don't use Commons Logging or Log4j (since we use SLF4J) • And a lot more…
  • 20. Test Coverage Checks - Local • Using Jacoco and Clover • Strategy - “Ratchet effect”: • Each Maven module has a threshold • Jacoco Maven plugin fails if new code has less coverage than before in % • Dev is allowed to increase threshold • Global Coverage addressed in CI (see later)
  • 21. Test Quality Checks • Using PIT/Descartes Maven plugin • Concepts of PIT • Modify code under test (mutants) and run tests • Good tests kill mutants • Generates a mutation score similar to the coverage % • Descartes = extreme mutations that execute fast and have high values
  • 22. Mutation - Example result =    (getId() == macroId.getId() || (getId() != null && getId().equals(macroId.getId())))    && (getSyntax() == macroId.getSyntax() || (getSyntax() != null && getSyntax().equals(     macroId.getSyntax())));
  • 23. Mutation Example @Test public void testEquality() {     MacroId id1 = new MacroId("id", Syntax.XWIKI_2_0);     MacroId id2 = new MacroId("id", Syntax.XWIKI_2_0);     MacroId id3 = new MacroId("otherid", Syntax.XWIKI_2_0);     MacroId id4 = new MacroId("id", Syntax.XHTML_1_0);     MacroId id5 = new MacroId("otherid", Syntax.XHTML_1_0);     MacroId id6 = new MacroId("id");     MacroId id7 = new MacroId("id");     Assert.assertEquals(id2, id1);    // Equal objects must have equal hashcode    Assert.assertTrue(id1.hashCode() == id2.hashCode());     Assert.assertFalse(id3 == id1);     Assert.assertFalse(id4 == id1);     Assert.assertFalse(id5 == id3);     Assert.assertFalse(id6 == id1);     Assert.assertEquals(id7, id6);    // Equal objects must have equal hashcode    Assert.assertTrue(id6.hashCode() == id7.hashCode()); } Not testing for inequality! Improved thanks to Descartes!
  • 24. Mutation Limitations • Takes time to find interesting things to look at and decide if that’s an issue to handle or not. Need better categorisation in report (now reported by Descartes): • Strong pseudo-tested methods:The worst! No matter what the return values are the tests always fail • Pseudo-tested methods: Grey area.The tests pass with at least one modified value. • Multi module support - PITmp • But slow on large projects (e.g. 7+ hours just for xwiki-rendering)
  • 25. Test Quality Checks - Strategy • Fail the build when the mutation score of a given module is below a defined threshold in the pom.xml • The idea is that new tests should, in average, be of quality equal or better General goal with coverage + mutation: maintain qualitythan past tests. • Other idea: hook on CI to run it only on modified code/tests. • Still some hiccups regarding the mutation score stability! General goal with coverage + mutation: maintain quality
  • 26. Agenda • Part 0: XWiki • The project • Part 1:The XWiki Build • Automated quality checks • Different types of tests • Part 2: The CI (Jenkins) • The various XWiki pipelines • Part 3: Release Process • Putting it all together • Future
  • 27. XWiki’s CI - Jenkins • XWiki Jobs are Pipeline jobs • Using “GitHub Organization” type of jobs • Autodiscovering of all Jenkinsfile in a GitHub organization • Automatic handling of branches (job creation/deletion) • Shared Pipeline library for all jobs • Clover Pipeline job to compute global TPC • Docker Pipeline jobs for running Docker-based tests on all configurations • Moving to Docker agent and DOOD (Docker Out of Docker)
  • 28. Shared Pipeline Library • Features • Maven build • Check for flickers both environment flickers and test flickers and don’t send false positives emails in this case. Examples of environment flickers: • JVM crash • GitHub connection issue • X Display not ready for UI tests • Uses JIRA to log test flickers • Display screenshot of failing test in job report
  • 29. Standard Pipeline Jobs • 1 job = several builds (13+ in our case) • Validates different things: • “Main”: compile and test execution including functional tests • “Quality”: Revapi checks, checkstyle, Descartes, Jacoco • “TestRelease”: Simulate a release.Verifies Maven Central requirements (javadoc, etc) • “Flavor*”:Various types of functional tests • Parallel execution for some jobs
  • 30. Clover Pipeline • Issue: Local coverage can increase and global decrease • Removed code with high TPC • Code tested indirectly by functional tests and code refactoring led to different paths used • New module with lower TPC than average • Strategy: Fail the CI build if Global TPC decreases for the current version
  • 31. Docker Pipeline Jobs • Currently a separate pipeline from the main one • Two issues • Requires Jenkins Docker agent to be used (Docker doesn’t work inside vServer that we use). Migration in progress. • Long to execute since it tests all configurations and thus should only be executed once per day. • Finds all Docker test modules and run Maven on each of them, passing the configuration as system properties.
  • 32. DOOD • Jenkins agent running as a Docker container • Pipeline (and thus Maven) executing inside Docker • Thus Functional tests based on Docker executing inside Docker • To make it work: • Mount Docker socket (only Docker client inside Docker) • Don’t mount volumes: copy data (in and out) • Requires special care when writing the JUnit5 Test Container extension
  • 33. Jenkins Docker Cloud Configuration • 3 volumes: • Docker socket • Maven settings.xml since it contains passwords • SSH keys (private data)
  • 35. Agenda • Part 0: XWiki • The project • Part 1:The XWiki Build • Automated quality checks • Different types of tests • Part 2:The CI (Jenkins) • The various XWiki pipelines • Part 3: Release Process • Putting it all together • Future
  • 36. Release Process • Ongoing Release Notes and reference documentation • Marked in JIRA with 2 custom fields • Rolling Release Managers Source: http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/ • Create Release Plan for the release
  • 37. Release Plans (1/2) Source: http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/
  • 38. Release Plans (2/2) • Release in JIRA • Check that all issues are documented • Check Release Notes • Import translations • Build the Release • Create mail announcement • Push to Maven Central • Update Docker official image • etc Source: http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/ReleasePlan845
  • 39. Agenda • Part 0: XWiki • The project • Part 1:The XWiki Build • Automated quality checks • Different types of tests • Part 2:The CI (Jenkins) • The various XWiki pipelines • Part 3: Release Process • Putting it all together • Future
  • 40. Future - Build Level • Move Test configurations to the build • Fix UI flickerings which are a plague • Idea: Change our DSL so that all calls always wait on something
  • 41. Future - CI Level • Docker pipeline integrated into main Pipeline library • To handle branches (a pain right now) • Needs Parametrized Scheduler Plugin • Move to CD, i.e. implement the release steps in the CI • Need to resolve Maven versions and put on staging & promote when we want • Auto deploy on myxwiki.org • STAMP: DSpot on diffs, Evocrash (JIRA -> CI)