SlideShare uma empresa Scribd logo
1 de 32
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!

Mais conteúdo relacionado

Mais procurados

Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the Worlddamovsky
 
Engage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedEngage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedPaul 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 ONAPVictor 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 challengeBronco Oostermeyer
 
Lessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGLLessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGLLior 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 releasesAmit Gupta
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovskyphp-user-group-minsk
 
Front-End Tools and Workflows
Front-End Tools and WorkflowsFront-End Tools and Workflows
Front-End Tools and WorkflowsSara 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 GalChad Woolley
 
DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxAndrii 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 dotnetRick van den Bosch
 
Untangling spring week12
Untangling spring week12Untangling spring week12
Untangling spring week12Derek 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, Manchestercitizenmatt
 

Mais procurados (20)

Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
Engage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedEngage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-Red
 
Who Needs Visual Studio?
Who Needs Visual Studio?Who Needs Visual Studio?
Who Needs Visual Studio?
 
Dot Net Core
Dot Net CoreDot Net Core
Dot Net Core
 
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
 
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.
 
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
 
Lessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGLLessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGL
 
.Net Core
.Net Core.Net Core
.Net Core
 
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
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
Hacking the way you work
Hacking the way you workHacking the way you work
Hacking the way you work
 
React Native
React NativeReact Native
React Native
 
Front-End Tools and Workflows
Front-End Tools and WorkflowsFront-End Tools and Workflows
Front-End Tools and Workflows
 
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
 
DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration Toolbox
 
.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
 
Untangling spring week12
Untangling spring week12Untangling spring week12
Untangling spring week12
 
.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
 
.Net Core
.Net Core.Net Core
.Net Core
 

Destaque

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 2015gregorbyte
 
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 practicesCode Mastery
 
Rule jenkins with configuration as code
Rule jenkins with configuration as codeRule jenkins with configuration as code
Rule jenkins with configuration as codeChristian Rasp
 
Continuous Integration & Package Management 101
Continuous Integration & Package Management 101Continuous Integration & Package Management 101
Continuous Integration & Package Management 101Maor Hayun
 
IBM Connect 2017 - Beyond Domino Designer
IBM Connect 2017 - Beyond Domino DesignerIBM Connect 2017 - Beyond Domino Designer
IBM Connect 2017 - Beyond Domino DesignerStephan 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 NicheLeslie Samuel
 

Destaque (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...
 
Build automation for XPages - AUSLUG 2015
Build automation for XPages - AUSLUG 2015Build automation for XPages - AUSLUG 2015
Build automation for XPages - AUSLUG 2015
 
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...
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
 
Build Automation in Android
Build Automation in AndroidBuild Automation in Android
Build Automation in Android
 
Rule jenkins with configuration as code
Rule jenkins with configuration as codeRule jenkins with configuration as code
Rule jenkins with configuration as code
 
Continuous Integration & Package Management 101
Continuous Integration & Package Management 101Continuous Integration & Package Management 101
Continuous Integration & Package Management 101
 
IBM Connect 2017 - Beyond Domino Designer
IBM Connect 2017 - Beyond Domino DesignerIBM Connect 2017 - Beyond Domino Designer
IBM Connect 2017 - Beyond Domino Designer
 
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
 

Semelhante a XPages build automation and testing

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 2015Michael Tauraso
 
Jenkins CI for MacDevOps
Jenkins CI for MacDevOpsJenkins CI for MacDevOps
Jenkins CI for MacDevOpsTimothy Sutton
 
Websockets: Pushing the web forward
Websockets: Pushing the web forwardWebsockets: Pushing the web forward
Websockets: Pushing the web forwardMark 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 testPeter Lindberg
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic 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.2013Kevin Munc
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemYi-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 developersMark Leusink
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsAbe 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 timesRene Gröschke
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesAndreas Katzig
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, 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 CloudRyan 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 OpenPOWERIndrajit 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
 

Semelhante a 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
 
Jenkins CI for MacDevOps
Jenkins CI for MacDevOpsJenkins CI for MacDevOps
Jenkins CI for MacDevOps
 
Websockets: Pushing the web forward
Websockets: Pushing the web forwardWebsockets: Pushing the web forward
Websockets: Pushing the web forward
 
ExpoQA 2017 Docker and CI
ExpoQA 2017 Docker and CIExpoQA 2017 Docker and CI
ExpoQA 2017 Docker and CI
 
Docker & ci
Docker & ciDocker & ci
Docker & ci
 
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
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
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
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
 
Node azure
Node azureNode azure
Node azure
 
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
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
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
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
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"
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
 
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
 
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)
 

Último

WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 

Último (20)

WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 

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 jinoch@gmail.com @mjinoch http://jinoch.cz • Martin Přádný pradny@pradny.com @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/

Notas do Editor

  1. 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.
  2. 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>
  3. Run SimpleArticle test Run DominoArticle test – explain mocking Run ViewArticle test – explain why failed
  4. Maven - https://github.com/OpenNTF/BuildAndTestPattern4Xpages Ant - https://github.com/camac/BuildXPages Gradle - https://bitbucket.org/pradnik/gradledominoplugin
  5. Taken from https://github.com/OpenNTF/BuildAndTestPattern4Xpages/blob/master/testpatterns/org.openntf.junit.xsp.parent/org.openntf.junit.odp/pom.xml
  6. http://openntf.org/main.nsf/project.xsp?r=project/IBM%20Domino%20Update%20Site%20for%20Build%20Management
  7. Jenkins https://jenkins-ci.org/ Bamboo https://www.atlassian.com/software/bamboo TeamCity https://www.jetbrains.com/teamcity/
  8. 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>
  9. mvn clean verify –P complete