Overview Unit testing Building Version control.

Slides:



Advertisements
Similar presentations
C++ Development on Linux Agenda Introduction Editors Debuggers GUI IDEs Make Automake Exploring further.
Advertisements

Introduction to Linux Recap Installing programs Introduction to Video Editing with Linux.
Configuration management
Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
Developing in CAS. Why? As distributed you edit CAS 3 with Eclipse and build with Maven 2 – Best Practice for Release Engineering – Difficult edit-debug.
Makefiles. makefiles Problem: You are working on one part of a large programming project (e. g., MS Word).  It consists of hundreds of individual.c files.
Lecture 3 Getting Started with ITK!. Goals for this lecture Learn how to use Cmake Build ITK Example programs that use ITK.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
Server-Side vs. Client-Side Scripting Languages
CS 501 : An Introduction to SCM & GForge An Introduction to SCM & GForge Lin Guo
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
2000 Copyrights, Danielle S. Lahmani UNIX Tools G , Fall 2000 Danielle S. Lahmani Lecture 9.
Automating the Build Process using ANT SE-2030 Dr. Mark L. Hornick 1.
G51FSE Version Control Naisan Benatar. Lecture 5 - Version Control 2 On today’s menu... The problems with lots of code and lots of people Version control.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
Linux Operations and Administration
SCRAM Software Configuration, Release And Management Background SCRAM has been developed to enable large, geographically dispersed and autonomous groups.
Maven & Bamboo CONTINUOUS INTEGRATION. QA in a large organization In a large organization that manages over 100 applications and over 20 developers, implementing.
Sumedha Rubasinghe October,2009 Introduction to Programming Tools.
Automating the Build Process using Ant SE-2030 Dr. Rob Hasker 1 Based on material by Dr. Mark L. Hornick.
Understanding Eclipse Development Environment Hen-I Yang July 7, 2006
Trilinos 101: Getting Started with Trilinos November 7, :30-9:30 a.m. Mike Heroux Jim Willenbring.
Software Engineering in Robotics Packaging and Deployment of Systems Henrik I. Christensen –
Programming Tools gcc make utility Open Source code Static and Shared Libraries gdb Memory debugging tools.
Makefiles. makefiles Problem: You are working on one part of a large programming project (e. g., MS Word).  It consists of hundreds of individual.cpp.
INFSOM-RI Juelich, 10 June 2008 ETICS - Maven From competition, to collaboration.
Old Chapter 10: Programming Tools A Developer’s Candy Store.
July 2011CMSC 341 CVS/Ant 1 CMSC 341 Java Packages Ant CVS Project Submission.
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
Introduction Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby.
Build Systems Presentation December 14, 2015 Noon-1pm Kathy Lee Simunich Bldg. 203/ D120 Brought to you by: Argonne Java.
Make Make is a system utility that automatically compiles your programs for you Make looks for a file named Makefile (or makefile) in the current directory.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
Build Tools 1. Building a program for a large project is usually managed by a build tool that controls the various steps involved. These steps may include:
How to configure, build and install Trilinos November 2, :30-9:30 a.m. Jim Willenbring.
Introduction of Wget. Wget Wget is a package for retrieving files using HTTP and FTP, the most widely-used Internet protocols. Wget is non-interactive,
SG Introduction to ANT scmGalaxy Author: Rajesh Kumar
Building programs LinuxChix-KE. What happens in your CPU? ● It executes a small set of instructions called "machine code" ● Each instruction is just a.
Evolution and History of Programming Languages
Stress Free Deployments with Octopus Deploy
Maven 04 March
Open Source Software Development Environment
Version Control with Subversion
CVS – concurrent versions system
CVS – concurrent versions system
L – Modeling and Simulating Social Systems with MATLAB
Microprocessor and Assembly Language
Brian Leonard ブライアン レオナルド
PVS-Studio static analyzer: advanced features
June 2011 David Front Weizmann Institute
An Automated Testing Framework
An introduction to version control systems with Git
TRANSLATORS AND IDEs Key Revision Points.
University of Texas Rio Grande Valley Systems Administration CSCI 6175
Compilers, Make and SubVersion
Introduction to JBoss application server
Microsoft PowerPoint 2007 – Unit 2
Nilanjan Banerjee Java Packages Ant CVS Project Submission
CS 240 – Advanced Programming Concepts
Getting Started With Solr
Concurrent Versions System
SE goes software engineering; (practically) managing the Compose
Continuous Integration
Presentation transcript:

