Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the...

31
BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH I f Jenkins Oraclet A few thoughts on the subject " Continuous integration (CI) and PL/SQL in the Back - End development " or " if Jenkins Oraclet Martin Ritschel Senior Consultant

Transcript of Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the...

Page 1: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH

If Jenkins OracletA few thoughts on the subject "Continuous integration (CI) andPL/SQL in the Back-End development" or "if Jenkins Oraclet“Martin RitschelSenior Consultant

Page 2: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Agenda

“if Jenkins Oraclet“2 09.09.2016

1. Continuous Integration (CI)

2. Unit-Testing

3. CI mit Jenkins

4. Unit-Tests mit Jenkins

5. Fazit

Page 3: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

"if Jenkins Oraclet“3 09.09.2016

Continuous Integration

Page 4: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Continuous Integration

"if Jenkins Oraclet“4 09.09.2016

Continuous Integration hat das Ziel, die Qualität der Software über permanenteIntegration ihrer einzelnen Bestandteile zu steigern. Statt die Software nur in sehrgroßen Zeitabständen kurz vor der Auslieferung zu erstellen, wird sie in kleinen Zyklenimmer wieder erstellt und getestet.

Integrations-Probleme werden laufend entdeckt und behoben (gefixt)

Frühe Warnungen bei nicht zusammenpassenden Bestandteilen

Unit-Tests dienen zur schnelleren Erkennung und Beseitigung von Fehlern

Die sofortige Reaktion des Systems auf das Einchecken eines fehlerhaften oder unvollständigen Codes

Page 5: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Continuous Integration

"if Jenkins Oraclet“5 09.09.2016

Warum sollte man überhaupt Continuous Integration nutzen?

„Immediate Feedback“

Diese Methode ermöglicht, dem Team und dabei insbesondere dem Entwickler,schnellstmöglich („Immediate“) Feedback über die Qualität seiner Software nach einerÄnderung zu geben. Dazu ist es notwendig, die Änderungen jedes Einzelnen auch sorasch wie möglich mit dem Gesamtstand zu integrieren und integriert zu testen.

Page 6: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Continuous Integration

"if Jenkins Oraclet“6 09.09.2016

Developer

Version Control System z.B. SubVersion

ci Server z.B. Jenkins

Build Service

check out

Developer

Developer

Start: § build§ unit-tests§ deployment

• team leads• testers• managment• etc…

notify

check in

Page 7: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

"if Jenkins Oraclet“7 09.09.2016

Unit-Testing

Page 8: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Testing

"if Jenkins Oraclet“8 09.09.2016

PL/SQL Unit-TestingCan Be Fun!?

With a little help from

Page 9: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Testing

"if Jenkins Oraclet“9 09.09.2016

Generelle Frage: Wozu Unit Tests?

Konsequent stabile Software entwickeln

Instabilitäten während Refactoring erkennen

Nicht dokumentierte Seiteneffekte finden

Frühzeitig Fehler finden

Besseres Design

Page 10: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Testing

"if Jenkins Oraclet“10 09.09.2016

Übersicht der Frameworks zum Unit-Testing von PL/SQL Programmen.

Name Licence Teststyle

utPLSQL GPL StoredProceduresQuestcodetester proprietary declarativePL/Unit proprietary PL/SQLpackagesPLUTO– PL/SQLUnitTestingforOracle ArtisticLicense/GPL PL/SQLclassesruby-plsql-spec free RubyDSLDBFit GPL functionalspecifikationDBUnit LesserGPL Java/XMLSQLDeveloper proprietary Wizards,SQL

Page 11: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Testing

"if Jenkins Oraclet“11 09.09.2016

Übersicht der Frameworks zum Unit-Testing von PL/SQL Programmen.

Name Licence Teststyle

utPLSQL GPL StoredProceduresQuestcodetester proprietary declarativePL/Unit proprietary PL/SQLpackagesPLUTO– PL/SQLUnitTestingforOracle ArtisticLicense/GPL PL/SQLclassesruby-plsql-spec free RubyDSLDBFit GPL functionalspecifikationDBUnit LesserGPL Java/XMLSQLDeveloper proprietary Wizards,SQL

Page 12: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Testing

"if Jenkins Oraclet“12 09.09.2016

Warum Unit-Tests mit dem SQL-Developer?

Framework integriert im SQL-Developer

Proprietäres Datenbank Repository

Eigenes Datenbank Schema

Wizards zum Erstellen der Tests

Nutzung von Libraries

Starten der Unit-Tests über die Konsole

Import/Export Funktionalität

Page 13: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Testing

"if Jenkins Oraclet“13 09.09.2016

Page 14: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

