Version Control and Unit Testing by yew20072

VIEWS: 8 PAGES: 20

									Version Control and Unit
        Testing
            CODE                       Automatic
                                     software test
                   Version Control    run process
                   & documentation


Software
developer




                                         Test
                                       programs
       Part I Version Control
► We hope to demonstrate how using version
 control, can enable you and/or your team
 to effectively manage change multiple
 instances of code in a more ubiquitous
 environment
                   Questions

► What    is version control?
► What    is Subversion?
► How    do I use it?
► Is   version control for me?
      Version Control Defined
Revision control (also known as Version
 control) is the management of multiple
 revisions of the same unit of information.
    -- Wikipedia.org
                 Time Machine
► Track   who made what changes and when
   Can even tell you why changes were made (Logs)
   Changes made since last release of web site or
    application

► See   files as they looked a year ago
► View   files or folders you have already deleted
   Nothing is ever really deleted
                   Protection
►   Let’s you track changes made today

►   Provides an “Undo” button
       Undo all changes made today
          Your Own Sandbox
► Provides   you with your own copy of files

► You control the changes made
 to your files:
   When to share your changes
   When to incorporate others’ changes

► You   can even isolate your work from yourself
            Alternate Reality
► Manages   different versions of the same
 project at the same time
                Technical Side
► Is   a big database of files and folders

► Keeps  a record of every major change or set
  of changes made to a file or folder

► Enables    sharing a project over a network
        Version Control is Not…
►A substitute for communication within a
 team
   It often helps to facilitate communication
    instead

► The   solution to all problems
   It is only a tool
   It is only as good as the user
      How to do Version Control?
► Chose one of the many different version
 control packages available
► Get   buy-in from your team

► Decide   upon a few practices
     What info to log?
     What goes into the version control system?
     Directory structure layout
     Naming conventions
        Version Control Systems
Free or Open Source:                  Proprietary:
► CVS                                    ► Rational ClearCase
► Subversion                             ► MS Team
► CVSNT                                    Foundation Server
► GNU   Arch                             ► MS Visual
                                           SourceSafe
► RCS
                                         ► Perforce
► Baz


                       Compare for yourself
   http://en.wikipedia.org/wiki/Comparison_of_revision_control_software
                 SubVersion
► Subversion     is an open source application
  for revision control. Also commonly referred
  to as svn or SVN, Subversion is designed
  specifically to be a modern replacement for
  CVS and shares a number of the same key
  developers.
► --   Wikipedia.org
           Common Actions
► Check    Out
► Add
► Status
► Update
► Diff
► Commit
        Less Common Actions
► Rename/Move
► Revert
► Branch
► Merge
► Tag
           Subversion Clients
► Command-line     tools
► TortoiseSVN (Windows shell extension)
► Subclipse (plug-in for Eclipse)
► Svnx (for Mac)
► AnkhSVN     (plug-in for MS VisualStudio.NET)
► SVN for Dreamweaver (GraFX Software Solutions)
► On and On and On
  Why Unit Test?




Its tough to find good help these days.

Interdependencies grow as code base grows

Reducing time debugging means more time for
productive development.
          Part II Unit Testing
► systematic   way of testing small portions
  (‘units’) of code
► A way to avoid accidentally breaking
  working code.
► Another way to make sure noobs don’t
  break stuff
► Ensure that vendors and outside
  datasources don’t break stuff either!
      What should I Unit Test?

Unit-tests
Should validate expected functionality at the level
of:
      •individual class
      •small groups of collaborating classes
      •work package

  Important code should have unit tests
  Tests should be written together with the code
  Code should pass all unit tests before it can be
  released
             Unit Testing for All!
► PerlUnitperl
► SimpleTest Perl
► JUnit JAVA
► ApacheTest All of the above
► NUnit .NET


More to come!!

								
To top