Build Robust Web Apps in the Real WakeUpAndCode.com.

Slides:



Advertisements
Similar presentations
PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
Advertisements

Writing Unit Tests with Microsoft Fakes Copyright © Intertech, Inc Slide 1 Writing Unit Tests with Microsoft Fakes.
Design Principles & Patterns
Real world TDD + Dependency Injection Rob Fonseca-Ensor Datacom Systems.
The Future of Web WakeUpAndCode.com.
JUnit testing and Spring How to benefit from Spring support for jUnit during development.
Beginner - WakeUpAndCode.com.
Entity Framework Code First End to End
Jump-starting Your Startup with WakeUpAndCode.com Icons/graphics from: iconarchive.com.
@benday #vslive Better Unit Tests through Design Patterns: Repository, Adapter, Mocks, and more… Benjamin
Testing Web Services Unit Testing, Data Layer Testing, Web API Controllers Testing, Integration Testing Web Services & Cloud SoftUni Team testing Technical.
Windows Web Xbox Mobile … and WakeUpAndCode.com.
Company Confidential – Do Not Duplicate 2 Copyright 2008 McLane Advanced Technologies, LLC S.O.L.I.D. Software Development Achieving Object Oriented Principles,
Test Driven Development Arrange, Act, Assert… Awesome Jason Offutt Software Engineer Central Christian Church
@DNNCon Don’t forget to include #DNNCon in your tweets! Effective Unit Testing for DNN James McKee Solutions Developer / Enterprise
Analysis of SQL injection prevention using a filtering proxy server By: David Rowe Supervisor: Barry Irwin.
S.O.L.I.D. Software Development 12 January 2010 (Martin Verboon, Patrick Kalkman, Stan Verdiesen)
Using Mock Objects with Test Driven Development Justin Kohlhepp
Ready Marjan Nikolovski Father, Dev, CEO/Emit Knowledge Down the rabbit hole Error handling examined try { } // // Blog: emitknowledge.com/research-labs.
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP.
Using Test Driven Development Jon Kruger Blog: Twitter: JonKruger.
Windows iOS Android … and WakeUpAndCode.com.
Build Robust Web Apps in the Real WakeUpAndCode.com.
XmlBlackBox The presentation Alexander Crea June the 15st 2010 The presentation Alexander Crea June the 15st 2010
Phase Test 2 You have been provided with a finished application available from the module web site called Phase Test 2 Sample Application. This application.
Windows 8.1 Windows Phone 8.1 Windows 10 … and WakeUpAndCode.com.
Entity Framework 7 Who Are You & What Have You Done to my ORM?
 An essential supporting structure of any thing  A Software Framework  Has layered structure ▪ What kind of functions and how they interrelate  Has.
SOLID Design Principles
Windows 10, Universal Apps, Xbox One & WakeUpAndCode.com.
21 Copyright © 2008, Oracle. All rights reserved. Enabling Usage Tracking.
Python: Building Geoprocessing Tools David Wynne, Ghislain Prince.
ASP.NET Core* Shahed Chowdhuri Sr. Technical WakeUpAndCode.com A Quick Overview of ASP.NET Core * aka ASP.NET 5 before.
David Boike Presentation and source:
Bob German Principal Architect Developing SharePoint Applications with MVC and Entity Framework.
©Alistair Cockburn Alistair Cockburn You Can't Be Agile if Your Architecture's a Mess “Continuous attention to technical.
ASP.NET Core* Shahed Chowdhuri Sr. Technical WakeUpAndCode.com A Quick Overview of ASP.NET Core RC2 * aka ASP.NET 5 before.
ASP.NET Core* 1.0 The Future of Web Apps Shahed Chowdhuri
Your Host & Speaker Shahed Chowdhuri Sr. Technical Microsoft Technology Areas Enterprise Web/Software Development Game Development Mobile.
Unit testing of the Services Telerik Software Academy Web Services and Cloud.
1 Adding a Model. We have created an MVC web app project Added a controller class. Added a view class. Next we will add some classes for managing movies.
CS520 Web Programming Spring – Web MVC Chengyu Sun California State University, Los Angeles.
ASP.NET Core* Shahed Chowdhuri Sr. Technical WakeUpAndCode.com A Quick Overview of ASP.NET Core * aka ASP.NET 5 before.
Build Robust Web Apps in the Real WakeUpAndCode.com * aka ASP.NET 5 before RC1.
ASP.NET Core* Shahed Chowdhuri Sr. Technical WakeUpAndCode.com Deploying Your Web Apps * aka ASP.NET 5 before RC1.
ASP.NET Programming with C# and SQL Server First Edition
MeshCentral 2.0.
ASP.NET Unit Testing Unit Testing Web API SoftUni Team ASP.NET
Better Unit Tests through Design Patterns: Repository, Adapter, Mocks, and more… Benjamin
Unity 5 JumpStart Part 4: Sound Effects Shahed Chowdhuri
Key Points Unfolding the Situations to Drill a Framework in PHP
Web Application Security
ASP.NET Core* 1.0 The Future of Web Apps Shahed Chowdhuri
Unit Testing in a Team Sparkhound Presents by Steve Schaneville
Entity Framework Core*
Featuring: Microsoft Student Partners
Developing on a Mac For C# Developers Shahed Chowdhuri
Unit Testing with xUnit.net-Part-2
A Quick Overview of ASP.NET Core 1.0
Unity 5 JumpStart Part 2: Ammo Collisions Shahed Chowdhuri
Part 3: Damage From Objects
Testing a persistence layer
Part 1: Player Selection & Scores
ASP.NET Core* MVC and Web API Shahed Chowdhuri
What’s new in ASP.NET Core and Entity Framework 2.2 (Preview 3)
From Development to Production: Optimizing for Continuous Delivery
Developing and testing enterprise Java applications
Universal Apps For Windows 10 Shahed Chowdhuri
From Development to Production: Optimizing for Continuous Delivery
Presentation transcript:

Build Robust Web Apps in the Real WakeUpAndCode.com

Why Unit Testing? > Getting Started > Writing and Running Tests > Mocking What’s Next?

> Nothing new to learn > Error-prone > Expensive > Slower

> Less human error > Faster! > Decreasing costs > Learning curve

Legacy New/ Improved Design Patterns S.O.L.I.D.TDDRefactorRestructure SRP OCP LSP ISP DIP

Source:

Why Unit Testing? > Getting Started > Writing and Running Tests > Mocking What’s Next?

Unit TestsIntegration TestsUI Tests

xUnit.net references Web App being tested

public test class [Fact] for public methods without parameters [Theory] and [InlineData] for methods with parameters

Build Solution Run Tests in Test Explorer

Verify actual result against expected result Note “var” keyword

Verify that expected view equal to returned view

Temporarily ignore tests with an optional message.

Correct Views? Redirect to URL? Correct Models? HTTP Code? Mock Depen- dencies! Model Populated?

Mocks Pre-programmed with expected results, doesn’t actually connect to DB, behavior verification. Fakes Working examples, but not production-ready (e..g in-memory database) Stubs Provides canned answers

Smoke Tests New Features Edge Cases

Cost of Adding Unit Tests Cost of Not Having Unit Tests Bugs Features Expenses

Dependency Injection Inversion of Control

Views & ViewModels Controllers Service Layer Repository Layer Entity Framework (ORM) SQL Server (database)

60 to 80% coverage ok?

Why Unit Testing? > Getting Started > Writing and Running Tests > Mocking What’s Next?

Twitter: