T-unit: Tcl Unit Test Package Automated Unit Test Package For Tcl Procedures Final Presentation Joseph Boyle Loyola Marymount University.

Slides:



Advertisements
Similar presentations
Automated Unit Test Package For Tcl Procedures March 25, 2017
Advertisements

Object Oriented Analysis And Design-IT0207 iiI Semester
Configuration management
Extreme Programming Team Members Gowri Devi Yalamanchi Sandhya Ravi.
Computer Engineering 203 R Smith Agile Development 1/ Agile Methods What are Agile Methods? – Extreme Programming is the best known example – SCRUM.
Applied Software Project Management Andrew Stellman & Jennifer Greene Applied Software Project Management Applied Software.
Russell Taylor Lecturer in Computing & Business Studies.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Guide To UNIX Using Linux Third Edition
An Agile View of Process
Task Manager Software Engineering: CS 673 Spring 2009 John Spencer, Parag Shah, Rich Moffitt, Hassan Sobhie May 4, 2009.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Extreme Programming.
Chapter 30 Agile Requirements Methods. Mitigating Requirements Risk  The entire requirements discipline within the software lifecycle exists for only.
This chapter is extracted from Sommerville’s slides. Text book chapter
Chapter 3 – Agile Software Development 1Chapter 3 Agile software development.
Applied Software Project Management Andrew Stellman & Jennifer Greenehttp:// Applied Software Project Management Chapter 1: Introduction.
Prologue: The Software Process. Main Phases of Software Process 1. Requirements Analysis (answers “WHAT?”) Specifying what the application must do 2.
Agile and XP Development Dan Fleck 2008 Dan Fleck 2008.
JUnit in Action SECOND EDITION PETAR TAHCHIEV FELIPE LEME VINCENT MASSOL GARY GREGORY ©2011 by Manning Publications Co. All rights reserved. Slides Prepared.
Testing in Extreme Programming
 To explain the importance of software configuration management (CM)  To describe key CM activities namely CM planning, change management, version management.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
