SlideShare a Scribd company logo
www.ics.ug #icsug
Let the machines do their work
and have good night sleep
Martin Přádný, @mpradny
Martin Jinoch, @mjinoch
www.ics.ug #icsug
Agenda
• Introduction
• Testing and Domino
– Demo 1
• Build Automation
– Demo 2
• Discussion
www.ics.ug #icsug
About us
• Martin Jinoch
jinoch@gmail.com
@mjinoch
http://jinoch.cz
• Martin Přádný
pradny@pradny.com
@mpradny
http://pradny.com
www.ics.ug #icsug
Why building and testing matters?
• Code changes break existing features
• Developers step on each others code
• Infrastructure changes break apps
• Application works only for happy-path
scenarios
www.ics.ug #icsug
Testing
• Unit testing
• Integration testing
• UI testing
www.ics.ug #icsug
Domino Problems
• Tight data and code integration
• Unstructured code
• Dependency on Notes C runtime
• No light in-memory option
www.ics.ug #icsug
Solutions
• Write apps with testing in mind
• Separate code and data
• Source Control
• Build automation
www.ics.ug #icsug
Tools
• XPages with Junit
– org.openntf.junit.xsp
• JUnit/TestNG in your ODS project
– Easy test of non-XPages code
– Mock domino classes – EasyMock, PowerMock
• UI testing
– Selenium
www.ics.ug #icsug
Local testing setup
• Change ODP to Java project
– Maks Zhuk - http://mzhuk.blogspot.com/
– Manually edit .project file
– Add Code/Java as Source Folder
– Add Local directory
• Create Java project with tests
– Add mocking library (optional)
www.ics.ug #icsug
Local testing setup - details
• http://mzhuk.blogspot.com/2014/02/unit-tests-for-lotus-domino-
applications.html
• Snippet from .project
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
www.ics.ug #icsug
www.ics.ug #icsug
Demo 1 - scenario
• XPages application – fake CMS with articles
• Computation of article expiration date
– based on article type
– logic in Java
• 3 different types of definitions and tests
– Hard-coded in Java
– In a document
– In a view
www.ics.ug #icsug
Demo
www.ics.ug #icsug
Automation
• Maven, Ant, Gradle, ..
– Describe and run steps to get final deliverable
• Jenkins, Teamcity, Bamboo, …
– Continuous integration
– Check-out source code
– Run periodical builds and much more
www.ics.ug #icsug
Headless designer
• Command line invocation of Domino Designer
• Create NSF from On Disk Project
• Enable/Disable plugins
• New feature in 9.0.1
• http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Headless_Designer_Wiki
• notes.ini parameter - DESIGNER_AUTO_ENABLED=true
• ID without password
www.ics.ug #icsug
Headless designer invocation
• Manually
– Single command command line
• designer -RPARAMS -vmargs -
Dcom.ibm.designer.cmd=[clean],[exit],[file name],[job
name],[file path],[file name]
– Command file
• designer -RPARAMS -vmargs -
Dcom.ibm.designer.cmd.file=[path to command file]
www.ics.ug #icsug
Headless designer wrappers
• Maven – Christian Güdemann
– Included in public Maven repository
– Options to install Designer plugins
– https://github.com/OpenNTF/BuildAndTestPattern4Xpages
• Ant – Cameron Gregor
– Additional tasks for NSF manipulation
– Uses Java Native Interface
– https://github.com/camac/BuildXPages
• Gradle - Martin Pradny
– not maintained
– https://bitbucket.org/pradnik/gradledominoplugin
www.ics.ug #icsug
Headless designer - Maven
<packaging>domino-nsf</packaging>
<properties>
<ddehd.odpdirectory>${basedir}/on-disk-project</ddehd.odpdirectory>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.openntf.maven</groupId>
<artifactId>headlessdesigner-maven-plugin</artifactId>
<version>1.2.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
From:https://github.com/OpenNTF/BuildAndTestPattern4Xpages/blob/master/testpatterns/org.openntf.junit.xs
p.parent/org.openntf.junit.odp/pom.xml
www.ics.ug #icsug
Why Maven
• Standard in XPages community
• OSGi friendly with Tycho plugin
• IBM released Update Site on OpenNTF.org
– IBM Domino Update Site for Build Management
– http://openntf.org/main.nsf/project.xsp?r=project/IB
M%20Domino%20Update%20Site%20for%20Build%20
Management
• Allows building Extension Libraries
www.ics.ug #icsug
Jenkins (teamcity, bamboo,..)
• Continuous Integration
• Integrate with SCM (Git, SVN, …)
– Trigger build, push/pull, …
• Run build, Run tests
• Report errors
• Deploy to production
• Extensible with plugins
www.ics.ug #icsug
• Jenkins
– https://jenkins-ci.org/
• Bamboo
– https://www.atlassian.com/software/bamboo
• TeamCity
– https://www.jetbrains.com/teamcity/
www.ics.ug #icsug
Selenium
• Web browser automation (Firefox, Chrome, IE,…)
• Selenium IDE (Firefox)
– Record tests
– Replay tests
– Export (Java, C#, ruby, Python, ..)
• Selenium server, grid
– Run tests on remote machines
• http://www.seleniumhq.org
www.ics.ug #icsug
Demo 2 - scenario
• Same application as in Demo 1
• Maven driven build on Jenkins
– Compile and run tests using Tycho/OSGi
– Build NSF from ODP – Maven plugin
– Run Selenium tests
• Copy NSF to server – Ant task
• Load data – calling an Agent using URL
www.ics.ug #icsug
Demo 2 - Environment
www.ics.ug #icsug
Demo 2
www.ics.ug #icsug
Demo 2 - notes
• https://bitbucket.org/pradnik/ics.ug-demo
• mvn clean verify –P complete
• Jenkins running as a service
– Allow to interact with desktop
– SCM Poll since running as local VM (not optimal)
• Maven settings
– using Config File Provider plugin
– <notes-platform> for Domino Update Site
– <ddehd.notesdata> for Designer data directory
• Profile for just testing
• Some properties are hard coded in pom.xml
www.ics.ug #icsug
Demo 2 – settings.xml
<settings>
<pluginGroups>
<pluginGroup>org.openntf.maven</pluginGroup>
</pluginGroups>
<profiles>
<profile>
<id>main</id>
<properties>
<notes-platform>file:///Z:/Share/DominoUpdatsite</notes-platform>
<ddehd.notesdata>c:/IBM/Notes/Data/</ddehd.notesdata>
</properties>
</profile>
</profiles>
</settings>
www.ics.ug #icsug
Demo 2 – Jenkins configuration
www.ics.ug #icsug
Trade-offs
• What to automate
• Cost of test maintenance vs. manual execution
• False feeling of security
www.ics.ug #icsug
Conclusion
• Testing is good
• Test from very start
– Helps cleaner code
– Helps cleaner UI
• Path to Continuous Delivery
• Code quality automated analysis
– SonarQube - http://www.sonarqube.org/
www.ics.ug #icsug
Questions?
www.ics.ug #icsug
Thank you!
Ad

More Related Content

What's hot (20)

Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
damovsky
 
Engage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedEngage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-Red
Paul Withers
 
Who Needs Visual Studio?
Who Needs Visual Studio?Who Needs Visual Studio?
Who Needs Visual Studio?
Christopher Gomez
 
Dot Net Core
Dot Net CoreDot Net Core
Dot Net Core
Amir Barylko
 
How to setup a development environment for ONAP
How to setup a development environment for ONAPHow to setup a development environment for ONAP
How to setup a development environment for ONAP
Victor Morales
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
Andrii Podanenko
 
PUG Challenge 2016 - The nativescript pug app challenge
PUG Challenge 2016 -  The nativescript pug app challengePUG Challenge 2016 -  The nativescript pug app challenge
PUG Challenge 2016 - The nativescript pug app challenge
Bronco Oostermeyer
 
Lessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGLLessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGL
Lior Tal
 
.Net Core
.Net Core.Net Core
.Net Core
Software Infrastructure
 
How to use Concourse CI to deliver BOSH releases
How to use Concourse CI to deliver BOSH releasesHow to use Concourse CI to deliver BOSH releases
How to use Concourse CI to deliver BOSH releases
Amit Gupta
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
php-user-group-minsk
 
Hacking the way you work
Hacking the way you workHacking the way you work
Hacking the way you work
Fotis Alexandrou
 
React Native
React NativeReact Native
React Native
Artyom Trityak
 
Front-End Tools and Workflows
Front-End Tools and WorkflowsFront-End Tools and Workflows
Front-End Tools and Workflows
Sara Vieira
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or Gal
Chad Woolley
 
DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration Toolbox
Andrii Podanenko
 
.Net Core - not your daddy's dotnet
.Net Core - not your daddy's dotnet.Net Core - not your daddy's dotnet
.Net Core - not your daddy's dotnet
Rick van den Bosch
 
Untangling spring week12
Untangling spring week12Untangling spring week12
Untangling spring week12
Derek Jacoby
 
.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester
citizenmatt
 
.Net Core
.Net Core.Net Core
.Net Core
Bertrand Le Roy
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
damovsky
 
Engage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedEngage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-Red
Paul Withers
 
How to setup a development environment for ONAP
How to setup a development environment for ONAPHow to setup a development environment for ONAP
How to setup a development environment for ONAP
Victor Morales
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
Andrii Podanenko
 
PUG Challenge 2016 - The nativescript pug app challenge
PUG Challenge 2016 -  The nativescript pug app challengePUG Challenge 2016 -  The nativescript pug app challenge
PUG Challenge 2016 - The nativescript pug app challenge
Bronco Oostermeyer
 
Lessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGLLessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGL
Lior Tal
 
How to use Concourse CI to deliver BOSH releases
How to use Concourse CI to deliver BOSH releasesHow to use Concourse CI to deliver BOSH releases
How to use Concourse CI to deliver BOSH releases
Amit Gupta
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
php-user-group-minsk
 
Front-End Tools and Workflows
Front-End Tools and WorkflowsFront-End Tools and Workflows
Front-End Tools and Workflows
Sara Vieira
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or Gal
Chad Woolley
 
DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration Toolbox
Andrii Podanenko
 
.Net Core - not your daddy's dotnet
.Net Core - not your daddy's dotnet.Net Core - not your daddy's dotnet
.Net Core - not your daddy's dotnet
Rick van den Bosch
 
Untangling spring week12
Untangling spring week12Untangling spring week12
Untangling spring week12
Derek Jacoby
 
.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester
citizenmatt
 

Viewers also liked (9)

EntwicklerCamp 2014 - Domino Designer : Tips, Tricks and Enhancements for Max...
EntwicklerCamp 2014 - Domino Designer : Tips, Tricks and Enhancements for Max...EntwicklerCamp 2014 - Domino Designer : Tips, Tricks and Enhancements for Max...
EntwicklerCamp 2014 - Domino Designer : Tips, Tricks and Enhancements for Max...
marjoramg
 
Build automation for XPages - AUSLUG 2015
Build automation for XPages - AUSLUG 2015Build automation for XPages - AUSLUG 2015
Build automation for XPages - AUSLUG 2015
gregorbyte
 
Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...
Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...
Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...
marjoramg
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
Code Mastery
 
Build Automation in Android
Build Automation in AndroidBuild Automation in Android
Build Automation in Android
Angelo Rüggeberg
 
Rule jenkins with configuration as code
Rule jenkins with configuration as codeRule jenkins with configuration as code
Rule jenkins with configuration as code
Christian Rasp
 
Continuous Integration & Package Management 101
Continuous Integration & Package Management 101Continuous Integration & Package Management 101
Continuous Integration & Package Management 101
Maor Hayun
 
IBM Connect 2017 - Beyond Domino Designer
IBM Connect 2017 - Beyond Domino DesignerIBM Connect 2017 - Beyond Domino Designer
IBM Connect 2017 - Beyond Domino Designer
Stephan H. Wissel
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
Leslie Samuel
 
EntwicklerCamp 2014 - Domino Designer : Tips, Tricks and Enhancements for Max...
EntwicklerCamp 2014 - Domino Designer : Tips, Tricks and Enhancements for Max...EntwicklerCamp 2014 - Domino Designer : Tips, Tricks and Enhancements for Max...
EntwicklerCamp 2014 - Domino Designer : Tips, Tricks and Enhancements for Max...
marjoramg
 
Build automation for XPages - AUSLUG 2015
Build automation for XPages - AUSLUG 2015Build automation for XPages - AUSLUG 2015
Build automation for XPages - AUSLUG 2015
gregorbyte
 
Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...
Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...
Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...
marjoramg
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
Code Mastery
 
Rule jenkins with configuration as code
Rule jenkins with configuration as codeRule jenkins with configuration as code
Rule jenkins with configuration as code
Christian Rasp
 
Continuous Integration & Package Management 101
Continuous Integration & Package Management 101Continuous Integration & Package Management 101
Continuous Integration & Package Management 101
Maor Hayun
 
IBM Connect 2017 - Beyond Domino Designer
IBM Connect 2017 - Beyond Domino DesignerIBM Connect 2017 - Beyond Domino Designer
IBM Connect 2017 - Beyond Domino Designer
Stephan H. Wissel
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
Leslie Samuel
 
Ad

Similar to XPages build automation and testing (20)

Taming iOS Testing at Square -- JUC West 2015
Taming iOS Testing at Square -- JUC West 2015Taming iOS Testing at Square -- JUC West 2015
Taming iOS Testing at Square -- JUC West 2015
Michael Tauraso
 
Jenkins CI for MacDevOps
Jenkins CI for MacDevOpsJenkins CI for MacDevOps
Jenkins CI for MacDevOps
Timothy Sutton
 
Websockets: Pushing the web forward
Websockets: Pushing the web forwardWebsockets: Pushing the web forward
Websockets: Pushing the web forward
Mark Roden
 
Docker & ci
Docker & ciDocker & ci
Docker & ci
Patxi Gortázar
 
ExpoQA 2017 Docker and CI
ExpoQA 2017 Docker and CIExpoQA 2017 Docker and CI
ExpoQA 2017 Docker and CI
ElasTest Project
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load test
Peter Lindberg
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013
Kevin Munc
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
Yi-Ting Cheng
 
Node azure
Node azureNode azure
Node azure
Emanuele DelBono
 
A 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersA 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developers
Mark Leusink
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
Jason Gerard
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
Gradle - From minutes to seconds: minimizing build times
Gradle - From minutes to seconds: minimizing build timesGradle - From minutes to seconds: minimizing build times
Gradle - From minutes to seconds: minimizing build times
Rene Gröschke
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
Andreas Katzig
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
Docker, Inc.
 
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Andi Rustandi Djunaedi
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
Ryan Cuprak
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Indrajit Poddar
 
Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)
ColdFusionConference
 
