Continuous Integration/Testing and why you should assume every change breaks your code



Similar documents
ALERT installation setup

Version Control Your Jenkins Jobs with Jenkins Job Builder

Continuous Integration

Department of Veterans Affairs. Open Source Electronic Health Record (EHR) Services

DevShop. Drupal Infrastructure in a Box. Jon Pugh CEO, Founder ThinkDrop Consulting Brooklyn NY

Continuous Integration. Wellcome Trust Centre for Gene Regulation & Expression College of Life Sciences, University of Dundee Dundee, Scotland, UK

Pipeline Orchestration for Test Automation using Extended Buildbot Architecture

SUCCESFUL TESTING THE CONTINUOUS DELIVERY PROCESS

jenkins, drupal & testing automating every phing! miggle

Hudson Continous Integration Server. Stefan Saasen,

Jenkins: The Definitive Guide

Jenkins World Tour 2015 Santa Clara, CA, September 2-3

Part I Courses Syllabus

StriderCD Book. Release 1.4. Niall O Higgins

Dry Dock Documentation

DevOps Course Content

Fundamentals of LoadRunner 9.0 (2 Days)

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

Web Developer Toolkit for IBM Digital Experience

@jenkinsconf. Maintaining huge Jenkins clusters - Have we reached the limit of Jenkins?

Software configuration management

depl Documentation Release depl contributors

Continuous Delivery on AWS. Version 1.0 DO NOT DISTRIBUTE

Saruman Documentation

Automate Your BI Administration to Save Millions with Command Manager and System Manager

DevOps Stack. Reid Holmes. Chris Parnin:

LR120 LoadRunner 12.0 Essentials

Best Practices Report

Continuous Integration

Your eyes in the network

FLeSSR Usecase 1 - Multi Platform Software development

HP LoadRunner: Essentials 11

The care of open source creatures. Vincent Sanders

Software Assurance Marketplace Use Case

DRUPAL CONTINUOUS INTEGRATION. Part I - Introduction

Theorist HT Induc0on Course Lesson 1: Se6ng up your new computer (Mac OS X >= 10.6) As of 9/27/2012

Software Engineering

Platform as a Service and Container Clouds

My DevOps Journey by Billy Foss, Engineering Services Architect, CA Technologies

Magento OpenERP Integration Documentation

Source Control Systems

Jenkins Continuous Build System. Jesse Bowes CSCI-5828 Spring 2012

SUCCESFUL TESTING THE CONTINUOUS DELIVERY PROCESS

Software Configuration Management and Continuous Integration

Is This Your Pipe? Hijacking the Build Pipeline

LLVMLinux: Embracing the Dragon

CoDe:U Git Flow - a Continuous Delivery Approach

Linux VPS with cpanel. Getting Started Guide

2. Findings Summary. Resolved Issues

C Programming Review & Productivity Tools

Many projects, one code

Python Analysis / LATAnalysisScripts / Lightcurves / Fitting Issues

Informatica Data Director Performance

Registration and management system software available as open source

Continuous Integration for Snabb Switch

Introduc)on to Version Control with Git. Pradeep Sivakumar, PhD Sr. Computa5onal Specialist Research Compu5ng, NUIT

XpoLog Center Suite Log Management & Analysis platform

Software Continuous Integration & Delivery

ACCELERATE DEVOPS USING OPENSHIFT PAAS

White Paper Server. SUSE Linux Enterprise Server 12 Modules

Continuous Delivery for Alfresco Solutions. Satisfied customers and happy developers with!! Continuous Delivery!

Use of Continuous Integration Tools for Application Performance Monitoring

LR120 Load Runner 12.0 Essentials Instructor-Led Training Version 12.0

MDSplus Automated Build and Distribution System

Getting Started. UC Santa Barbara Setup public repository (GitHub, Bitbucket) Identify workflow:

MSP Center Plus Features Checklist

skosprovider_rdf Documentation

rpaf KTl Pen source Plone 3.3 Site Administration Manage your site like a Plone professional Alex Clark

