introduction to junit, svn, ctipdslab.konkuk.ac.kr/class/2015/15sma/team_project/5/[team4... ·...

38
Introduction to JUnit, SVN, CTIP <Team 4> 201111354 박정민 201111356 박준한 201111384 정국빈

Upload: others

Post on 18-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Introduction to

JUnit, SVN, CTIP

<Team 4>201111354 박정민201111356 박준한201111384 정국빈

Page 2: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Index

CI & CTIP

Tools

Development Tools

Version Control

Build Server

Web-based Project management Program

38 - 2

Page 3: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

CI & CTIP

3

38 - 3

Page 4: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

CI(Continuous Intergration)

4

What is CI?

지속적인 통합이란 말로 프로젝트에

참여중인 개발자들의 결과물을 지속

적으로 통합하고, build함으로써 각자

의 저작물을 통합할 때 생기는 문제를

예방하기 위해 도입

기능

자동화된 단위테스트, 서버환경에서

주기적으로 commit시 build, 정적,

동적 test 성능 측정, 소스코드로부터

자동 문서화된 작업등을 거침.

38 - 4

Page 5: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

CTIP

5

What is CTIP?

Continuous integration + Continuous Test

= Continuous Test & Integration Platform.

CI

CTIP

38 - 5

Page 6: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Flow of CTIP

6

38 - 6

Page 7: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Development Tools

7

38 - 7

Page 8: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Eclipse

8

What is Eclipse?

코딩, 디버그, 컴파일, 배포 등 프로그램 개발에 관련된 모든 작업을 하나

의 프로그램 안에서 처리하는 IDE 소프트웨어

Environment Setting

Eclipse version: Luna 4.4.1 or 4.4.2

encoding: utf-8

JDK compiler 1.7 or 1.7(JDK 7 or 8)

38 - 8

Page 9: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

JUnit(Unit Test Tool)

9

What is JUnit?

반복적인 어떤 테스트를 작성하기 위한 간단한 unit testing framework

으로, 특별히 자바 프로그래밍에 사용되며, 오픈 소스로 제공

Goal

Unit 단위로 나눠서 testing하여 각 Unit을 검증하는 것

Unit?

Procedural programming

Entire module, individual function or procedure.

Object-oriented programming

Entire interface (e.g. class), individual method.

38 - 9

Page 10: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

JUnit

10

Limitations

모든 기능이나 예외를 다 test 해볼 수 없기 때문에, 100%의 에러를 찾아

내지는 못한다

Benefits

테스트검증을별도의클래스에서작성하며이테스트클래스를실제소스와함

께보관할수있어테스트가체계적으로관리될수있도록한다.

테스트결과를 Test클래스로남김으로개발자에게테스트방법및클래스의

History 제공

Version: JUnit 4

38 - 10

Page 11: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

JUnit 설치 방법

11

프로젝트 생성시 라이브러리에 추가

38 - 11

Page 12: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

JUnit 설치 방법

12

기존 프로젝트에 라이브러리 추가

38 - 12

Page 13: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

JUnit Test Case 생성 방법

13

1) Test Case 생성

38 - 13

Page 14: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

JUnit Test Case 생성 방법

14

38 - 14

Page 15: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

JUnit Test Case 생성 후 예시

15

38 - 15

Page 16: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

JUnit Annotation

16

JDK5.0 이상부터적용되는문법으로, 패키지부터변수까지@를이용하여메

타데이터정보를선언할수있는기능이다.

38 - 16

Page 17: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

JUnit AssertMethod

17

결과를비교하는여러method를 제공한다

Asset Method Description

assertArrayEquals(a, b); 배열 A와 B가 일치함을 확인한다.

assertEquals(a, b); 객체 A와 B가 일치함을 확인한다.

assertNot Equals(a, b); 객체 A와 B가 불일치함을 확인한다.

assertSame(a, b);객체 A와 B가 같은 객체임을 확인한다. assertEquals(a, b);는 두 객체의 값이 같은가를 검사하는 데에 반해 assertSame(a, b);는 두 객체가 동일한가, 즉 하나의객체인가를 확인한다. (== 연산자)

