Finally, an agile test strategy (that works)! AS OW Test Model, Objectware



Similar documents
Software Construction

Introduction to Agile Software Development Process. Software Development Life Cycles

Delivering Quality Software with Continuous Integration

Continuous Integration (CI)

Jenkins User Conference Herzelia, July #jenkinsconf. Testing a Large Support Matrix Using Jenkins. Amir Kibbar HP

SOA-14: Continuous Integration in SOA Projects Andreas Gies

Continuous Integration

Improved Backward Compatibility and API Stability with Advanced Continuous Integration

Java EE 6 development with Eclipse, Netbeans, IntelliJ and GlassFish. Ludovic Champenois Oracle Corporation

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Java Software Quality Tools and techniques

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

SOA Solutions & Middleware Testing: White Paper

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

Continuous Integration

Effektiver Tool-Einsatz

Software Continuous Integration & Delivery

Software infrastructure for Java development projects

Test Driven Development Part III: Continuous Integration Venkat Subramaniam

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

Migrating Applications From IBM WebSphere to Apache Tomcat

Learning GlassFish for Tomcat Users

Maven the Beautiful City. Healthy, Viable, and Productive Build Infrastructures

Continuous Integration

Java course - IAG0040. Unit testing & Agile Software Development

What the heck is that bar over there?

Agile ALM. Lightweight tools and Agile strategies MANNING MICHAEL HUTTERMANN. Shelter Island

Testing Tools Content (Manual with Selenium) Levels of Testing

Win at Life. with Unit Testing. by Mark Story

Glassbox: Open Source and Automated Application Troubleshooting. Ron Bodkin Glassbox Project Leader

NXTware Remote. Advanced Development and Maintenance Environment for OpenVMS and other Strategic Platforms

GECKO Software. Introducing FACTORY SCHEMES. Adaptable software factory Patterns

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

GLOBAL CONSULTING SERVICES TOOLS FOR WEBMETHODS Software AG. All rights reserved. For internal use only

SOFTWARE DEVELOPMENT BASICS SED

Maven or how to automate java builds, tests and version management with open source tools

WELCOME TO Open Source Enterprise Architecture

Continuous Integration The Full Monty Artifactory and Gradle. Yoav Landman & Frederic Simon

Software Development In the Cloud Cloud management and ALM

TeamCity A Professional Solution for Delivering Quality Software, on Time

Accelerate Software Delivery

<Insert Picture Here> Java EE 7. Linda DeMichiel Java EE Platform Lead

Meister Going Beyond Maven

Operations and Monitoring with Spring

How to Write AllSeen Alliance Self- Certification Test Cases September 25, 2014

Building a Modular Server Platform with OSGi. Dileepa Jayakody Software Engineer SSWSO2 Inc.

How Software Engineering Can Benefit from Traditional Industries Practical Experience Report ICSE 2012 Software Engineering in Practice Track

Continuous Integration Comes to China.

Test Driven Development with Continuous Integration: A Literature Review

Continuous Integration and Bamboo. Ryan Cutter CSCI Spring Semester

Przemysław Bielicki. Senior Software Developer / Scrum Master

High-Speed In-Memory Analytics over Hadoop and Hive Data

Architecture Rules Enforcement and Governance Using Aspects

Agilité des applications Java EE 6

How To Write Unit Tests In A Continuous Integration

Oracle im Open Source Kontext Abgrenzung GlassFish vs. JBoss und wozu noch WebLogic?

<Insert Picture Here> Introducing Hudson. Winston Prakash. Click to edit Master subtitle style

Continuous Integration

The Importance of Continuous Integration for Quality Assurance Teams

Upping the game. Improving your software development process

vs. Web Site: Blog: blog.soebes.com Dipl.Ing.(FH) Karl Heinz Marbaise

In depth study - Dev teams tooling

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

Designing an Enterprise Application Framework for Service-Oriented Architecture 1

Best Overall Use of Technology. Jaspersoft

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

ASSURING SOFTWARE QUALITY USING VISUAL STUDIO 2010

IBM WebSphere Server Administration

Agile Best Practices and Patterns for Success on an Agile Software development project.

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

JBS-102: Jboss Application Server Administration. Course Length: 4 days

