Slides zu meinem Talk bei der W-JAX 2015 in München zu Qualitätssicherungsmaßnahmen bei Continuous Delivery.
Umfangreiche Qualitätssicherungsmaßnahmen und die Definition von Quality-Gates im Rahmen von Continuous Integration sind der eigentliche Enabler für Continous Delivery. Doch welche Tests sollte man eigentlich auf welcher Umgebung vorsehen und welche Werkzeuge bieten die entsprechende Unterstützung? Dieser Vortrag vermittelt einen Überblick über relevante Qualitätssicherungsmaßnahmen für Java-Web-Anwendungen und Webservices. Die Aktivitäten zur Unterstützung der ISO 25010 werden beleuchtet, sowie der gesamte Aspekt auch im Kontext traditioneller Vorgehensweisen. Es werden konkrete Open-Source-Tools und Auswertungsmöglichkeiten vorgestellt und die Integration in den Build-Prozess erläutert.
26. Given <condition> When <action> Then <result>
public class BookSearchSteps {
Library library = new Library();
List<Book> result = new ArrayList<>();
@Given(".+book with the title '(.+)', published in (.+)")
public void addNewBook(final String title, @Format("dd MMMMM yyyy"), final
Date published) {
Book book = new Book(title, published);
library.addBook(book);
}
@When("^the customer searches for books published between (d+) and
(d+)$")
public void setSearchParameters(@Format("yyyy") final Date from,
@Format("yyyy") final Date to) {
result = library.findBooks(from, to);
}
@Then("Book (d+) should have the title '(.+)'$")
public void verifyBookAtPosition(final int position, final String title) {
assertThat(result.get(position - 1).getTitle(), equalTo(title));
}
}
04.11.2015 www.kitenco.de
27. Given <condition> When <action> Then <result>
public class BookSearchSteps {
Library library = new Library();
List<Book> result = new ArrayList<>();
@Given(".+book with the title '(.+)', published in (.+)")
public void addNewBook(final String title, @Format("dd MMMMM yyyy"), final
Date published) {
Book book = new Book(title, published);
library.addBook(book);
}
@When("^the customer searches for books published between (d+) and
(d+)$")
public void setSearchParameters(@Format("yyyy") final Date from,
@Format("yyyy") final Date to) {
result = library.findBooks(from, to);
}
@Then("Book (d+) should have the title '(.+)'$")
public void verifyBookAtPosition(final int position, final String title) {
assertThat(result.get(position - 1).getTitle(), equalTo(title));
}
}
Feature: Book search
To allow a customer to find his favourite books quickly, the library must offer multiple
ways to search for a book.
Scenario: Search books by publication year
Given a book with the title 'One good book', published in 14 March 2013
And another book with the title 'Some other book', published in 23 August 2014
And another book with the title 'How to cook a dino', published in 01 January 2012
When the customer searches for books published between 2013 and 2014
Then 2 books should have been found
And Book 1 should have the title 'Some other book'
And Book 2 should have the title 'One good book'
04.11.2015 www.kitenco.de
32. Selenium, Xebium, FitNesse
Pro:
Keine Programmierung
notwendig
Unterstützt Specification by
Example
Gut für Data-Driven-Tests
Contra:
Anwendung muss schon
existieren (somit kein TDD)
Noch ein Tool und noch ein
Tool
04.11.2015 www.kitenco.de
57. Quality-Gates
ZAP: über Plugin
FindSecurityBugs: nur innerhalb von FindBugs
Datenschutz: All or nothing
JMeter: über Jenkins-Performance-Plugin
soapUI: innerhalb der TestSuiten
Gatling: innerhalb der Simulation
YSlow: über Aufruf-Parameter
04.11.2015 www.kitenco.de
58. ISO meets Pre-Production
Sicherheit
Security-Tests
Zuverlässigkeit und Effizienz
Last- und Performance-Tests
Übertragbarkeit
Unterschiedliche Browser in diversen Versionen
Installierbarkeit
Durch Deployment auf mehreren Umgebungen
sichergestellt
04.11.2015 www.kitenco.de
59. Produktion
Smoke Tests
z.B. anhand eines kleinen Sets aus
Regressionstests
z.B. Prüfungen, ob Verbindungen existieren
anhand von ping-Skripten
04.11.2015 www.kitenco.de
60. Build Lauf
BUILD SUCCESSFUL
Total time: 1 minute 51 seconds
[CHECKSTYLE] Collecting checkstyle analysis files...
[CHECKSTYLE] Successfully parsed file
c:dev.jenkinsjobsTestworkspacekitencotrunkAnwendung1checkstyle_reportsc
heckstyle_report.xml of module checkstyle_reports with 11 warnings.
[FINDBUGS] Collecting findbugs analysis files...
[FINDBUGS] Successfully parsed file
c:dev.jenkinsjobsTestworkspacekitencotrunkAnwendung1findbugs_reportsres
ult.xml of module findbugs_reports with 321 warnings.
Performance: Percentage of errors greater or equal than 25% sets the build as
unstable
Performance: Percentage of errors greater or equal than 50% sets the build as
failure
Performance: Recording JMeter reports 'kitenco/trunk/Anwendung1/perf_test/*.xml'
Performance: Parsing JMeter report file result.xml
Performance: File result.xml reported 25.0% of errors during the tests. Build
status is: UNSTABLE
Finished: UNSTABLE
04.11.2015 www.kitenco.de
62. Nur für agile Teams?
• Es geht nicht nur um die Entwicklungsabteilung!
• Fachbereiche nicht immer ad hoc verfügbar!
• Systemadministratoren gibt es nicht im Überfluss!
04.11.2015 www.kitenco.de
63. Nur für agile Teams?
• Wichtig ist ein automatisierter Prozess!
• Pipeline kann auch nur alle 3 Monate durchlaufen
werden!
• Bei outgesourcter Entwicklung startet die Pipeline
einfach an anderer Stelle
04.11.2015 www.kitenco.de
64. Fazit & Ausblick
Automatisierung bringt enorme Vorteile
Quality-Gates sind ein enabler für Continuous Delivery
Die hier vorgestellten Maßnahmen sind mit wenig
Aufwand einsetzbar
Tool-Chain ist erweiterbar
Auch für klassische Projekte sinnvoll
Gute Tools für Architektur-Prüfungen fehlen noch
04.11.2015 www.kitenco.de
65. Noch Fragen?
Ausführlicher Artikel dazu in Objektspektrum
3/2015 und 5/2015 erschienen
info@kitenco.de - @kitenco1
Vielen Dank!
04.11.2015 www.kitenco.de