sdcli64 Commandline Tool

Start der Unit-Test mittels Commandline

Unit-Testing

"if Jenkins Oraclet“14 09.09.2016

Page 15: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

"if Jenkins Oraclet“15 09.09.2016

CI mit Jenkins

Page 16: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

CI mit Jenkins

"if Jenkins Oraclet“16 09.09.2016

Jenkins ist ein erweiterbares, webbasiertes Software-System für die kontinuierlichen Integration von Komponenten zu einem Anwendungsprogramm.

Freier und offener CI-Server

Läuft in beliebigen Java Servlet-Containern

Wird mit Servlet-Middleware Winstone ausgeliefert

Multi-Plattform / Multi-Technologie

– Java, PHP, Groovy, Ruby, …

Vernetzte CI-Server um Tests zu parallelisieren

Vielseitige Integrationsmöglichkeiten

Page 17: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

CI mit Jenkins

"if Jenkins Oraclet“17 09.09.2016

Jenkins ist ein erweiterbares, webbasiertes Software-System zur kontinuierlichen Integration von Komponenten zu einem Anwendungsprogramm.

Durch Plugins beliebig erweiterbar

REST-basierte Programmierschnittstelle

Unterstützung verschiedener Build-Tools

– Apache Ant, Maven oder Gradle ...

Anbindung an Versionsverwaltungssysteme wie CVS, TFS oder Subversion

Page 18: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

CI mit Jenkins

"if Jenkins Oraclet“18 09.09.2016

Historie

Artefakte

TestergebnisseTrends

Page 19: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

"if Jenkins Oraclet“19 09.09.2016

Unit-Tests mit Jenkins

Page 20: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Tests mit Jenkins

"if Jenkins Oraclet“20 09.09.2016

Änderung im RepositoryManuelles AuslösenZeitlich gesteuerter Build

Auslöser Check Out Build Post-BuildAktionen

Page 21: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Test mit Jenkins

"if Jenkins Oraclet“21 09.09.2016

Inhalte aus SVN / TFS /… ziehen

Auslöser Check Out Build Post-BuildAktionen

Page 22: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Test mit Jenkins

"if Jenkins Oraclet“22 09.09.2016

Unit-Test startenShellscript starten…

Auslöser Check Out Build Post-BuildAktionen

Page 23: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Test mit Jenkins

"if Jenkins Oraclet“23 09.09.2016

Auslöser Check Out Build Post-BuildAktionen

E-Mail(s) versendenJUnit Testergebnisse anzeigen…

Page 24: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Unit-Test mit Jenkins

"if Jenkins Oraclet“24 09.09.2016

Page 25: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

"if Jenkins Oraclet“25 09.09.2016

Fazit

Page 26: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Fazit

"if Jenkins Oraclet“26 09.09.2016

Welche Vorteile ergeben sich aus dem Vorgehen?

Höhere Transparenz und Sichtbarkeit

Automatisches Ausführen der Unit-Tests

Höhere Akzeptanz der Unit-Tests

Page 27: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Fazit

"if Jenkins Oraclet“27 09.09.2016

Welche Vorteile ergeben sich aus dem Vorgehen?

Sehr frühzeitiges entdecken der Fehler

Integrations-Probleme werden nicht erst kurz vor einem Meilenstein gefunden

Dokumentation

Leichteres Refactoring

Höhere Qualität der Software

Page 28: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Fazit

"if Jenkins Oraclet“28 09.09.2016

Welche Nachteil ergeben sich aus de Vorgehen?

Ein weiteres System das gepflegt werden muss

In der Anfangsphase ein höherer Aufwand

Zusätzliche Methoden für Unit-Tests

Mehraufwand zur Sensibilisierung warum Unit-Tests notwendig sind

Page 29: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

"if Jenkins Oraclet“29 09.09.2016

https://jaxenter.de/continuous-delivery-jenkins-21451JenkinsJenkins WikipediaDocker Images inkl Oracle 12c und Jenkins

Page 30: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Martin RitschelSenior Consultant

Tel. +49 162 273 39 [email protected]

09.09.2016 "if Jenkins Oraclet“30

Page 31: Trivadis TechEvent 2016 A few thoughts on the subject Continuous integration and PLSQL in the Back-End development by Martin Ritschel

Session Feedback – now

TechEvent September 201631 09.09.2016

Please use the Trivadis Events Mobile App to give session feedback

Use "My schedule" if you registered for this session

Otherwise use "Agenda" and the search function

If the mobile App does not work (or if you have a Windows Phone) use your Mobile Browser

– URL: http://trivadis.quickmobileplatform.eu/

– Username: <your_loginname> (like svv)

– Password: sent by mail...