Overview Unit testing Building Version control

Background: Extreme Programming Pair programming Small releases Metaphor Simple design Testing Refactoring www.extremeprogramming.org Sadfas asdfsad sadf

Unit Testing Write tests before code. Code not done until tests all run. Re-run tests after any major changes Can be confident that nothing has broken. Hence not afraid to refactor.

Tools for Testing Some functional tests can be manual. Possible to automate most tests. Tools exist to make this easy and provide GUI. Java – JUnit – www.junit.org C++ – CPPunit – cppunit.sf.net

Installing CPPUnit We use GNU compiler on Unix-like OS, but will also work for Visual C++ on Microsoft OS. wget cppunit.sourceforge.net/snapshot/cppunit-1.9.11-portability-test4.tar.gz tar xvfz cppunit-1.9.11-portability-test4.tar.gz cd cppunit-1.9.1 ./configure make su -c 'make install' Su -c 'ldconfig' Installation of GUI library is a bit more complicated :-(

CPPUnit Example

CPPUnit Output Options TestRunner with CompilerOutputter – prints results suitable for use with IDE with XMLOutputter – results as XML document for processing by another application TextTestRunner – human readable output QtTestRunner – output in GUI MfcTestRunner – Microsoft GUI

Installing CPPUnit QT Install tmake from ftp.trolltech.com/freebies/tmake After installing cppunit: cd src/qttestrunner TMAKEPATH=/usr/lib/tmake/linux-g++ tmake qttestrunner.pro -o makefile make su -c 'cp -d ../lib/* /usr/local/lib' su -c 'ldconfig'

CPPUnit QT GUI g++ -O2 -o simple Main.cpp ExampleTestCase.cpp - L/usr/qt/3/lib -I/usr/qt/3/include -lqt-mt -ldl -lcppunit - lqttestrunner

JUnit Output Options junit.textui.TestRunner – text output junit.awtui.TestRunner – GUI ouput junit.swingui.TestRunner – Nicer GUI output Further options, such as XML ouput, provided by Ant.

Junit Example Invoking JUnit is much easier. TestRunner programs are provided which load your bytecode via reflection, no need to compile your own runners. java junit.textui.TestRunner ExampleTest

Building Large projects consist of many files which must be compiled in the correct order. This can take hours. If only a few files have been edited, we don't need to recompile the whole lot. But how do we know which ones to recompile?

Make GNU Make is the most popular tool to solve this problem. You write 'Makefile' which describes all the dependencies between the source files. You run Make which then runs compiler for you.

Make Example

Makefile custom rules Make knows how to compile many languages by default, but it is easy to add new ones. %.class : %.java java $< %.pdf : %.ps ps2pdf $< $@

Make: other uses Makefile stores info (e.g. flags) making it easy for others to compile your program. If you want to change all flags, e.g. to add debug info, only one change needed. Make can invoke any command, not just compiler. Common uses: installation, removing object files, generating docs, packaging releases

Make uses

Example

Ant Higher level – deals with tasks rather than individual files Automatically generates dependencies (This is possible for C++ using Automake and Autoconf, but Ant is easier.) Compiles all files using single VM so much faster than Make for Java projects.

Ant example

Version Control

CVS Built on top of older single-file based system RCS, a bit clunky But free and already installed on every Unix machine Ubiquitous standard for distributed Open Source development Free book at cvsbook.red-bean.com Many tools, GUIs, and ports, for Microsoft see WinCVS and TortoiseCVS

More CVS commands cvs diff -r 1.1 -r 1.2 file cvs status file cvs history cvs log file

Advanced CVS: tags Can specify file revisions by number or by date: cvs update -D “2003-12-25 7:05:00 GMT” cvs update -r 1.5 file Tagging provides one name for all files at a certain 'snapshot' in time. cvs -q tag Release-1-0 cvs update -r Release-1-0

Subversion The next generation of CVS Usage is almost identical More features, less gotchas Download from http://subversion.tigris.org GUI and Microsoft Explorer integration Free book at http://svnbook.redbean.com