Magnus

Slides:



Advertisements
Similar presentations
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Advertisements

Jeff Derstadt Senior Development Lead Microsoft Corporation Patterns & Architecture.
Transitioning to XP or The Fanciful Opinions of Don Wells.
Xtreme Programming. Software Life Cycle The activities that take place between the time software program is first conceived and the time it is finally.
Test Automation: An Architected Approach Dan Young March 17th, 2005
The Spring Framework: A brief introduction to Inversion of Control James Brundege
Intro to Spring CJUG - January What is Spring? “The Spring framework provides central transaction control of various objects.” This means that any.
Pattern Abstract Factory
UNIT-V The MVC architecture and Struts Framework.
© 2012 Autodesk Automated Testing with the AutoCAD ®.NET API Scott McFarlane Senior Software Engineer, Woolpert, Inc.
Chapter 7 Designing Classes. Class Design When we are developing a piece of software, we want to design the software We don’t want to just sit down and.
Presenter - Donn Felker.  Senior Consultant for Microsoft Gold Certified Partner- Statêra.  8 years of experience in developing and architecting enterprise.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
@benday #vslive Better Unit Tests through Design Patterns: Repository, Adapter, Mocks, and more… Benjamin
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
ASP.NET and Model View Control Jesper Tørresø ITNET2 F08.
Todd Snyder Development Team Lead Infragistics Experience Design Group.
An Introduction to Software Architecture
Modular Programming. Modular Programming (1/6) Modular programming  Goes hand-in-hand with stepwise refinement and incremental development  Makes the.
Abstract Factory Design Pattern making abstract things.
Test Driven Development Arrange, Act, Assert… Awesome Jason Offutt Software Engineer Central Christian Church
ICare Software Architecture Description: Principles, Decisions and Contradictions Team A Aggarwal Ashutosh Alungh Suman Appiah Stella Baddam Bhaskar Baghaie.
1 Some initial Design suggestions… Getting started… where to begin? Find out whether your design architecture will work… as soon as possible. If you need.
Command. RHS – SOC 2 Executing a command Executing a command appears simple at first, but many details to consider: –Who creates a command? –Who invokes.
Improving the Quality of Existing Code Svetlin Nakov Telerik Corporation
Refactoring for Testability (or how I learned to stop worrying and love failing tests) Presented by Aaron Evans.
1 Legacy Code From Feathers, Ch 2 Steve Chenoweth, RHIT Right – Your basic Legacy, from Subaru, starting at $ 20,295, 24 city, 32 highway.
Refactoring & Testability. Testing in OOP programming No life in flexible methodologies and for refactoring- infected developers without SOME kind of.
آرمان حسين‌زاده آذر  Access to data varies depending on the source of the data.  Access to persistent storage, such as to a database, varies greatly.
Using Test Driven Development Jon Kruger Blog: Twitter: JonKruger.
Test Stubs... getting the world under control. TDD of State Pattern To implement GammaTown requirements I CS, AUHenrik Bærbak Christensen2.
Software testing techniques Software testing techniques Software Testability Presentation on the seminar Kaunas University of Technology.
CS 350 – Software Design Expanding Our Horizons – Chapter 8 The traditional view of objects is that they are data with methods. Sometimes objects could.
1 Chapter 16 Component-Level Design. 2 Component-Level Design  the closest design activity to coding  the approach: review the design description for.
Dependency Injection Frameworks Technion – Institute of Technology Author: Assaf Israel - Technion 2013 ©
Or how to work smarter when building solutions.  2:30 – 3:30 Mondays – focus on problem solving (with some terminology thrown in upon occasion)  All.
Student Name USN NO Guide Name H.O.D Name Name Of The College & Dept.
11 Software Design CSCU 411 Software Engineering.
CSci 162 Lecture 8 Martin van Bommel. Large-scale Programming Up to now we have been writing relatively short programs to solve simple problem Want to.
Dependency Inversion By Steve Faurie. Dependency Inversion Described in Agile Principles, Patterns and Practices in C# by Robert C. Martin.
Multi-purpose tests (Cool tricks with JUnit) JavaZone 2012 Johannes Brodwall, Principal Architect Steria
Deriving Abstract Factory Loosening the coupling when creating objects...
C++ for Engineers and Scientists, Second Edition 1 Problem Solution and Software Development Software development procedure: method for solving problems.
Command. RHS – SWC 2 Executing a command Executing a command appears simple at first, but many details to consider: –Who creates a command? –Who invokes.
Dependency Injection with Guice Technion – Institute of Technology Author: Gal Lalouche - Technion 2016 ©
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
J. Snuverink and J. Pfingstner LinSim LinSim Linear Accelerator Simulation Framework with PLACET an GUINEA-PIG Jochem Snuverink Jürgen Pfingstner 16 th.
Design Engineering 1. Analysis  Design 2 Characteristics of good design 3 The design must implement all of the explicit requirements contained in the.
Unit Testing - solid fundamentals
Better Unit Tests through Design Patterns: Repository, Adapter, Mocks, and more… Benjamin
Pre-Coding Web Design – Sec 3-1
Designing For Testability
Presented by Igor Ivković
Chapter 13 Logical Architecture.
Intro to Spring CJUG - January 2013.
Component-Level Design
Chapter 13 Logical Architecture.
An Introduction to Software Architecture
Outline Chapter 2 (cont) OS Design OS structure
Implementing Security in ASP.NET Core: Claims, Patterns, and Policies
Software Design Principles
Designing For Testability
System calls….. C-program->POSIX call
Presented by Igor Ivković
Object Oriented Design & Analysis
Extending Interface Based Design
Dependency Injection Mechanism
Chapter 13 Logical Architecture.
Object Oriented Design
Notes on software design
Presentation transcript:

Magnus

What is testability? Repeatable - You should be able to expect the outcome for known inputs Easy to write Easy to understand Fast

Value of automated testing Reduce the time coding + debugging + testing Gives you better maintainability Quick feedback mechanism Tests as documentation

Comparison the ease of developing in one code base compared to another

Separation of Concerns Readability Less complexity Higher cohesion Lower coupling

Isolate the ugly stuff (infrastructure) Db-access Active Directory Web services Configuration files

Not isolated Service Layer Business Layer Data Layer

Interface Refers to a set of named operations that can be invoked by clients

public class OrderManager { public void ProcessOrder(Order order) { OrderRepository orderRepository = new OrderRepository(); orderRepository.ProcessOrder(order); } public class OrderManager { public void ProcessOrder(Order order) { IOrderRepository orderRepository = new OrderRepository(); orderRepository.ProcessOrder(order); } }

public void ProcessOrderAgainstService(Order order) { IOrderRepository orderRepository = new OrderService(); orderRepository.ProcessOrder(order); } public void ProcessOrder(Order order) { IOrderRepository orderRepository = new OrderRepository(); orderRepository.ProcessOrder(order); }

Dependency Injection (DI) Instead of a class creating its own dependencies, its dependencies are inserted into it.

Business Layer Data Layer Interface Data Layer Service Layer

Mocking Use mock object as placeholders for classes that don’t yet exist Don’t mock chatty interfaces Fake objects with return and pre-canned values

Small Tests Before Big Tests Small focused test will tell you where something is wrong Fast and accurate feedback loops Both big (end to end) and small test are important

The Gateway Pattern Encapsulate access to external services by encapsulating the implementation with interfaces Object that encapsulates external system

Questions

The big picture - Conclusion Testable system will change your design. There are times when a design decision is made only to enable testing Testability goes hand in hand with classical definition of good design - high cohesion, low coupling and separation of concerns Design for testability gives you maintainability