Quality Cruising. Making Java Work for Erlang. Erik (Happi) Stenman

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

JAVA/J2EE DEVELOPER RESUME

Apache James: more than s in the cloud. Ioan Eugen Stan Berlin Buzzwords 2012

Continuous Integration

Boosting Agile Methodology with webmethods BPMS

Copyrighted , Address :- EH1-Infotech, SCF 69, Top Floor, Phase 3B-2, Sector 60, Mohali (Chandigarh),

Chapter 1: Web Services Testing and soapui

<Insert Picture Here> GlassFish v3 - A Taste of a Next Generation Application Server

Best Practices for Java Projects Horst Rechner

Agile Architecture & Design

Converting Java EE Applications into OSGi Applications

ICAgile Learning Roadmap Agile Testing Track

Best Practice SOA goes Eclipse

Collaborative Software Development

Nexus Professional Whitepaper. Repository Management: Stages of Adoption

Servers. Servers. NAT Public Subnet: /20. Internet Gateway. VPC Gateway VPC: /16

Content. Development Tools 2(63)

Avaya Aura Orchestration Designer

Migration and Disaster Recovery Underground in the NEC / Iron Mountain National Data Center with the RackWare Management Module

Introduction to Sun ONE Application Server 7

How To Develop A Web Service In A Microsoft J2Ee (Java) 2.5 (Oracle) 2-Year Old (Orcient) 2Dj (Oracles) 2E (Orca) 2Gj (J

Introduction to Programming Tools. Anjana & Shankar September,2010

Pipeline Orchestration for Test Automation using Extended Buildbot Architecture

Nanda Kishor K N. nandakishorkn@gmail.com

Accelerate Software Delivery with Continuous Integration and Testing. JaSST 08 Tokyo. Jeffrey Fredrick Agitar Software,

Benefits of Test Automation for Agile Testing

WHITEPAPER. Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. Principle #1, Agile Manifesto

Transcription:

Finally, an agile test strategy (that works)! AS OW Test Model, Objectware

Who is Erik Drolshammer? Consultant Objectware AS erik.drolshammer@objectware.no Master in Computer Science from NTNU Master thesis Improved Backward Compatibility and API Stability with Advanced Continuous Integration

Who is Bård Lind? Senior consultant Objectware AS bard.lind@objectware.no Finance industry Operations Java since 1997 Contributor to Objectware s SOA/EA R&D team

Agenda 1. Background and problem description 2. OW Test Model 3. Implementation 4. Summary

Background Complex project; Many remote services within the project Integration with multiple external systems JMS OSWorkflow Webstart C, C++, Java 1.5, Java 6 Solaris, Linux, OSX, Windows Performance critical data processing

Problem description What is an integration test? What is a system test? How to decide which definition of a term to use? How to synchronize the terminology in the company? Across projects? Communication with the customer? With project manager? Agile and TDD versus the V-model When to run the different types of integration tests? Before check in to the version control system? Run by CI server? Manual test? Automatic test? What must be tested in an expensive environment? Can it be done in a cheaper way? File structure for tests how to decide?

Problem description What is an integration test? What is a system test? How to decide which definition of a term to use? How to synchronize the terminology in the company? Across projects? Communication with the customer? With project manager? Agile and TDD versus the V-model When to run the different types of integration tests? Before check in to the version control system? Run by CI server? Manual test? Automatic test? What must be tested in an expensive environment? Can it be done in a cheaper way? File structure for tests how to decide?

Symptoms Complex project => - Hard to discuss tests - Hard to write tests - Hard to maintain tests - Hard to change code - Hard to run tests Hard to test => hard to do employ TDD properly

The V-model is not adequate What we often see: enormous unit tests too few integration tests many broken integration tests integration tests are run to seldom hard to write system tests System tests are too fragile Source: http://en.wikipedia.org/wiki/image:v-model.jpg

OW Test Model

OW Test Model Goal make it easier to test complex projects How pragmatic approach, support agile work patterns Authors Bård Lind and Erik Drolshammer

Test categorization

Terminology + Unit tests (simple and well-defined) - Integration test <- too inprecise - Functional test <- too inprecise + Service test (it is a service oriented world) + System test

Tackle complexity #1 Single-responsibility principle: A classtest should have one, and only one, reason to change. SRP

Tackle complexity #2 Follow general OO practices also for test code, especially Separation of concerns High cohesion, low coupling

Tackle complexity #3 It is relevant whether a broken build is caused by bad input data or the latest change to the business logic. -> with or without data Tests that depend on external systems can be complex and expensive. -> without or without environment

Categorization matrix No data Data No environment Environment Unit test Service test System test

Other drivers Speed Cost Setup cost Test development cost Cost of running tests Minimize overlap between tests

Test categorization + Continuous Integration

CI Phases - when to run the different tests 1 - Before check-in to VCS 2 - Multiple times a day* 3 - Nightly 4 Weekly 5 System Release *(e.g. hourly or every second hour)

CI Phases - when to run the different tests 1 - Before check-in to VCS developer 2 - Multiple times a day* 3 - Nightly 4 Weekly 5 System Release CI server * (e.g. hourly or every second hour)

Categorization matrix with phases No data Data No environment Environment Unit test Fast (1-2) n/a Fast (1-2) n/a Service test Fast (1-4) Slow (2-4) Fast (1-4) Slow (2-4) System test Slow (3-5) Slow (3-5) Slow (3-5) Slow (3-5) NOTE! This is only an example.

Test categorization + Continuous Integration + Groups

Groups and CI phases Groups are used to filter which tests to run in each phase. One group for each external dependency One group for each data source or provider One group for very slow tests One error should (ideally) result in only one test failure.

Group example public class MyDatabaseTest { public void testsomesimplebusinesslogic() { } @Test(groups = { "database-oracle"}) public void testdatabasetransaction() { } }

Test Code Location Driver: Keep code and tests close. Location Unit test Service test System test Same module as code Separate module (possibly same module) Separate project (possible only a separate module)

Test categorization + Continuous Integration + Groups = OW Test Model

Test model extension points Test <-> requirement mapping Catalogue of test tactics/patterns Code coverage for tests in separate modules and projects

Test <-> requirement mapping One user story <-> one group of tests Difficult to set up mapping => low quality user stories TestNG groups can be used to display the mapping. BDoc?

Implementation

Prerequisites Continuous Integration (CI) server Version Control System Maven Artifact Repository

Prerequisites Continuous Integration (CI) server Version Control System Enterprise Maven Infrastructure Maven Artifact Repository

Implementation requirements Groups Dependencies between tests and groups of tests setup and teardown at test and group level Dependency injection Embedded, in-memory alternatives for heavyweight technologies

Implementation requirements Groups Dependencies between tests and groups of tests setup and teardown at test and group level TestNG Dependency injection Spring

Embedded, in-memory alternatives for heavyweight technologies JMS: ActiveMQ JTA: Atomikos, JOTM JPA: Spring EJB3: Spring Pitchfork JAX-WS: XFire Servlet container: Jetty Database: HSQLDB, Apache Derby

Software stack example Maven (release and surefire plugins are central) TestNG, EasyMock Spring 2.x, ActiveMQ, HSQLDB Continuum Artifactory Subversion

Benefits and summary

Observations Improved communication More tests, but fewer lines of test code. (Minimal overlap between tests.) Less responsibility per test Less time spent on writing tests

Developer Benefits High complexity becomes manageable Agile testing Iterative Test Driven Development Extensive use of Continuous Integration Open Source Software

Management Benefits Risk reduction Release at any time High complexity becomes manageable Iterative costs Cost reduction easier to find cause of bugs early detection of bugs and integration problems Improved quality More and better testing

Summary OW Test Model is AGILE! It works! Read more in community wiki http://wiki.community.objectware.no/display/smidigtonull/ow+test+model

Q & A

Resources Enterprise Maven Infrastructure http://wiki.community.objectware.no/display/smidigtonull/enterprise+maven+infrastructure Single-Responsibility Principle: http://www.objectmentor.com/resources/articles/srp.pdf Next Generation Java Testing: TestNG and Advanced Concepts: http://www.amazon.com/next-generation-java-testing-advanced/dp/0321503104 Manifesto for Agile Software Development: http://agilemanifesto.org/