Continuous Integration

Our Puppet Story. Martin Schütte. May

Automated Performance Testing of Desktop Applications

Seamless integration Connect our solution to your business applications thanks to our open architecture

Puppet Firewall Module and Landb Integration

Part I. OpenCIT Server

Anar Manafov, GSI Darmstadt. GSI Palaver,

Icinga and Puppet Dominik Schulz Head of Datacenter and Operations Magic Internet / MyVideo

Jonathan Worthington Scarborough Linux User Group

Successful PaaS and CI in the Cloud

Developing tests for the KVM autotest framework

LAVA Project Update. Paul Larson

Directions for VMware Ready Testing for Application Software

Ganglia & Nagios. Maciej Lasyk 11. Sesja Linuksowa Wrocław, /25. Maciej Lasyk, Ganglia & Nagios

OpenMake Dynamic DevOps Suite 7.5 Road Map. Feature review for Mojo, Meister, CloudBuilder and Deploy+

Version Control using Git and Github. Joseph Rivera

In depth study - Dev teams tooling

HPCC Monitoring and Reporting (Technical Preview) Boca Raton Documentation Team

Automating Business Processes Using SharePoint Designer

Continuous Integration and Delivery at NSIDC

A Pythonic Approach to Continuous Delivery

Mastering CMake. Sixth Edition. Bill Martin & Hoffman. Ken. Andy Cedilnik, David Cole, Marcus Hanwell, Julien Jomier, Brad King, Robert Maynard,

a new generation software test automation framework - CIVIM

Building a Continuous Integration Pipeline with Docker

Software Configuration Management Plan

Lumension Endpoint Management and Security Suite

Deposit Identification Utility and Visualization Tool

Software Requirement Specification for Web Based Integrated Development Environment. DEVCLOUD Web Based Integrated Development Environment.

Ansible in Depth WHITEPAPER. ansible.com

Data Centre Efficiency Management Concurrent Thinking Appliances

Introduction to DevOps on AWS

Zero-Touch Drupal Deployment

Transcription:

MÜNSTER Continuous Integration/Testing and why you should assume every change breaks your code René Milk 4th November 2015

MÜNSTER Continuous Integration/Testing 2 /16 Not talking about C functions Continuous completely automatic triggering (nightly on branch updates...) automatic reporting simple visualization wide accessibility metrics

MÜNSTER Continuous Integration/Testing 3 /16 No quadrature rules contained in this talk either Integration does your software stack still build after changes? compile run link work as a dependency for other software? how about on system X?

MÜNSTER Continuous Integration/Testing 4 /16 and ofc no weak solutions for PDEs Testing automated repeatable deterministic reliable Unit Testing System Testing Performance Testing

MÜNSTER Continuous Integration/Testing 5 /16 assume your every change breaks everybody s code saves time no need to argue about possible effects of changes It s better to err on the side of caution. You will break code from time to time. software is modular codebases are huge dependency graphs are complex distributed development: multiple people branches features/fixes... http://whatever.scalzi.com/2010/06/16/the-failure-state-of-clever/

Tools for CI: Travis MÜNSTER Continuous Integration/Testing 6 /16 free for FOSS integrates with GitHub repositories explicitly supports C++ python ruby but if your test/software runs on a standard-ish Ubuntu 12.04 you re good triggers on branch push visual feedback in pull requests and badges very easy to create different configurations

Tools for CI: Travis MÜNSTER Continuous Integration/Testing 7 /16 language: python python: - "2.7" script: - DISPLAY=:99.0 py.test -k "${PYTEST_MARKER}" install: - python setup.py build_ext -i notifications: email: on_success: change on_failure: change after_success: - coveralls branches: except: - gh-pages

Tools for CI: Travis MÜNSTER Continuous Integration/Testing 8 /16 sudo: false language: cpp matrix: include: - os: linux compiler: gcc addons: &gcc49 apt: sources: [ ubuntu-toolchain-r-test ] packages: [ g++-4.9 gcc-4.9 ] env: CXX_COMPILER=g++-4.9 COMPILER=gcc-4.9 - os: linux compiler: gcc addons: *gcc49 env: CXX_COMPILER=g++-4.9 COMPILER=gcc-4.9 DELETE="dune-istl"