T-unit: Tcl Unit Test Package Automated Unit Test Package For Tcl Procedures Final Presentation Joseph Boyle Loyola Marymount University.
Design and Programming Chapter 7 Applied Software Project Management, Stellman & Greene See also:
Extreme/Agile Programming Prabhaker Mateti. ACK These slides are collected from many authors along with a few of mine. Many thanks to all these authors.
Luminance.  Major group refactoring.  Development Lead: Stephen Damm.  Project Manager: Martina Nagy.  Test team member: Chet Collins.  A lot of.
Extreme Programming (XP). Agile Software Development Paradigm Values individuals and interactions over processes and tools. Values working software over.
Distributed Java Programming Distributed Java Programming Setting up a Java Development Environment.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
From Quality Control to Quality Assurance…and Beyond Alan Page Microsoft.
Increment 1 Development Plan - License Checker 2.0 Jing Jing-Helles
Software Construction Lecture 18 Software Testing.
TJHSST Computer Systems Lab Automation of Testing in the Distributed Common Ground System (Army) Michael Eng Mentor: Mark Pumphrey Northrop Grumman.
Chapter 2 Software processes. Topics covered Software process models Process activities Coping with change.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Unit Testing with JUnit and Clover Based on material from: Daniel Amyot JUnit Web site.
Eclipse 24-Apr-17.
SilkTest 2008 R2 SP1: Silk4J Introduction. ConfidentialCopyright © 2008 Borland Software Corporation. 2 What is Silk4J? Silk4J enables you to create functional.
AP-1 4. Agile Processes. AP-2 Agile Processes Focus on creating a working system Different attitude on measuring progress XP Scrum.
Confidential Continuous Integration Framework (CIF) 5/18/2004.
Connecting with Computer Science2 Objectives Learn how software engineering is used to create applications Learn some of the different software engineering.
20081 Converting workspaces and using SALT & subversion to maintain them. V1.02.
Requirements Engineering Requirements Engineering in Agile Methods Lecture-28.
1 Unit Testing with JUnit CS 3331 JUnit website at Kent Beck and Eric Gamma. Test Infected: Programmers Love Writing Tests, Java Report,
® IBM Software Group © 2007 IBM Corporation Module 1: Getting Started with Rational Software Architect Essentials of Modeling with IBM Rational Software.
1 Chapter 12 Configuration management This chapter is extracted from Sommerville’s slides. Text book chapter 29 1.
Software Engineering Principles Practical Advice and Steps for Managing Your Project.
Extreme Programming. Extreme Programming (XP) Formulated in 1999 by Kent Beck, Ward Cunningham and Ron Jeffries Agile software development methodology.
Agenda: Overview of Agile testing Difference between Agile and traditional Methodology Agile Development Methodologies Extreme Programming Test Driven.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Interactions. The prey, the pack, and the hunt Your goal is to meet your customer’s needs That goal, and nothing else, is the prey Not throwaway prototypes.
An EPICS IDE Using Eclipse Kenneth Evans, Jr. Presented at the EPICS Collaboration Meeting June 15, 2006 Argonne National Laboratory, Argonne, IL.
T-unit: Tcl Unit Test Package Automated Unit Test Package For Tcl Procedures Final Presentation Joseph Boyle Loyola Marymount University.
CS223: Software Engineering Lecture 18: The XP. Recap Introduction to Agile Methodology Customer centric approach Issues of Agile methodology Where to.
Python: Building Geoprocessing Tools David Wynne, Ghislain Prince.
JRA1 Meeting – 09/02/ Software Configuration Management and Integration EGEE is proposed as a project funded by the European Union under contract.
Northwest Arkansas.Net User Group Jay Smith Tyson Foods, Inc. Unit Testing nUnit, nUnitAsp, nUnitForms.
Testing under the Agile Method CSCI 521 Software Project Management based on the book Testing Extreme Programming by Lisa Crispin and Tip House.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
SWE 434 SOFTWARE TESTING AND VALIDATION LAB2 – INTRODUCTION TO JUNIT 1 SWE 434 Lab.
Software Development.
CST 1101 Problem Solving Using Computers
Software Testing.
Introduction to JUnit CS 4501 / 6501 Software Testing
Chapter 8 – Software Testing
Design and Programming
Lecture 09:Software Testing
Introduction to JUnit CS 4501 / 6501 Software Testing
Extreme Programming.
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Presentation transcript:

t-unit: Tcl Unit Test Package Automated Unit Test Package For Tcl Procedures Final Presentation Joseph Boyle Loyola Marymount University

2 Introduction Understand how Agile Software practices can be used in a scripting language environment How Agile practices can be applied in an industry that is big on up-front design Create a project that is open source Final Presentation Introduction Updated: 25-Nov-2006

Loyola Marymount University3 Related Work Many key players in the Agile movement Kent Beck Extreme Programming Martin Fowler Refactoring, Continuous Integration Andrew Hunt and David Thomas The Pragmatic Programmer Tcl Scripting Language Created by John Ousterhout in early 1980’s at Berkeley Final Presentation Related Work Updated: 25-Nov-2006

Loyola Marymount University4 State of Software Development Need to get away from plan-driven approach Can’t see the complexity of the software ahead of time The culture must be ready for change! Start with a vision and a set of principles that defines what needs to be accomplished From these principles we can derive a set of working practices Final Presentation State of SW Development Updated: 25-Nov-2006

Loyola Marymount University5 Agile Culture Disciplined in approach and goal focused Responsible for one’s work Leaders that can help others succeed Highly collaborative team that can embrace differences between personalities and roles and strive for success Feel comfortable communicating with the team Keep the product simple to solve only the problem at hand Courage to speak up when things are going bad Final Presentation Agile Culture Updated: 25-Nov-2006

