Code Quality Assurance. Peter Kofler, Code Cop FH Technikum Wien, February 2010



Similar documents
Java Software Quality Tools and techniques

Software Construction

Continuous Integration in Kieker

Improving Software Quality with the Continuous Integration Server Hudson. Dr. Ullrich Hafner Avaloq Evolution AG 8911

Build management & Continuous integration. with Maven & Hudson

Testing: Python, Java, Groovy, etc.

Two-Way Data Binding with WinJS By Marcin Kawalerowicz and Craig Berntson, authors of Continuous Integration in.net

Fail early, fail often, succeed sooner!

Test-Driven Development

Continuous Integration with Jenkins. Coaching of Programming Teams (EDA270) J. Hembrink and P-G. Stenberg [dt08jh8

Test Driven Development Part III: Continuous Integration Venkat Subramaniam

We ( have extensive experience in enterprise and system architectures, system engineering, project management, and

Good Software. Lecture 6 GSL Peru 2014

Continuous Delivery. Alejandro Ruiz

Test Driven Development with Continuous Integration: A Literature Review

Continuous Integration

Agile.NET Development Test-driven Development using NUnit

Continuous Integration Multi-Stage Builds for Quality Assurance

Advanced Software Testing

Effektiver Tool-Einsatz

Continuous Integration: Improving Software Quality and Reducing Risk. Preetam Palwe Aftek Limited

Delivering Quality Software with Continuous Integration

Practicing Continuous Delivery using Hudson. Winston Prakash Oracle Corporation

Software infrastructure for Java development projects

TeamCity A Professional Solution for Delivering Quality Software, on Time

Agile Software Development and Service Science

Testing and Quality in Agile Development Speaker: Allan Watty Company: ABB Inc Website:

JUnit. Introduction to Unit Testing in Java

Continuous Integration Northwestern University. Evanston, Illinois November The Business of IT

Gallio: Crafting a Toolchain. Jeff Brown jeff.brown@gmail.com

How To Write Unit Tests In A Continuous Integration

Continuous. Integration. in.net MARGIN KAWALEROWICZ CRAIG BERNTSON MANNING. Greenwich. (74 w. long.)

Continuous Delivery. Ariel Alonso, IPC

Making Test Automation Work in Agile Projects

Continuous Integration (CI)

Continuous Integration

Coding in Industry. David Berry Director of Engineering Qualcomm Cambridge Ltd

Agile Software Development and Service Science

Continuous Integration For Fusion Middleware

Open Source Tools. The Magazine for Professional Testers. December 2010

Nick Ashley TOOLS. The following table lists some additional and possibly more unusual tools used in this paper.

The 3C Approach for Agile Quality Assurance Continuous Integration, Continuous Measurement, Continuous Improvement

Upping the game. Improving your software development process

Introducing Continuous Integration

Case Studies of Free Test Tools Successful Test Tool Use without a Big Budget

Massively! Continuous Integration! A case study for Jenkins at cloud-scale

Implementing Continuous Integration Testing Prepared by:

Continuous Integration with CruiseControl.Net

Continuous Integration

GECKO Software. Introducing FACTORY SCHEMES. Adaptable software factory Patterns

Software Engineering I (02161)

Software Development Tools

Continuous Integration on System z

}w!"#$%&'()+,-./012345<ya

Effective feedback from quality tools during development

Architecture Rules Enforcement and Governance Using Aspects

Continuous integration for databases using

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

STUDY AND ANALYSIS OF AUTOMATION TESTING TECHNIQUES

Test-Driven Development and Unit Testing with Parasoft Concerto

Continuous Prevention Testing

Hudson Continous Integration Server. Stefan Saasen,

Beginner s guide to continuous integration. Gilles QUERRET Riverside Software

Leveraging Rational Team Concert's build capabilities for Continuous Integration

Automated Testing Options for PL/SQL Steven Feuerstein PL/SQL Evangelist, Quest Software

Jenkins: The Definitive Guide

BEST WEB PROGRAMMING LANGUAGES TO LEARN ON YOUR OWN TIME

Realizing Continuous Performance Management

@tobiastrelle. codecentric AG 1

Software Continuous Integration & Delivery

Fully Leverage Agile Test Automation Technical Success and Return on Investment

SOFTWARE DEVELOPMENT BASICS SED

Towards Software Configuration Management for Test-Driven Development

A Hundred Days of Continuous Integration

Continuous integration for databases using Redgate tools

Automation using Selenium

CSE 70: Software Development Pipeline Version Control with Subversion, Continuous Integration with Bamboo, Issue Tracking with Jira

<Insert Picture Here> What's New in NetBeans IDE 7.2

EXHIBIT L. Application Development Processes

Continuous Integration For Real: The Perforce Java Platform. Hamish Reid Perforce Software Inc.

Transcription:

Code Quality Assurance Peter Kofler, Code Cop FH Technikum Wien, February 2010

2

Peter Kofler Ph.D. (Appl. Math.) Professional Software Developer for 11 years Lead Developer at System One fanatic about code quality 3

4

Zero-Defect Mindset (MSF) 5

6

7

8

Robert C. Martin ( Uncle Bob ) 9

10

Software Craftsmanship 11

Craftsmanship Over Crap 12

The Prime Factors Kata 13

The Requirements. Write a class named PrimeFactors that has one static method: generate. The generate method takes an integer argument and returns a List<Integer>. That list contains the prime factors in numerical sequence. http://butunclebob.com/articles.unclebob.theprimefactorskata 14

Demo 15

Keep the bar green to keep the code clean 16

Unit Testing test individual units isolate each part show that the individual parts are correct regression testing sort of living documentation executed within a framework http://en.wikipedia.org/wiki/unit_testing 17

xunit Frameworks e.g. Smalltalk - SUnit Java - JUnit, TestNG.NET - NUnit, Typemock C++ - CppUTest Groovy, PHP, Python, Ruby, Scala, etc. http://en.wikipedia.org/wiki/list_of_unit_testing_frameworks 18

TESTING I FIND YOUR LACK OF TESTS DISTURBING. 19

Test-Driven Development add a test run all tests and see if the new one fails write some code run all tests and see them succeed refactor code Red Green Refactor http://en.wikipedia.org/wiki/test_driven_development 20

The Three Laws of TDD You are not allowed to write any production code unless to make a failing unit test pass. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures. You are not allowed to write any more production code than is sufficient to pass the one failing unit test. http://butunclebob.com/articles.unclebob.thethreerulesoftdd 21

A minute ago all their code worked! 22

23

24

Testing is a mindset. 25

You have to want it. 26

27

Code Coverage comprehensiveness of tests 28

Beware! comprehensiveness quality! 29

Some Code Coverage Tools Java - EMMA, Cobertura, Clover.NET - NCover, PartCover C++ - Covtool, gcov Ruby - rcov commercial products 30

Demo 31

Demo 32

33

Daily/Nightly Builds 34

Continuous Integration 35

Continuous Integration Maintain a code repository Automate the build Make the build self-testing Everyone commits every day Every commit should be built Keep the build fast Everyone can see the results of the build http://en.wikipedia.org/wiki/continuous_integration 36

Immediate Feedback & Early Warning 37

38

Some CI Servers Java - CruiseControl, Hudson.NET - CruiseControl.NET, Hudson (NAnt) C++ - Hudson (Shell/Make) Ruby - CruiseControl.rb commercial products - TeamCity, ALA 39

Book Continuous Integration (Paul Duvall) 40

Good Enough? 41

Demo 42

43

Check What? Lexical analysis naming, coding conventions, design idioms Flow/path analysis null-pointer, dead code (conditional) Dependency analysis architectural/design flaws Verification mathematical proof of correctness 44

Some Static Analysis Tools Java - Checkstyle, Findbugs, PMD.NET - FxCop, (ReSharper, NDepend) C++ - (Sp)Lint Ruby - Roodi, Dust, Flog, Saikuro commercial products 45

Good Enough? 46

Demo 47

Some Code Review Tools Your peer (Pair Programming) Your version control system Your IDE (e.g. ReviewClipse) commercial products 48

49

Thank You 50

http://www.code-cop.org/ 51

Links #1 Mindset http://codebetter.com/blogs/darrell.norton/archive/2003/12/03/4222.aspx (Zero-Defect Mindset) http://www.sqnz.org.nz/documents/shiphappens/software%20quality%20gr oup%20presentation_frame.htm (Zero-Defect Mindset) http://en.wikipedia.org/wiki/fixing_broken_windows http://pragprog.com/the-pragmatic-programmer http://en.wikipedia.org/wiki/robert_cecil_martin http://www.clean-code-developer.de/ http://en.wikipedia.org/wiki/software_craftsmanship Test http://butunclebob.com/articles.unclebob.theprimefactorskata http://en.wikipedia.org/wiki/kata_(programming) 52

Links #2 Test http://en.wikipedia.org/wiki/unit_testing http://en.wikipedia.org/wiki/xunit http://en.wikipedia.org/wiki/list_of_unit_testing_frameworks http://en.wikipedia.org/wiki/test_driven_development http://butunclebob.com/articles.unclebob.thethreerulesoftdd Code Coverage http://en.wikipedia.org/wiki/code_coverage http://www.ibm.com/developerworks/java/library/j-cq01316/ Continuous Integration http://hudson-ci.org/ http://www.codinghorror.com/blog/archives/000818.html 53

Links #3 Continuous Integration http://www.stevemcconnell.com/ieeesoftware/bp04.htm http://www.joelonsoftware.com/articles/fog0000000023.html http://en.wikipedia.org/wiki/continuous_integration Static Code Analysis http://en.wikipedia.org/wiki/static_code_analysis http://en.wikipedia.org/wiki/list_of_tools_for_static_code_analysis Code Review http://en.wikipedia.org/wiki/code_review http://en.wikipedia.org/wiki/pair_programming 54

Images spray face: http://www.flickr.com/photos/iangallagher/4115047191/ broken egg: http://www.flickr.com/photos/nickwheeleroz/2475011402/ windows: http://www.flickr.com/photos/sketchglass/4281424410/ red-green: http://www.flickr.com/photos/30830597@n08/3630649274/ Darth Vader: http://rubystammtisch.at/ Model http://www.flickr.com/photos/cabfablab/3855825945/ covered car: http://www.flickr.com/photos/paulk/3166328163/ works: http://www.codinghorror.com/blog/archives/000818.html Agnes: http://www.youbrokethebuild.com/ microscope: http://www.flickr.com/photos/gonzales2010/8632116/ code review: http://www.flickr.com/photos/seandreilinger/2326448445/ questions: http://www.flickr.com/photos/seandreilinger/2326448445/ 55