Taming iOS Testing at Square -- JUC West 2015
Taming iOS Testing at Square -- JUC West 2015Taming iOS Testing at Square -- JUC West 2015
Taming iOS Testing at Square -- JUC West 2015
Michael Tauraso
 
Jenkins CI for MacDevOps
Jenkins CI for MacDevOpsJenkins CI for MacDevOps
Jenkins CI for MacDevOps
Timothy Sutton
 
Websockets: Pushing the web forward
Websockets: Pushing the web forwardWebsockets: Pushing the web forward
Websockets: Pushing the web forward
Mark Roden
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load test
Peter Lindberg
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013
Kevin Munc
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
Yi-Ting Cheng
 
A 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersA 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developers
Mark Leusink
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
Gradle - From minutes to seconds: minimizing build times
Gradle - From minutes to seconds: minimizing build timesGradle - From minutes to seconds: minimizing build times
Gradle - From minutes to seconds: minimizing build times
Rene Gröschke
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
Andreas Katzig
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
Docker, Inc.
 
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Tech IT Easy x DevTalk : "Secure Your Coding with OWASP"
Andi Rustandi Djunaedi
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
Ryan Cuprak
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Indrajit Poddar
 
Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)
ColdFusionConference
 
Ad

Recently uploaded (20)

TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 

