COMP1511 17s2
— extension lecture —
testing + version control

Jashank Jeremy
<jashank.jeremy@unsw.edu.au>

methodicaltesting

before we begin

know your scope
what are we allowed to check?
what aren’t we allowed to check?

construct scenarios
consider edge-cases, boundaries

“attack first”…
think before you test
test before you implement

Testing a Scenario (I)

know or construct
a world to test in

ensure you have information
… as much as possible!

test one thing only

Testing a Scenario (II)

check the world is as you left it…
check pointers, check values, check structure

use what you know to test effectively

demo time

testing listDeleteTail

collaborativecode

how are you sharing code?

USB flash drives

e-mail threads

google docs

… or worse

someone’s responsible
for making sure
all the pieces of
Game.c, testGame.c, etc.
fit together…

… but code isn’t like an essay

there must be a better way!

… and there is:

source code management

sometimes referred to as
“revision control systems” or
“version control systems”

… what?

create files, directories
take a snapshot of your state
retrieve, compare, examine old snapshots

track contributors and contributions
share and integrate code

the options

like most things in computing, many options
… all pretty much the same

distributed

Git

Mercurial (Hg)

Bazaar (Bzr)

darcs

pijul

centralised

Subversion (svn)

CVS

RCS

SCCS

… and many commercial offerings
Perforce, ClearCase, TFS

hosted version control

Atlassian Bitbucket (bitbucket.org)
free private Git (+ Hg) repositories

Github (github.com)
free (for students) private Git repositories

GitLab (gitlab.com)
free private Git repositories
hosted at CSE: gitlab.cse.unsw.edu.au

friendly tools

the Git command-line …
a great demo at try.github.io

magit
better Emacs integration

tig
terminal-flavoured interactions

gitg, gitk, git gui
simple Git GUIs

more friendly tools

Atlassian SourceTree
sourcetreeapp.com

Github for Desktop
desktop.github.com

syntevo SmartGit
syntevo.com/smartgit

TortoiseGit
tortoisegit.org

integrated into editors and IDEs
Sublime, Atom, VSC…
Xcode, VS 2015, Eclipse, IntelliJ