@DNNCon Don’t forget to include #DNNCon in your tweets! Effective Unit Testing for DNN James McKee Solutions Developer / Enterprise

Slides:



Advertisements
Similar presentations
Tools for Agile Development: A Developer’s Perspective Mike Linnen Blog:
Advertisements

Automated Testing but like For PowerShell Rob Reynolds.
Spring, Hibernate and Web Services 13 th September 2014.
T-FLEX DOCs PLM, Document and Workflow Management.
Arthur Fink Page 1 Thinking about User Interface Design for OpenEdge GUI for.NET (or any other environment) by Arthur Fink
Unit testing C# classes “If it isn’t tested it doesn’t work” Unit testing C# classes1.
SMSS offers the LOWEST bulk sms costs in South Africa 3 Options to use SMSS: Option.1 Simply buy bulk sms messages from only 16c per sms (Depending on.
Unit Testing Tips and Tricks: Database Interaction Louis Thomas.
CZ Biz. Auto. System & Test-Driven Development Teoman Soygul (Sept 24, 2012).
By Bob Bunson  Simulation of software development project  Fictitious system from Concept to Code  Oriented around the.
TEST-DRIVEN DEVELOPMENT AND MVP Cory Foy and Michael Russo.
TDD,BDD and Unit Testing in Ruby
Sms vs. Normal Advertisements To place an AD in a newspaper ONCE will cost you anything between R500 to R15000 Your AD in a Newspaper with a circular of.
Presenter - Donn Felker.  Senior Consultant for Microsoft Gold Certified Partner- Statêra.  8 years of experience in developing and architecting enterprise.
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
Todd Snyder Development Team Lead Infragistics Experience Design Group.
6st ACS Workshop UTFSM ACS Course Component, Container, Lifecycle Management 6st ACS Workshop UTFSM, Valparaiso, Chile H. Sommer, G. Chiozzi.
(Building the Presentation Layer - KISS). Figuring out what to do! Every skill that we have was not learnt over night and certainly not without proper.
Sustainable SharePoint 2010 Customizations By Bill Keys.
A337 File Design Computerized and Manual Systems 11/10/2009.
Scheduling Java Objects Using the SDK Matthias Nott, Business Objects.
Clear Lines Consulting · clear-lines.comSilicon Valley Code Camp 2008 · Nov 8, 2008 · 1 Test-Driven Development An introduction for C# developers.
Test Driven Development Arrange, Act, Assert… Awesome Jason Offutt Software Engineer Central Christian Church
SQL Server User Group Meeting Reporting Services Tips & Tricks Presented by Jason Buck of Custom Business Solutions.
Sage ACT! 2013 SDK Update Brian P. Mowka March 23, 2012 Template date: October 2010.
(Building the Presentation Layer - KISS). Figuring out what to do! Every was not learnt over night and certainly not without proper help and support.
Dependency Injection Technion – Institute of Technology Author: Gal Lalouche - Technion 2015 ©
The Enterprise Project Management (EPM) Professional March 28th, 2007 Brendan Giles, BSc., PMP, MOS, MCP (EPM) The Key to Successful Adoption of Enterprise.
2012 Agile Conference. Introduction Background Examining a case study of a project that was filled with dead code and how a team turned it around. This.
Using Mock Objects with Test Driven Development Justin Kohlhepp
Refactoring & Testability. Testing in OOP programming No life in flexible methodologies and for refactoring- infected developers without SOME kind of.
Project Deliverables CEN Engineering of Software 2.
Foreign language in my future career.
Lecture 4 Page 1 CS 111 Online Modularity and Virtualization CS 111 On-Line MS Program Operating Systems Peter Reiher.
Test Driven Development Introduction Issued date: 8/29/2007 Author: Nguyen Phuc Hai.
#SPSSAN June 30, 2012 San Diego Convention Center WRITING TESTABLE CODE In SharePoint.
Design Pattern Support based on principles of model driven development Zihao Zhao.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
Northwest Arkansas.Net User Group Jay Smith Tyson Foods, Inc. Unit Testing nUnit, nUnitAsp, nUnitForms.
Beginning Software Craftsmanship Brendan Enrick Steve Smith
Custom Developer Testing Frameworks – A Practical Approach Yuval Mazor, Sela
Spring Training Attune University Attune University.
Benjamin Unit Testing & Test-Driven Development for Mere Mortals.
Azure ML in SSIS An introduction to Azure Machine Learning Through the eyes of an SSIS developer David Söderlund – SolidQ Nordic
Enterprise Library 3.0 Memi Lavi Solution Architect Microsoft Consulting Services Guy Burstein Senior Consultant Advantech – Microsoft Division.
Beyond Basic Unit Testing: Mocks, Stubs, User Interfaces, and Refactoring for Testability Benjamin Day
Should you use the Microsoft Project CA PPM Connector
Unit Testing - solid fundamentals
Test-driven development
Continuous Integration (CI)
Getting Started on The Project Bank in Visual Studio
PLM, Document and Workflow Management
Test Driven Development
MISSION POSSIBLE:  Migrating to Oracle’s Planning and Budgeting Cloud Service Bob Usset, EPM Manager © 2016 eCapital Advisors, LLC.
Unit Testing & Test-Driven Development for Mere Mortals
Enterprise Content Management, Shared Services, & Contract Management
Unit testing C# classes
Smoke and Mirrors Prototype
Unit Testing & Test-Driven Development for Mere Mortals
Visual Studio 2005 “Personalized productivity”
Introduction to Software Testing
Present by Andie Saizan, MCP
Why Object-oriented Programming?
Smoke and Mirrors Prototype
DAT381 Team Development with SQL Server 2005
Unit Testing & Test-Driven Development for Mere Mortals
Developing and testing enterprise Java applications
Designing For Testability
Mark Quirk Head of Technology Developer & Platform Group
T-FLEX DOCs PLM, Document and Workflow Management.
Presentation transcript:

@DNNCon Don’t forget to include #DNNCon in your tweets! Effective Unit Testing for DNN James McKee Solutions Developer / Enterprise

@DNNCon Don’t forget to include #DNNCon in your tweets! THANKS TO ALL OF OUR GENEROUS SPONSORS!

@DNNCon Don’t forget to include #DNNCon in your tweets! Almost 10 years working.NET Consultant 7 years 7 Companies in the Fortune total in the Fortune 500 Currently with BlueBolt Solutions Enterprise Architect for Bravo-Squared Software Run Punk-Coder.com New to the DNN Scene About Me

@DNNCon Don’t forget to include #DNNCon in your tweets! So to gauge the audience: Know what unit tests are? Realize that unit tests are something that you write not something you do? Think that they are a great idea but something that you don’t have time for? Questions

@DNNCon Don’t forget to include #DNNCon in your tweets! Unit Tests are hard Unit Tests are for people who don’t know how to program. My project isn’t big enough to need unit tests. I’m the only one working on my project. My client doesn’t pay for unit tests. We are on a compressed time line, we don’t have time for unit tests. Reasons People Don’t Unit Test

@DNNCon Don’t forget to include #DNNCon in your tweets! Why Unit Testing is Important More Infromation:

@DNNCon Don’t forget to include #DNNCon in your tweets! Unit Test as a function of code Unit Test vs. Functional Test What is a unit test?

@DNNCon Don’t forget to include #DNNCon in your tweets! This is a Unit Test

@DNNCon Don’t forget to include #DNNCon in your tweets! DEMO ! (HELLO WORLD!)

@DNNCon Don’t forget to include #DNNCon in your tweets! Major implementations should interact through the veil of an interface. Programming to an interface improves modularity. It encourages looser coupling. Mocking classes can get complicated. It’s just good design! Interface based programming

@DNNCon Don’t forget to include #DNNCon in your tweets! An artificial object that mimics the behavior of a complicated class for the purpose of simplifying testing. Example: You would mock the following in your tests: Database Calls File System Calls Web Service Calls Mocks

@DNNCon Don’t forget to include #DNNCon in your tweets! Many of the interaction points for modules and scheduled tasks are complicated and do not supply Interfaces. Functionality such as database access requires instantiation of classes originating from DNN. Unit Testing in DNN

@DNNCon Don’t forget to include #DNNCon in your tweets! Ninject is a lightweight, full featured IoC container for use with dependency injection. Open Source Available at Ninject to the Rescue

@DNNCon Don’t forget to include #DNNCon in your tweets! To make the application more testable we will create 2 Standard Kernels that will be responsible for filling dependencies: In production code we will use the real kernel In testing we will use the testing kernel to return mock objects. In scheduled tasks this will be inserted at the beginning of custom code. In views the presenter will be instantiated from Kernel Building Interfaces at Boundaries

@DNNCon Don’t forget to include #DNNCon in your tweets! Because of state some objects don’t work well with direct instantiation. DataContext is a good example. Reusing a data context for multiple calls can result in a time out, that leads to exception, which leads to GC. To avoid this create factory classes that produce instance classes. Building Factories for Instance Objects

@DNNCon Don’t forget to include #DNNCon in your tweets! Demo! The Skeleton

@DNNCon Don’t forget to include #DNNCon in your tweets! NUnit xUnit, spiritual successor to NUnit MBUnit Visual Studio Built-In Suffers from problems related testing x86/x64 in the same project. Integrates well with performance testing and can use unit tests for load testing Unit Testing Frameworks and Tools

@DNNCon Don’t forget to include #DNNCon in your tweets! Build automation Code Coverage Performance testing Where to go from here

@DNNCon Don’t forget to include #DNNCon in your tweets! When it comes to unit testing, there is a very fine line between code reuse and masking issues. If possible write your code as test driven, this will produce leaner code. Aim for the 90% mark, but 80% is the accepted boundary. Use asserts carefully, make sure that what you are asserting is the actual correct behavior. Best Practices

@DNNCon Don’t forget to include #DNNCon in your tweets! work: Contact Me