Tools for CI: Travis MÜNSTER Continuous Integration/Testing 9 /16

Tools for CI: Travis MÜNSTER Continuous Integration/Testing 10 /16

MÜNSTER Continuous Integration/Testing 11 /16 Tools for CI: Buildbot Python framework to build CI systems not a ready made solution Master/Slave setup good for testing complex stacks on diverse architectures much more freedom than on Travis at a much higher maintenance and setup cost

MÜNSTER Continuous Integration/Testing 12 /16 Tools for CI: Buildbot - Example setup to deploy new masters with only 5 LOC buildbot code for that to work is 2300 LOC git repository tracks individual DUNE-modulesŕepositories -> dynamic build steps -> make test result log tied into redmine email on buildstatus change filter by user in change

MÜNSTER Continuous Integration/Testing 13 /16 Tools for CI: Buildbot - Example (master config) from common import config passwords genconfig config.current_db = passwords.dune_db_url import redmine.db.connection redmine.db.connection.setup(config.current_db) BuildmasterConfig = genconfig.genconfig( "http://users.../dune-stuff-demos.git" project="dune-stuff" base_port=11020 use_cmake=true)

MÜNSTER Continuous Integration/Testing 14 /16 Tools for CI: Buildbot - Example (buildbot.opts) [clang_3.5] file = config.opts/clang-3.5 cc = clang-3.5 [gcc_5.0] file = config.opts/gcc-snapshot cc = gcc-snapshot [variants] # name = semicolon seperated list of directory names # to delete prior to buildbot config no_fem = dune-fem minimal = dune-grid;dune-localfunctions;dune-fem; dune-typetree;dune-pdelab;dune-istl

Buildbot MÜNSTER Continuous Integration/Testing 15 /16

Testing: What? MÜNSTER Continuous Integration/Testing 16 /16 utopic Every line of code is unit tested with function level granularity. System tests cover all possible software configurations and inputs. Performance testing is run on a wide variety of benchmark problems in a restricted possibly virtualized environment. All of that on a very diverse set of computer architectures operating systems support library versions. Not viable in the real world. Configuration space is just too big. Compute time and available hardware is limited. Test cycles need to be short to not impede development.

Continuous Integration/Testing 17 /16 Testing: What? realistic Every non-trivial piece of code is unit tested with algorithm level granularity. System tests cover the most common configuration options. Benchmark runs are recorded.

Continuous Integration/Testing 18 /16 Testing: What? minimal The code is run for a benchmark problem with known/analytic solution.

Continuous Integration/Testing 19 /16 Testing: How? Use a test harness: google-test Boost.Test py.test Simplifies selective test running result gathering behavior expectation Writing a DUNE module? Use dune-testtools for simple test parameterization record algorithm results error norms and compare in system tests Make sure exceptions get raised on invalid data input integrate into build system (ie make test)

Testing: How? - Gtest Example Continuous Integration/Testing 20 /16 typedef testing::types<yaspgrid<1> YaspGrid<4> Grids; template <class T> struct CornerRangeTest : public ::testing::test { CornerRangeTest() : grid_prv(0. 1. level) {} void check() { for (auto it : grid_prv.grid().leafgridview()) check_range(it cornerrange(it->geometry())); for (auto v : DSC::valueRange(T::dimensionworld)) EXPECT_GE(v 0); } }; TYPED_TEST_CASE(CornerRangeTest Grids); TYPED_TEST(CornerRangeTest Misc) { this->check(); }

Testing: What tests are allowed to fail Continuous Integration/Testing 21 /16 NONE except those where the platform requirements cannot be met

Testing: What else is there? Continuous Integration/Testing 22 /16 Using cmake? Make ctest submit test results to cdash

Continuous Integration/Testing 23 /16 Thank you for your attention. Slides available at http://work.milk.pm