GIT and JUnit Dr. Andrew Wallace PhD BEng(hons) EurIng

Slides:



Advertisements
Similar presentations
Version Control What it is and why you want it. What is Version Control? A system that manages changes to documents, files, or any other stored information.
Advertisements

LECTURE 14 OCT 22, 2010 Git, in graphic form. Change tracking basics.
24-Jun-15 JUnit. 2 Test suites Obviously you have to test your code to get it working in the first place You can do ad hoc testing (running whatever tests.
Hosted Git github. From an alumni (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for the.
Testing Dr. Andrew Wallace PhD BEng(hons) EurIng
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
Version control Using Git 1Version control, using Git.
Classes, Objects, Arrays, Collections and Autoboxing Dr. Andrew Wallace PhD BEng(hons) EurIng
Git – versioning and managing your software L. Grewe.
Source Code Control CSE 3902 Matt Boggus. Source code control options for CSE 3902 Must use source code control that is integrated with Visual Studio.
Version control Using Git Version control, using Git1.
Source Control Primer Patrick Cozzi University of Pennsylvania CIS Spring 2012.
Version Control. How do you share code? Discussion.
…using Git/Tortoise Git
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
CSC 216/001 Lecture 4. Unit Testing  Why is it called “unit” testing?  When should tests be written?  Before the code for a class is written.  After.
Test automation / JUnit Building automatically repeatable test suites.
Testing in NetBeans. SWC Testing The ideal test: When the test is passed, the product is ready for delivery! Ideal – but (almost) impossible –Number of.
CSC 395 – Software Engineering Lecture 10: Execution-based Testing –or– We can make it better than it was. Better...faster...agiler.
Introduction to GitHub Alex Bigazzi Dec. 4, 2013 ITS Lab GitHub Introduction1.
Documentation Dr. Andrew Wallace PhD BEng(hons) EurIng
JUnit Adam Heath. What is JUnit?  JUnit is a unit testing framework for the Java programming language  It allows developers to swiftly and easily test.
QUICK START OF GITHUB Lin Shuo-Ren 2013/3/6 1. Why We Should Control The Version Although it rains, throw not away your watering pot. All changes should.
Wordpress with Mina Automated Deployment Solution Jonathan Gravato DIG 4104c.
Version Control CSC 517 John Slankas. Version Control Managing files and directories, and the changes made to them over time. - Adapted from “Version.
Version Control Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
Version Control System Lisa Palathingal 03/04/2015.
Intro to Git presented by Brian K. Vagnini Hosted by.
Eclipse Project. Installing Visit to download a copy for your home computerhttp:// –Get Release version 3.0 (or.
JUnit. Introduction JUnit is an open source Java testing framework used to write and run repeatable tests JUnit is integrated with several IDEs, including.
1 CSC 216 Lecture 3. 2 Unit Testing  The most basic kind of testing is called unit testing  Why is it called “unit” testing?  When should tests be.
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
© 2015 by Herb Holyst Introduction to git Cytomics Workshop December, 2015.
SECTION 1: CODE REASONING + VERSION CONTROL slides borrowed and adapted from Alex Mariakis and CSE 390a Justin Bare & Deric Pang.
Hosted Git github. From an alumnus (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for.
Defensive Programming. Good programming practices that protect you from your own programming mistakes, as well as those of others – Assertions – Parameter.
Unit Testing in Eclipse Presented by David Eisler 08/09/2014.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
1. A new git is initialized as a remote repository JohnRemote repositoryPeter master C0 CodingWhileBlack.com PROPEL CODING
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Source Code Control For CSE 3902 By: Matt Boggus.
M.Sc. Juan Carlos Olivares Rojas
Git primer Landon Cox January 19, 2017.
11 Version control (part 2)
Version Control.
Discussion 11 Final Project / Git.
L – Modeling and Simulating Social Systems with MATLAB
Version Control overview
Introduction to JUnit CS 4501 / 6501 Software Testing
Version control, using Git
Installing and running the local check projects in Eclipse
Storing, Sending, and Tracking Files Recitation 2
SU Development Forum Introduction to Git - Save your projects!
Akshay Narayan git up to speed with RCS Akshay Narayan
Source Code Management
JUnit 28-Nov-18.
CS122B: Projects in Databases and Web Applications Winter 2018
GitHub A Tool for software collaboration James Skon
Git CS Fall 2018.
Introduction to Git and GitHub
Testing 24-Feb-19.
GitHub and Git.
Patrick Cozzi University of Pennsylvania CIS Fall 2012
CS122B: Projects in Databases and Web Applications Winter 2019
Version/revision control via git
Git GitHub.
CS122B: Projects in Databases and Web Applications Spring 2018
Defensive Programming
Presentation transcript:

GIT and JUnit Dr. Andrew Wallace PhD BEng(hons) EurIng

Overview Version control Git JUnit

Version Control Managing change Cooperation between people within a team Problem correction Alternative versions

Version Control Repository Check in Check out File locking Merging Labels and tagging Branching

Git Distributed version control Own copy of source directory Snapshot of the source directory Eclipse comes with GIT It needs setting up

Git Set up an account on a Git server GitLab Set up a new Git repository Generate an SSH key and add it GitLab Eclipse Commit code to GitHub

Git Set up an account CS servers Use CS account

Git

Now create a project Use to deposit code

Git

Now you need to copy in a key from Eclipse If you don’t have one, create one

Git

Now set up a remote connection so Eclipse can talk to GitLab You will need the info from GitLab

Git

Now set up windows You need to set an environment variable

Git

Now you can create a repository in on your local machine Then add the code to GitLab

Git

Now you can use Git Commit your code

Git

Team Push Pull Merge tool Branching Advanced -> tag Project and file Different Team menus.

JUnit Test your code in parts! Create a JUnit test case Write the test code Use asserts Run the test case

JUnit

import org.junit.Assert.*; public class TestMyClass public static void setUpClass() throws public static void setup() throws public void testMethod(){} } class

JUnit

Asserts assertEquals(boolean expected, boolean actual) assertTrue(boolean expected, boolean actual) assertFalse(boolean expected, boolean actual) assertNotNull(Object object) assertSame(Object object) assertNotSame(Object object) assertArrayEquals(Object object)

JUnit Use asserts to check for things that should never happen Array over runs Null pointers Wrong values Divide by zero Check your assumptions Use exceptions for things that can go wrong! IO errors Memory errors User inputs

JUnit Sunny Day Test for what you expect As specified What can go wrong?

Questions?