Week Assignment. Unit Testing. Hans-Petter Halvorsen, M.Sc. IA4412 Software Engineering



Similar documents
Cloud-based Data Logging, Monitoring and Analysis

Team Foundation Server

Data Logging and Monitoring Pro. Hans-Petter Halvorsen, M.Sc.

Software Documentation

Database Systems. S. Adams. Dilbert. Available: Hans-Petter Halvorsen, M.Sc.

Create a Virtual Test Environment

VERIFICATION AND VALIDATION AUTOMATED TESTING TOOLS CLAUDIU ADAM

SCADA, OPC and Database Systems

So#ware Deployment. Hans- Pe4er Halvorsen, M.Sc. h4p://home.hit.no/~hansha/?page=so#ware_development

Programming. Languages & Frameworks. Hans- Pe(er Halvorsen, M.Sc. h(p://home.hit.no/~hansha/?page=sodware_development

Automation using Selenium

Manage Software Development in LabVIEW with Professional Tools

Web Services. with Examples. Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics

Industrial DAQ System for Measurements and Monitoring. Hans-Petter Halvorsen, M.Sc.

Web. Programming. Hans- Pe0er Halvorsen, M.Sc. h0p://home.hit.no/~hansha/?page=sojware_development

Hardware-in-the-Loop Simulation

Create Installa+on Packages in Visual Studio

DAQ in MATLAB HANS-PETTER HALVORSEN,

h(p://home.hit.no/~hansha/?page=so3ware_development So3ware Maintenance Hans- Pe(er Halvorsen, M.Sc.

System requirements for ICS Skills ATS

If you have questions or need assistance, contact PCS Technical Services using the contact information on page 10.

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

How To Write a Technical Lab Report with Practical Examples

MICROSOFT OFFICE LIVE MEETING GUIDE TO GENERATING REPORTS

Integrating Team Foundation Server, Microsoft Test Manager and Coded UI Tests

Linux A first-class citizen in Windows Azure. Bruno Terkaly bterkaly@microsoft.com Principal Software Engineer Mobile/Cloud/Startup/Enterprise

Welcome The webinar will begin shortly

Operationalise Predictive Analytics

Unit & Live Testing for SSIS

XTM Drupal Connector. A Translation Management Tool Plugin

SourceAnywhere Service Configurator can be launched from Start -> All Programs -> Dynamsoft SourceAnywhere Server.

INSTALLING MICROSOFT SQL SERVER AND CONFIGURING REPORTING SERVICES

Source Code Control & Bugtracking

So#ware Development. Overview. Hans- Pe4er Halvorsen, M.Sc. h4p://home.hit.no/~hansha/?page=so#ware_development

ASP.NET. Web Programming. Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics

Developing Mapping Applications with ArcGIS Runtime SDK for Windows Mobile. Jay Chen Justin Colville

CONFIGURING MICROSOFT SQL SERVER REPORTING SERVICES

Deploying Migrated IBM Notes Applications to the Cloud

Upgrading a Microsoft Dynamics NAV 2009 R2 or Microsoft Dynamics NAV 2009 SP1 Database to Microsoft Dynamics NAV 2015

Hands-On Lab: WSUS. Lab Manual Expediting WSUS Service for XP Embedded OS

Upgrade Guide BES12. Version 12.1

> Define the different phases of K2 development, including: understand, model, build, maintain and extend

ASSURING SOFTWARE QUALITY USING VISUAL STUDIO 2010

Test Automation Integration with Test Management QAComplete

SpiraTeam Feature Compa

The Application Getting Started Screen is display when the Recruiting Matrix 2008 Application is Started.

DataCove. Installation Instructions for Search Plug-in for Microsoft Outlook 2007 & 2010 (All Users)

Jolly Server Getting Started Guide

About Network Data Collector

Implementing Unicenter Desktop and Server Management (DSM) r11.1 with Microsoft SQL Server Clusters

DMSplus for Microsoft SharePoint 2010

Measurement Studio. Contents RELEASE NOTES

Managing Visual Studio Standard subscriptions (MSDN Subscriptions)

SENIOR WEB DEVELOPER

Introduction to Virtualization

Microsoft Windows Server 2008* (x86 & x64) Dual SCM (ALUA) Installation BKM. Intel Order Number: E

SUMMARY Moderate-High: Requires Visual Basic For Applications (VBA) skills, network file services skills and interoperability skills.

Kentico CMS 7.0 Intranet Administrator's Guide

Course 10175A - Microsoft SharePoint 2010, Application Development

Custom Tasks for SAS. Enterprise Guide Using Microsoft.NET. Chris Hemedinger SAS. Press

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

Making Mobile a Reality

Website Pros Templates v1.0. Database Template Overview

Synchronization with Microsoft Team Foundation Server 2010

Lecture 26 Enterprise Internet Computing 1. Enterprise computing 2. Enterprise Internet computing 3. Natures of enterprise computing 4.

QUANTIFY INSTALLATION GUIDE

Cloud Services ADM. Agent Deployment Guide

Deploying Windows Streaming Media Servers NLB Cluster and metasan

JP1 Version 11: Example Configurations

ASP &.NET. Microsoft's Solution for Dynamic Web Development. Mohammad Ali Choudhry Milad Armeen Husain Zeerapurwala Campbell Ma Seul Kee Yoon

Windows Intune Walkthrough: Windows Phone 8 Management

WIDA Assessment Management System (WIDA AMS) User Guide, Part 2

Mobile Labs Plugin for IBM Urban Code Deploy

TECHNICAL DOCUMENTATION SPECOPS DEPLOY / APP 4.7 DOCUMENTATION

How to Back Up and Restore an ACT! Database Answer ID 19211

HP ALM11 & MS VS/TFS2010

When a variable is assigned as a Process Initialization variable its value is provided at the beginning of the process.

Ivan Medvedev Principal Security Development Lead Microsoft Corporation

Developing Database Business Applications using VB.NET

Your Technology Partner Offshore and Onsite. Services Portfolio

Writers: Joanne Hodgins, Omri Bahat, Morgan Oslake, and Matt Hollingsworth

International Journal of Advanced Engineering Research and Science (IJAERS) Vol-2, Issue-11, Nov- 2015] ISSN:

Fireware XTM v is a maintenance release for XTM 21, XTM 22, and XTM 23 wired and wireless devices.

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

DigitalPersona, Inc. Altus AUTH SDK. Version 1.1. Developer Guide

Application Development With Data Studio

A H S A N M U H A M M A D J A W A I D

Leveraging Rational Team Concert's build capabilities for Continuous Integration

White Paper. Deployment of ActiveX Controls via Microsoft Windows Active Directory. Fabasoft Folio 2015 Update Rollup 2

Transcription:

IA4412 Software Engineering Week Assignment Unit Testing B. Lund. Lunch. Available: http://www.lunchstriper.no, http://www.dagbladet.no/tegneserie/lunch/ Hans-Petter Halvorsen, M.Sc.

All Documents, Code, etc. should be uploaded to Visual Studio Team Services (VSTS) Week Assignment 1. Create Unit Tests for your Code 2. Discussion and Reflection 3. Cont. Implementation, Testing and Bug-fixing in general See Next Slides for more details...

Introduction Unit Testing Hans-Petter Halvorsen, M.Sc.

Levels of Testing Unit Testing: Test each parts independently and isolated Integration Testing: Make sure that different pieces work together. Test the Interfaces between the different pieces. Interaction with other systems (Hardware, OS, etc.) Regression Testing: Test that it still works after a change in the code System Testing: Test the whole system

What are Unit Tests Unit Testing (or component testing) refers to tests that verify the functionality of a specific section of code, usually at the function level. In an object-oriented environment, this is usually at the class and methods level. Unit Tests are typically written by the Developers as part of the programming Automatically executed (e.g., Visual Studio and Team Foundation Server have built-in functionality for Unit Testing)

Unit Tests Frameworks Unit Tests Framework are usually integrated with the IDE Visual Studio Unit Test Framework. Unit Tests are built into Visual Studio (no additional installation needed) Others: JUnit (Java) JUnit is a unit testing framework for the Java programming language. NUnit (.NET) NUnit is an open source unit testing framework for Microsoft.NET. It serves the same purpose as JUnit does in the Java world PHPUnit (PHP) LabVIEW Unit Test Framework Toolkit etc. All of them work in the same manner but we will use the Visual Studio Unit Test Framework

Unit Testing and Documentation How/where shall Unit Testing be included in the documentation? Software Test Plan (STP) Test Planning, Unit Testing is an important part of that! Test Documentation Documentation, Test execution and Test Results, Unit Testing is an important part of that! System Documentation Used to maintain and further development of the system, Unit Testing is an important part of that! More about System Documentation Next Week!

Unit Testing Create Unit Tests for your code Not for all of your code, just a few examples in order to learn how it is done in practice. Each member in the Team should write at least 2 Unit Tests for their code Unit Testing should also be part of the System Documentation (Next Week!)

Unit Tests Best Practice A Unit Test must only do one thing Unit Test must run independently Unit Tests must not be depend on the environment Test Functionality rather than implementation Test public behavior; private behavior relates to implementation details Avoid testing UI components Unit Tests must be easy to read and understand Create rules that make sure you need to run Unit Tests (and they need to pass) before you are allowed to Check-in your Code in the Source Code Control System http://www.uio.no/studier/emner/matnat/ifi/inf5530

Unit Testing in Visual Studio To create a unit test project: 1. On the File menu, choose New and then choose Project (Ctrl + Shift + N). 2. In the New Project dialog box, expand the Installed node, choose the language that you want to use for your test project, and then choose Test. 3. To use one of the Microsoft Unit Test frameworks, choose Unit Test Project from the list of project templates. Otherwise, choose the project template of the Unit Test Framework that you want to use. 4. In your Unit Test Project, add a reference to the code under test. Here s how to create the reference to a code project in the same solution: a. Select the project in Solution Explorer. b. On the Project menu, choose Add Reference... c. In the Reference Manager dialog box, open the Solution node and choose Projects. Check the code project name and close the dialog box.

Unit Testing in Visual Studio You need to Add a Unit Test Project to your existing solution in Visual Studio

Unit Testing in Visual Studio Example Your ordinary Project Add Reference to the Code under Test Your Unit Test Project 13

Discussion and Reflection 1. Explain the difference between unit testing and integration testing (or interface testing in Sommerville) 2. Suggest test cases for the use case Take out Money from an ATM, i.e., give examples of Unit Tests and Integration Tests

Implementation Cont. Implementation, Testing and Bugfixing in general Report Bugs in VSTS Fix Bugs according to Bug List in VSTS Planning to Create New Code? Try to Create a Unit Test before you start Coding

Hans-Petter Halvorsen, M.Sc. University College of Southeast Norway www.usn.no E-mail: hans.p.halvorsen@hit.no Blog: http://home.hit.no/~hansha/