XPages build automation and testing

  • 1. www.ics.ug #icsug Let the machines do their work and have good night sleep Martin Přádný, @mpradny Martin Jinoch, @mjinoch
  • 2. www.ics.ug #icsug Agenda • Introduction • Testing and Domino – Demo 1 • Build Automation – Demo 2 • Discussion
  • 3. www.ics.ug #icsug About us • Martin Jinoch [email protected] @mjinoch http://jinoch.cz • Martin Přádný [email protected] @mpradny http://pradny.com
  • 4. www.ics.ug #icsug Why building and testing matters? • Code changes break existing features • Developers step on each others code • Infrastructure changes break apps • Application works only for happy-path scenarios
  • 5. www.ics.ug #icsug Testing • Unit testing • Integration testing • UI testing
  • 6. www.ics.ug #icsug Domino Problems • Tight data and code integration • Unstructured code • Dependency on Notes C runtime • No light in-memory option
  • 7. www.ics.ug #icsug Solutions • Write apps with testing in mind • Separate code and data • Source Control • Build automation
  • 8. www.ics.ug #icsug Tools • XPages with Junit – org.openntf.junit.xsp • JUnit/TestNG in your ODS project – Easy test of non-XPages code – Mock domino classes – EasyMock, PowerMock • UI testing – Selenium
  • 9. www.ics.ug #icsug Local testing setup • Change ODP to Java project – Maks Zhuk - http://mzhuk.blogspot.com/ – Manually edit .project file – Add Code/Java as Source Folder – Add Local directory • Create Java project with tests – Add mocking library (optional)
  • 10. www.ics.ug #icsug Local testing setup - details • http://mzhuk.blogspot.com/2014/02/unit-tests-for-lotus-domino- applications.html • Snippet from .project <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures>
  • 12. www.ics.ug #icsug Demo 1 - scenario • XPages application – fake CMS with articles • Computation of article expiration date – based on article type – logic in Java • 3 different types of definitions and tests – Hard-coded in Java – In a document – In a view
  • 14. www.ics.ug #icsug Automation • Maven, Ant, Gradle, .. – Describe and run steps to get final deliverable • Jenkins, Teamcity, Bamboo, … – Continuous integration – Check-out source code – Run periodical builds and much more
  • 15. www.ics.ug #icsug Headless designer • Command line invocation of Domino Designer • Create NSF from On Disk Project • Enable/Disable plugins • New feature in 9.0.1 • http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Headless_Designer_Wiki • notes.ini parameter - DESIGNER_AUTO_ENABLED=true • ID without password
  • 16. www.ics.ug #icsug Headless designer invocation • Manually – Single command command line • designer -RPARAMS -vmargs - Dcom.ibm.designer.cmd=[clean],[exit],[file name],[job name],[file path],[file name] – Command file • designer -RPARAMS -vmargs - Dcom.ibm.designer.cmd.file=[path to command file]
  • 17. www.ics.ug #icsug Headless designer wrappers • Maven – Christian Güdemann – Included in public Maven repository – Options to install Designer plugins – https://github.com/OpenNTF/BuildAndTestPattern4Xpages • Ant – Cameron Gregor – Additional tasks for NSF manipulation – Uses Java Native Interface – https://github.com/camac/BuildXPages • Gradle - Martin Pradny – not maintained – https://bitbucket.org/pradnik/gradledominoplugin
  • 18. www.ics.ug #icsug Headless designer - Maven <packaging>domino-nsf</packaging> <properties> <ddehd.odpdirectory>${basedir}/on-disk-project</ddehd.odpdirectory> </properties> <build> <plugins> <plugin> <groupId>org.openntf.maven</groupId> <artifactId>headlessdesigner-maven-plugin</artifactId> <version>1.2.0</version> <extensions>true</extensions> </plugin> </plugins> </build> From:https://github.com/OpenNTF/BuildAndTestPattern4Xpages/blob/master/testpatterns/org.openntf.junit.xs p.parent/org.openntf.junit.odp/pom.xml
  • 19. www.ics.ug #icsug Why Maven • Standard in XPages community • OSGi friendly with Tycho plugin • IBM released Update Site on OpenNTF.org – IBM Domino Update Site for Build Management – http://openntf.org/main.nsf/project.xsp?r=project/IB M%20Domino%20Update%20Site%20for%20Build%20 Management • Allows building Extension Libraries
  • 20. www.ics.ug #icsug Jenkins (teamcity, bamboo,..) • Continuous Integration • Integrate with SCM (Git, SVN, …) – Trigger build, push/pull, … • Run build, Run tests • Report errors • Deploy to production • Extensible with plugins
  • 21. www.ics.ug #icsug • Jenkins – https://jenkins-ci.org/ • Bamboo – https://www.atlassian.com/software/bamboo • TeamCity – https://www.jetbrains.com/teamcity/
  • 22. www.ics.ug #icsug Selenium • Web browser automation (Firefox, Chrome, IE,…) • Selenium IDE (Firefox) – Record tests – Replay tests – Export (Java, C#, ruby, Python, ..) • Selenium server, grid – Run tests on remote machines • http://www.seleniumhq.org
  • 23. www.ics.ug #icsug Demo 2 - scenario • Same application as in Demo 1 • Maven driven build on Jenkins – Compile and run tests using Tycho/OSGi – Build NSF from ODP – Maven plugin – Run Selenium tests • Copy NSF to server – Ant task • Load data – calling an Agent using URL
  • 24. www.ics.ug #icsug Demo 2 - Environment
  • 26. www.ics.ug #icsug Demo 2 - notes • https://bitbucket.org/pradnik/ics.ug-demo • mvn clean verify –P complete • Jenkins running as a service – Allow to interact with desktop – SCM Poll since running as local VM (not optimal) • Maven settings – using Config File Provider plugin – <notes-platform> for Domino Update Site – <ddehd.notesdata> for Designer data directory • Profile for just testing • Some properties are hard coded in pom.xml
  • 27. www.ics.ug #icsug Demo 2 – settings.xml <settings> <pluginGroups> <pluginGroup>org.openntf.maven</pluginGroup> </pluginGroups> <profiles> <profile> <id>main</id> <properties> <notes-platform>file:///Z:/Share/DominoUpdatsite</notes-platform> <ddehd.notesdata>c:/IBM/Notes/Data/</ddehd.notesdata> </properties> </profile> </profiles> </settings>
  • 28. www.ics.ug #icsug Demo 2 – Jenkins configuration
  • 29. www.ics.ug #icsug Trade-offs • What to automate • Cost of test maintenance vs. manual execution • False feeling of security
  • 30. www.ics.ug #icsug Conclusion • Testing is good • Test from very start – Helps cleaner code – Helps cleaner UI • Path to Continuous Delivery • Code quality automated analysis – SonarQube - http://www.sonarqube.org/