assertTrue(a); 조건 A가 참인가를 확인한다.

assertNotNull(a); 객체 A가 Null이 아님을 확인한다.

38 - 17

Page 18: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

JUnit Test 실행 및 결과

18

38 - 18

Page 19: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Version Control Tools

19

38 - 19

Page 20: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

SVN(Version Control)

20

What is Version Control?

파일의 변경 이력을 관리하는 시스템으로,

소스코드나 문서 파일의 수정 이력을 보관

하고 관리하는 것

What is SVN?

Subversion의 줄임말. Open source 버전

관리 프로그램으로, 소스 공유 환경을 제공.

38 - 20

Page 21: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

SVN설치

21

38 - 21

Page 22: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

SVN설치(Eclipse SVN Client)

22

38 - 22

Page 23: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

SVN설치(SVN Connector)

23

38 - 23

Page 24: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

SVN 사용법

24

38 - 24

Page 25: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

SVN Repository?

25

1. Repository

진행되고있는프로젝트의파일

이저장될곳이다.여기에개발자

들이네트워크를통해프로젝트

를공유하거나접근하게된다.

38 - 25

Page 26: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

SVN Repository?

26

2. Trunk

모두가공유하는작업공간.

3. Branches

임시로격리된작업공간. 개발

단계에서각자개발한소스가

저장되는공간.

4. Tags

릴리즈시릴리즈한파일을저

장하는공간.

38 - 26

Page 27: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Issue Tracker

27

38 - 27

Page 28: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Issue Tracker

28

What is Version Issue Tracker?

이슈 관리 시스템은 버그, 요구사항, 작업내용 등이 있을 때 해당 시스템에게

게시물 형태로 올리고 개발자, 테스터들이 작업 진행상황을 기록하는 시스템

Redmine

레드마인(Redmine)은오픈소스프로그램으로웹기반의프로젝트관리와버그추적

기능을제공하는도구이다. 화면기반의프로젝트관리에도움이되도록달력과간트

차트를제공하고일정관리기능을제공한다. 레드마인은통합된프로젝트관리기능

과이슈추적, 여러가지형상관리기능을제공한다.

38 - 28

Page 29: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Redmine How to Use

29

1. 계정 등록

2. 프로젝트 생성

38 - 29

Page 30: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Redmine How to Use

30

3. 프로젝트 관리개요 : 전체적인 프로젝트의 진행 상황을 확인할 수 있는 dashboard 형태

작업내역 : 일정 범위의 날짜 안에 이루어진 작업 목록 (현재 비어있음)

38 - 30

Page 31: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Redmine How to Use

31

3. 프로젝트 관리새 일감 만들기 : 새로운 일감 등록 / 담당자, 중요도, 날짜 등을 지정할 수 있다.

38 - 31

Page 32: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Redmine How to Use

32

4. 사용자 및 그룹 관리왼쪽 상단 관리 사용자 활성화/삭제 : 서버에 가입한 사용자를 승인할 수 있다.

.

38 - 32

Page 33: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Redmine with SVN

33

SVN 연동

관리 설정 저장소 저장소 추가 url & svn 서버에 등록된 로그인

정보 입력

38 - 33

Page 34: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Redmine with SVN

34

SVN 연동

repository 정보와 commit 정보가 잘 뜨면 성공 !

38 - 34

Page 35: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Redmine with SVN

35

Commit 정보 연동(client에서 commit)

38 - 35

Page 36: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Redmine with SVN

36

Commit 정보 연동

redmine 작업내역 및 저장소에 commit 내용 즉시 update

38 - 36

Page 37: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Redmine with SVN(특징)

37

commit한 버전들 간의 비교 가능

최근 개정판에서 원하는 두 개의 버전을 아무 쌍으로나 선택한 후 (왼쪽에

선택하는 게 더 높은 버전이어야 한다.) 차이점 보기

38 - 37

Page 38: Introduction to JUnit, SVN, CTIPdslab.konkuk.ac.kr/Class/2015/15SMA/Team_project/5/[Team4... · 2015. 5. 4. · Introduction to JUnit, SVN, CTIP  201111354 박정민

Thank You!38

38 - 38