Loyola Marymount University6 Agile Principles Continual Refinement Enhances the ability to change with the customer’s needs Working Product at All Times The goal of software developers is to ship software. Keep the software as close as possible to a shipping state. Continual investment in and emphasis on Design Design decisions and changes are made every day by every member of the team Extends the life of the product Value defect prevention over defect detection Prevent defects to save yourself the headaches later on Final Presentation Agile Principles Updated: 25-Nov-2006

Loyola Marymount University7 Design and Documentation Keep the design simple Design and code for what is needed today Consider designing reusable software for future projects UML offers a wide variety of tools to document the design Since Tcl is a scripting language, a sequence diagram can typically be used when designing a module Extraction software such as JavaDoc can be useful for documenting software Tcl has its own documentation utility known as AutoDOC Developed by Andreas Kupries in 2001 as an extension to the language Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University8 The Customer Always have the customer's input when creating software Responsible for the requirements Ability to pick which features are most important, and therefore, should be developed first Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University9 Coding Conventions Makes the code easy to read, especially if a new team member arrives Ray Johnson of Sun Microsystems created a Tcl style guide for the Tcl programming language Using these coding conventions in conjunction with the AutoDOC utility makes Tcl source code well commented and easy to read Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University10 Paired Programming Paired programming involves two people sitting at one computer where each person can sit comfortably and work can get done. Keep one another on task Refine the system Come up with ideas When one partner is stuck the other can take over, lowering the stress level Hold each other responsible for following the other practices the team is following Downsides of Paired Programming Watching another person type can be painful Many companies consider paired programming a waste of a resource Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University11 Code Reviews Code reviews in conjunction with paired programming allow for the whole team to own the code Allow for the team to learn and share ideas about the project There are downsides of code reviews without paired programming Typically logic errors are missed A combination of paired programming and code reviews will lead to better defect prevention Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University12 Iterative and Incremental Development “Plan a little, do a little, learn a little.” By developing the software incrementally, the software can stay in a releasable state Putting in the most important features first, the software could theoretically be released to the customer if they decide that some of the features initially envisioned are no longer necessary Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University13 Continuous Integration Frequent integration insures that modules that must fit together will Automate the build with unit tests to detect errors as soon as possible An Ant build can be created for this A single source repository keeps the necessary items for a build together Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University14 Sample Test Target <!-- < Define the test target (runs the unit tests) Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University15 Refactoring Refactoring can improve the structure of code without changing its behavior Martin Fowler wrote a whole book on refactoring and offers wide variety of refactorings available Most can only be applied to Object Oriented Languages Sample refactorings for scripting languages: Add a parameter Consolidate Conditional Expression Extract Method Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University16 Unit Testing Prevents defects from ending up in software Gives confidence that the product is behaving as expected Tcl had two unit test frameworks available: tcltest – does not use the xUnit framework TclTkUnit – does not report results sufficiently “t-unit” was developed to be a better unit test framework for Tcl Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University17 t-unit Provides an automated unit test framework Modeled after the “JUnit” Java test suite All calls are “asserts”; e.g.: “assertEqual” checks for equal results “assertTrue” checks for result of boolean TRUE...and so on... Final Presentation Agile Practices Updated: 25-Nov-2006

t-unit “Class” Diagram Updated: 25-Nov-2006 File Test Suite Report «creates» «examines» Procedure Package Under Test Expression «calls» «input, expected» Test Case + reason: String Test ResultPassFail «result» {complete, discrete} Package t-unit t-unit::assertXXXX «abstract» t-unit::testHarness «calls» t-unit::assertEquals t-unit::assertEqualsReal t-unit::assertEqualsList t-unit::assertEqualsArrayt-unit::assertNotEquals t-unit::assertFalse t-unit::assertTrue «test function» «reads» «writes» user «runs»