Editor's Notes

  • #9: PowerMock is a framework that extend other mock libraries such as EasyMock with more powerful capabilities. PowerMock uses a custom classloader and bytecode manipulation to enable mocking of static methods, constructors, final classes and methods, private methods, removal of static initializers and more.
  • #10: http://mzhuk.blogspot.com/2014/02/unit-tests-for-lotus-domino-applications.html <buildCommand>     <name>org.eclipse.jdt.core.javabuilder</name>     <arguments>     </arguments>   </buildCommand> </buildSpec> <natures>   <nature>org.eclipse.jdt.core.javanature</nature> </natures>
  • #14: Run SimpleArticle test Run DominoArticle test – explain mocking Run ViewArticle test – explain why failed
  • #18: Maven - https://github.com/OpenNTF/BuildAndTestPattern4Xpages Ant - https://github.com/camac/BuildXPages Gradle - https://bitbucket.org/pradnik/gradledominoplugin
  • #19: Taken from https://github.com/OpenNTF/BuildAndTestPattern4Xpages/blob/master/testpatterns/org.openntf.junit.xsp.parent/org.openntf.junit.odp/pom.xml
  • #20: http://openntf.org/main.nsf/project.xsp?r=project/IBM%20Domino%20Update%20Site%20for%20Build%20Management
  • #21: Jenkins https://jenkins-ci.org/ Bamboo https://www.atlassian.com/software/bamboo TeamCity https://www.jetbrains.com/teamcity/
  • #27: settings.xml: <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <pluginGroups> <pluginGroup>org.openntf.maven</pluginGroup> </pluginGroups> <profiles> <profile> <id>main</id> <properties> <notes-platform>file:///Z:/Share/DominoUpdatsite</notes-platform> <ddehd.notesdata>c:/IBM/Notes/Data/</ddehd.notesdata> </properties> </profile> </profiles> </settings>
  • #29: mvn clean verify –P complete