Loyola Marymount University19 Sample Test Case TUnit Process Model Test Case File Description Updated: 27-Oct-2006 t-unit::assertEquals | PASS | OK t-unit::assertEquals"hello“"hello”| PASS | OK t-unit::assertEquals"hello“"world“| FAIL | NOT_EQUAL t-unit::assertEquals2 2| PASS | OK t-unit::assertEquals23| FAIL | NOT_EQUAL t-unit::assertEquals | PASS | OK t-unit::assertEquals | FAIL | ARG_MISMATCH t-unit::assertEqualsTRUETRUE| PASS | OK t-unit::assertNotEqualsTRUEFALSE| PASS | OK t-unit::assertNotEquals“hello”“world”| PASS | OK t-unit::assertEqualsList{1 2 3}{1 2 3}| PASS | OK t-unit::assertEqualsArrayA1A2| PASS | OK t-unit::assertEquals [samplePackage::addOne 1] 2 | PASS | OK Usage notes: 1.Vertical bars required as shown 2.Whitespace required as shown 3.Optional third parameter (not shown) allows tailoring of response message for each assertion 4.Either parameter (or both parameters) may be a Tcl “list” data type List can contain a procedure name and its arguments Allows testing of procedures, not just values (real strength of this package) Enclose lists in curly braces within test file, or define globally prior to running t-unit (may be defined as part of automated test suite) List may comprise a procedure and its argument list Final Presentation Test Case File Description Updated: 25-Nov-2006

Loyola Marymount University20 Use Available Tools A wide variety of tools at our disposal Text editors that offer syntax highlighting Office suites for presentations and UML documents Configuration Management (CM) System Keep track of every change in source code and documentation Allows for continuous integration to be seamless Subversion, CVS Eclipse Open Development Platform Text editor Build and unit testing Integrated GUI for CM Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University21 TUnit TUnit is a plug-in for the Eclipse IDE. TUnit makes use of the t-unit package that was developed for the Tcl programming language. Features: Tcl Perspective Tcl Project Wizard – creates tcl projects with t-unit included Tcl Package Creator – creates packages within the project Tcl File Creator – creates tcl files with AutoDOC comments in place Tcl File Editor – allows for syntax highlighting, auto indentation, and content assistance (i.e. completion of commands) Preferences menu Namespace Explorer – lists packages and files within each package; can be used to verify that Tcl coding standards are being followed Execution of t-unit scripts A set of unit tests is also available to test the TUnit plug-in Demonstration Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University22 TUnit Extension The Eclipse Dynamic Languages Toolkit (DLTK) project was created to develop a framework for tool vendors, researchers, and end-users who rely on dynamic languages such as Tcl Xored Software Inc. was behind the plug-in and they are developing the project in Russia Eclipse DLTK did not include a unit test framework as part of the plug-in TUnit extension was born Offered to create this part of the plug-in using the t-unit package Demonstration Final Presentation Agile Practices Updated: 25-Nov-2006

Loyola Marymount University23 Future Research Over time, more practices will be added to Agile to make the development process even more seamless The future of TUnit and the TUnit extension is still up in the air TUnit has been released as version No bugs reported to date via the Google Code repository TUnit extension could see additional revisions The Eclipse DLTK project is interested in adding the tcltest framework to the TUnit extension Code is written to do this fairly easily Looking at a date in January 2007 Final Presentation Future Research Updated: 25-Nov-2006

Loyola Marymount University24 Conclusions Agile is not going away but getting stronger More and more it is being accepted as a valid process for creating software Not all the practices need to be followed: come up with a set that fits the team’s needs Final Presentation Future Research Updated: 25-Nov-2006

Loyola Marymount University25 Source Code TUnit has a homepage at: Project can be downloaded from here along with documentation and screenshots Source code repository for the paper, this presentation, TUnit and the TUnit unit tests at: Eclipse DLTK considering putting the extension of TUnit in their next milestone release The source code is located in Loyola Marymount’s CVS for now but could move into the Eclipse DLTK repository next year Could not use the Google repository because the Eclipse Public License is not available Can also download the project at the TUnit homepage Final Presentation Future Research Updated: 25-Nov-2006

Loyola Marymount University26 Questions or Comments