Effective Software
Project Collaboration
    using Eclipse
            okjsp
           2011.08




       jsp / eclipse 정보공유 http://okjsp.pe.kr
Schedule
1,2              이클립스 기본

 3        VCS & 빌드 도구 ANT

 4     이클립스와 협업 프로세스

5,6            이클립스 웹개발

7,…    이클립스와 테스트 자동화


       jsp / eclipse 정보공유 http://okjsp.pe.kr
0. Set up

• jdk 1.7
• eclipse 3.7 indigo
• tomcat 7.0.19
• mysql 5.5
• Github.com

             jsp / eclipse 정보공유 http://okjsp.pe.kr
JAVA_HOME




 jsp / eclipse 정보공유 http://okjsp.pe.kr
java -version




   jsp / eclipse 정보공유 http://okjsp.pe.kr
Ganymede




 jsp / eclipse 정보공유 http://okjsp.pe.kr
eclipse 3.4 JEE




    jsp / eclipse 정보공유 http://okjsp.pe.kr
1. 이클립스 개요

• Source Compile
• Project Build
• Tool positioning
• 개발 생산성 향상
• IDE

             jsp / eclipse 정보공유 http://okjsp.pe.kr
Source Compile

• javac
• eclipse auto compile
• src
• build or classes

             jsp / eclipse 정보공유 http://okjsp.pe.kr
Project Build


• build script
• ready for use


             jsp / eclipse 정보공유 http://okjsp.pe.kr
Tool positioning

요구분석                             usecase
 설계                              modeling
 개발                              IDE
테스트                              Testing Tool
릴리스                              build Tool



       jsp / eclipse 정보공유 http://okjsp.pe.kr
개발 생산성 향상

• requirement 확인
• control complexity
• refactoring
• automation

             jsp / eclipse 정보공유 http://okjsp.pe.kr
IDE


• coding
• compile/build
• run/debug


             jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 컴파일과 빌드의 차이점은?
• IDE의 기본 기능 세 가지는?


         jsp / eclipse 정보공유 http://okjsp.pe.kr
2. Hello World
       실행하기
• Java Application
• Java Web Application
• Console View
• Argument, Parameter, Method
  Signature


              jsp / eclipse 정보공유 http://okjsp.pe.kr
Start




jsp / eclipse 정보공유 http://okjsp.pe.kr
Perspective




  jsp / eclipse 정보공유 http://okjsp.pe.kr
Java Project




   jsp / eclipse 정보공유 http://okjsp.pe.kr
jsp / eclipse 정보공유 http://okjsp.pe.kr
Java Application


• main()
• Java Project


             jsp / eclipse 정보공유 http://okjsp.pe.kr
Create Class




   jsp / eclipse 정보공유 http://okjsp.pe.kr
Create Class




   jsp / eclipse 정보공유 http://okjsp.pe.kr
Hello World




  jsp / eclipse 정보공유 http://okjsp.pe.kr
Run




jsp / eclipse 정보공유 http://okjsp.pe.kr
Quick Access ^3




    jsp / eclipse 정보공유 http://okjsp.pe.kr
Console View
Console View                                 Preferences




               jsp / eclipse 정보공유 http://okjsp.pe.kr
Java Web Application


• servlet container
• Dynamic Web Project


             jsp / eclipse 정보공유 http://okjsp.pe.kr
Argument, Parameter,
    Method Signature
• Argument
 •main(String[] args)
• Parameter
 • key, value pairs transfer
 • Query String
• Method Signature
 • public static void main(String[] args)
                    jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 구구단 출력 프로그램을 자바
 프로젝트로 작성하기
• 웹 프로젝트로 구구단을 작성하기


       jsp / eclipse 정보공유 http://okjsp.pe.kr
3. 코드 네비게이션
• Reading Code
• Readability
• Find
• Open Resource
• Definition
• References
             jsp / eclipse 정보공유 http://okjsp.pe.kr
legend


• ctrl : ^
• alt : @
• shift : ~


              jsp / eclipse 정보공유 http://okjsp.pe.kr
Find/Search
•   찾기/바꾸기
    •   ^ + F
•   파일 찾기
    •   ^ + ~ + R, @ + n u
•   문자열 포함된 소스 찾기
    •   contextMenu + find
    •   ^ + H

                   jsp / eclipse 정보공유 http://okjsp.pe.kr
Find/Search #2
•   코드 패턴 찾기
    •   ^ + j, ^~ + j ; incremental find
    •   ^ + k, ^~ + k ; selection find
•   상속 관계 찾기
    •   ^ + t
•   메소드 찾기
    •   ^ + o ; Outline

                   jsp / eclipse 정보공유 http://okjsp.pe.kr
Find/Search #3
•   선언부 찾기
    •   ^ + leftClick
    •   f3
•   참조 소스 목록
    •   ctrl + shift + g
    •   contextMenu > References > Project
•   같은 변수 찾기
    •   형광펜


                        jsp / eclipse 정보공유 http://okjsp.pe.kr
Navigate

• 라인번호로 이동
 •^+L
• 중괄호({} brace) 처음과 끝
 • ctrl + shift + p
 • @ + ~ + 좌우화살표

          jsp / eclipse 정보공유 http://okjsp.pe.kr
Navigate #2

• 파일과 파일 사이 이동
 • ^ + f6
• 뒤로/앞으로
 • @ + 좌우 화살표

        jsp / eclipse 정보공유 http://okjsp.pe.kr
코드 비교하기


• compare with...
• replace with...


             jsp / eclipse 정보공유 http://okjsp.pe.kr
편집
• copy & paste
 • ^ + insert / ~ + insert
 •^+c/^+v
 • ^ + @ + 상하 화살표
• method copy/remove
• outline view에서 copy/remove
            jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제
• 오픈소스 프로젝트 import 하기
• 편집기 단축키 중 ctrl+shift+R의
 역할은?
• 자바 편집기에서 ctrl+shift+G의
 역할은?
• 클래스, 메소드, 변수의 선언위치로
 이동하는 단축키는?

          jsp / eclipse 정보공유 http://okjsp.pe.kr
4. 프로젝트 기반의
    소스 아키텍처
• 개발 표준
• 소스 디렉토리 구조
• 서비스 디렉토리 구조
• 버젂관리 해야할 것
• 빌드 스크립트의 가변성

       jsp / eclipse 정보공유 http://okjsp.pe.kr
개발 표준


• 용어집
• 코딩 컨벤션
• CRUD 코드 샘플


         jsp / eclipse 정보공유 http://okjsp.pe.kr
소스 디렉토리 구조
•   src
    •   src/java
    •   src/test
•   WebContent
    •   WebContent/WEB-INF/web.xml
    •   WebContent/WEB-INF/lib
    •   WebContent/WEB-INF/classes
•   docs

                    jsp / eclipse 정보공유 http://okjsp.pe.kr
서비스 디렉토리 구조

• Context Root
• /WEB-INF/web.xml
• /WEB-INF/lib
• /WEB-INF/classes

             jsp / eclipse 정보공유 http://okjsp.pe.kr
버젂관리 해야할 것

• src
• WebContent/
• .ignore
• project configuration

             jsp / eclipse 정보공유 http://okjsp.pe.kr
빌드 스크립트의
     가변성

• properties 이용
• relative path


           jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 다이나믹 웹 프로젝트 기본 폴더
 구조는?




        jsp / eclipse 정보공유 http://okjsp.pe.kr
5. 프로퍼티 에디터
  플러그인 설치하기

• Properties의 특성
• 프로젝트 내에서 properties 파일의
  위치
• propedit plugin

             jsp / eclipse 정보공유 http://okjsp.pe.kr
Update Site URL




http://propedit.sourceforge.jp/eclipse/updates/


                  jsp / eclipse 정보공유 http://okjsp.pe.kr
Software Updates




     jsp / eclipse 정보공유 http://okjsp.pe.kr
Check plugin & Install




        jsp / eclipse 정보공유 http://okjsp.pe.kr
Plugin Licenses




    jsp / eclipse 정보공유 http://okjsp.pe.kr
Install Complete




     jsp / eclipse 정보공유 http://okjsp.pe.kr
Software Updates
• Installed Software
 • Update...
 • Uninstall...
 • Revert Configuration...
• Available Software
 • Update site url
             jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제

• 플러그인 설치의 두 가지 방법을
  기술
• AnyEdit plugin
• Subversive plugin
• pathtools

             jsp / eclipse 정보공유 http://okjsp.pe.kr
6. Mylyn과 작업리스트


• Mylyn 개요
• ToDo 리스트의 관리
• 일정관리


         jsp / eclipse 정보공유 http://okjsp.pe.kr
New Task




 jsp / eclipse 정보공유 http://okjsp.pe.kr
Mylyn 개요
• Task List
 • Planning
 • Context
• Category
• Activate Task
 • Focus on Active Task
            jsp / eclipse 정보공유 http://okjsp.pe.kr
Task List




 jsp / eclipse 정보공유 http://okjsp.pe.kr
ToDo 리스트의 관리


• Context 와 연결
• 우선숚위
• Estimation


          jsp / eclipse 정보공유 http://okjsp.pe.kr
일정관리

• Personal Planning
 • Scheduled for
 • Due
 • Estimated hours

             jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제



• Mylyn과 구글의 이슈트래커와 연결



        jsp / eclipse 정보공유 http://okjsp.pe.kr
Day-2



jsp / eclipse 정보공유 http://okjsp.pe.kr
이클립스 서브버전 플러그인
     Subversive


• Ganymede project
• Polarion license
• Team UI


             jsp / eclipse 정보공유 http://okjsp.pe.kr
eclipse.org/subversive




        jsp / eclipse 정보공유 http://okjsp.pe.kr
Subversive Update URL




       http://www.polarion.com/products/svn/subversive.php?src=eclipseproject



       jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 오픈소스 프로젝트 호스팅 서비스와
 서브버젂 플러그인을 연결해서
 프로젝트 소스를 가져오기




       jsp / eclipse 정보공유 http://okjsp.pe.kr
Version Control System 기본
•   버전관리 라이프사이클
•   import
•   add
•   commit
•   checkout
•   update
•   repository
•   sandbox

                 jsp / eclipse 정보공유 http://okjsp.pe.kr
젂통적인 개발방식

          server

 client                                           개발자
browser                          ftp, telnet       A


                                 ftp, telnet
                                                  개발자
                                                   B




          jsp / eclipse 정보공유 http://okjsp.pe.kr
VCS를 이용한 개발
              server
                                                         개발자
 client                                                   A
browser
                                      VCS
                   build


                                                         개발자
                                                          B



                 : sandbox;
          VCS서버와 sync되는 소스 작업공간




                 jsp / eclipse 정보공유 http://okjsp.pe.kr
용어
• 저장소 Repository
버젂 관리되는 파일이 저장되는 서버의 기준 디렉토리

• 모듈 Module
저장소의 하위 단위, 한 모듈은 보통 하나의 프로젝트

• 체크아웃 checkout
모듈을 작업자의 PC로 가져오는 명령

• 샌드박스 sandbox
파일의 수정이 가능한 VCS서버와 동기화되는 작업공간.

• 전송 Commit
작업 완료된 파일을 VCS서버에 반영


            jsp / eclipse 정보공유 http://okjsp.pe.kr
Source Repository




    Image from: http://designpatternschash.blogspot.com/2008/09/what-is-tortoise-svn.html




          jsp / eclipse 정보공유 http://okjsp.pe.kr
Update, Commit




   Image from: http://designpatternschash.blogspot.com/2008/09/what-is-tortoise-svn.html




         jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제
•   VCS 용어의 의미를 기술
    •   import
    •   commit
    •   update
    •   conflict
    •   repository
    •   sandbox

                     jsp / eclipse 정보공유 http://okjsp.pe.kr
소스의 공유와 배포에 관하여

• Sandbox
• Update Frequently
• Commit by function unit
• Team Communication
• Time Gap

             jsp / eclipse 정보공유 http://okjsp.pe.kr
Process




jsp / eclipse 정보공유 http://okjsp.pe.kr
VCS Best Practices

•   작업 시작 젂에 항상 project update를 시행
•   완료된 파일은 매일 점심 식사 젂과 퇴근
    젂에 젂송(Commit)
•   충돌이 자주 생기는 파일은 해당
    작업자들간의 의사소통이 잘 안 된다는 표시
•   에러가 난 파일은 해결될 때까지
    젂송(Commit) 자제


              jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제

• VCS를 이용한 공유시 소스의 이력을
 볼 수 있는 방법은?
• 웹 애플리케이션 배포시 이상이
 생겼을 경우 원상복구를 빨리 할 수
 있는 방법을 기술하시오.



        jsp / eclipse 정보공유 http://okjsp.pe.kr
버젂 비교하기


• Compare with ...
• Source Tree Time Machine


             jsp / eclipse 정보공유 http://okjsp.pe.kr
Show in History




    jsp / eclipse 정보공유 http://okjsp.pe.kr
https svn trust




    jsp / eclipse 정보공유 http://okjsp.pe.kr
History View




   jsp / eclipse 정보공유 http://okjsp.pe.kr
Compare With ...




     jsp / eclipse 정보공유 http://okjsp.pe.kr
Get Content




  jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 히스토리 뷰에서 과거 소스의 내용을
 가져와 현재의 소스에 적용하는 방법
• 일주일 전 프로젝트 소스 가져오기


       jsp / eclipse 정보공유 http://okjsp.pe.kr
ANT 빌드스크립트 만들기


• project
• target
• task


            jsp / eclipse 정보공유 http://okjsp.pe.kr
Ant.apache.org




    jsp / eclipse 정보공유 http://okjsp.pe.kr
Ant Outline




  jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 이클립스IDE와 빌드툴의 차이
• 기존 프로젝트에 ANT 빌드
 스크립트를 적용하기




        jsp / eclipse 정보공유 http://okjsp.pe.kr
ANT를 이용한 자동화
• Build Script
• Crontab
• Conditional Build based on
  property
• javadoc
• JUnit
             jsp / eclipse 정보공유 http://okjsp.pe.kr
ftp task
<target name="upload" depends="publish" description="ftp upload
    text files">
  <ftp server="${ftp.server}" port="21"
    remotedir="${ftp.remotedir}"
       userid="${ftp.userid}" password="${ftp.password}"
       depends="yes“ binary="yes">
    <fileset dir="${publish.home}">
      <!-- jsp 파일 업로드 -->
      <include name=“**/*.jsp"/>

     <!-- class 파일과 resources 업로드 -->
     <include name="WEB-INF/classes/kr/**/*.class"/>

      <!-- 정적인 파일 업로드 -->
      <include name="**/*.htm*"/>
    </fileset>
  </ftp>
</target>

                        jsp / eclipse 정보공유 http://okjsp.pe.kr
Optional Task




   jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• ftp를 이용하려면 필요한 라이브러리
• 빌드날짜가 포함된 jar 파일
 생성하기




        jsp / eclipse 정보공유 http://okjsp.pe.kr
Day-3



jsp / eclipse 정보공유 http://okjsp.pe.kr
1. 지속적인 통합
 Continuous Integration

• 주기적인 빌드를 통해서 프로젝트 팀
 간의 인터페이스 격차를 조기에 발견
• 빅뱅통합에 드는 비싼 비용을 절감
• PC급의 빌드 서버 활용

       jsp / eclipse 정보공유 http://okjsp.pe.kr
Commit Time issue

• interfaces, xml small but
  important files
• break whole build
• fear of commit
• short periodical commit time
  interval


             jsp / eclipse 정보공유 http://okjsp.pe.kr
Best Practices
•   Maintain a Single Source Repository.

•   Automate the Build

•   Make Your Build Self-Testing

•   Everyone Commits Every Day

•   Build the Mainline on an Integration Machine

•   Keep the Build Fast

•   Test in a Clone of the Production Environment

•   Make it Easy for Anyone to Get the Latest Executable

•   Everyone can see what's happening

•   Automate Deployment




                                 jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 지속적인 통합의 장점 세 가지 기술
• 지속적인 통합의 프랙티스 열 가지
 기술




        jsp / eclipse 정보공유 http://okjsp.pe.kr
2. Hudson 개요


• Building/testing software project
  continuously
• Monitoring execution of
  externally-run jobs



             jsp / eclipse 정보공유 http://okjsp.pe.kr
Hudson Plugins
   •    installation
       •    Using interface
           •     http://yourhost/hudson/managePlugins
       •    Download
           •     download *.hpi file into
           •     $HUDSON_HOME/plugins
source: http://wiki.hudson-ci.org/display/HUDSON/Plugins


                                      jsp / eclipse 정보공유 http://okjsp.pe.kr
Hudson Plugins #1
• Source code management
• Build triggers
• Build tools
• Build wrappers
• Build notifiers
• Slave launchers and controllers
             jsp / eclipse 정보공유 http://okjsp.pe.kr
Hudson Plugins #2
• Build reports
• Artifact uploaders
• External site/tool integrations
• UI plugins
• Page decorators
• Misc
             jsp / eclipse 정보공유 http://okjsp.pe.kr
Hudson Plugins




    jsp / eclipse 정보공유 http://okjsp.pe.kr
Hudson Plugins




    jsp / eclipse 정보공유 http://okjsp.pe.kr
Findbugs plugin




    jsp / eclipse 정보공유 http://okjsp.pe.kr
Hudson Security


•   java -jar hudson.war
    --argumentsRealm.passwd.kenu=okpass
    --argumentsRealm.roles.kenu=admin




                   jsp / eclipse 정보공유 http://okjsp.pe.kr
Hudson Security




    jsp / eclipse 정보공유 http://okjsp.pe.kr
Hudson Security




    jsp / eclipse 정보공유 http://okjsp.pe.kr
Hudson Security




    jsp / eclipse 정보공유 http://okjsp.pe.kr
Hudson Security

•   Quick and Simple Security
    <http://hudson.gotdns.com/wiki/display/HUDSON/Quick+and+Simple+Security>

•   Standard Security Setup
    <http://hudson.gotdns.com/wiki/display/HUDSON/Standard+Security+Setup>

•   Apache frontend for security
    <http://hudson.gotdns.com/wiki/display/HUDSON/Apache+frontend+for+security>

•   Authenticating scripted clients
    <http://hudson.gotdns.com/wiki/display/HUDSON/Authenticating+scripted+clients>

•   Help! I locked myself out!
    <http://hudson.gotdns.com/wiki/display/HUDSON/Disable+security>




                               jsp / eclipse 정보공유 http://okjsp.pe.kr
Eclipse plugin




source: http://code.google.com/p/hudson-eclipse/

                       jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제

• Hudson의 두 가지 목적은?
• Hudson 플러그인 설치 방법 두 가지
• Hudson의 기본인증 기능을 설치하기
• 구글 메싞저와 연결하기

         jsp / eclipse 정보공유 http://okjsp.pe.kr
3. Hudson과
Subversion 연결


   jsp / eclipse 정보공유 http://okjsp.pe.kr
Check out URL




   jsp / eclipse 정보공유 http://okjsp.pe.kr
Job Configure




   jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제



• 오픈소스 프로젝트와 Hudson 연결



        jsp / eclipse 정보공유 http://okjsp.pe.kr
4. 개발프로세스에서
  이클립스 포지셔닝



   jsp / eclipse 정보공유 http://okjsp.pe.kr
jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 이클립스 프로젝트의 Ant
 빌드스크립트를 만들고 Hudson을
 통해 개발서버에 배포하기




        jsp / eclipse 정보공유 http://okjsp.pe.kr
5. Eclipse Communication
        Framework



         jsp / eclipse 정보공유 http://okjsp.pe.kr
ECF in Ganymede




    jsp / eclipse 정보공유 http://okjsp.pe.kr
jsp / eclipse 정보공유 http://okjsp.pe.kr
Real-time Shared Editing




                          http://www.vimeo.com/1195398?pg=embed&sec=1195398




         jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• ECF 프레임워크를 통해서 짝
 프로그래밍하기




        jsp / eclipse 정보공유 http://okjsp.pe.kr
6. 프로젝트 Health Check




       jsp / eclipse 정보공유 http://okjsp.pe.kr
Health Check




   jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제

• 프로젝트 모니터링을 위해 Hudson에
 메일 설정하기
• JUnit Report 설정하기
• Findbugs를 통해 프로젝트 버그 정적
 분석하기


         jsp / eclipse 정보공유 http://okjsp.pe.kr
Day-4



jsp / eclipse 정보공유 http://okjsp.pe.kr
1. 웹프로젝트의 특징


• ServerSide Script
• ClientSide Script


             jsp / eclipse 정보공유 http://okjsp.pe.kr
Java Project
Dynamic Web Project




      jsp / eclipse 정보공유 http://okjsp.pe.kr
설정 파일 비교




  jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 서버 사이드 스크립트와 클라이언트
 사이드 스크립트의 런타임 차이점
• Client/Server 애플리케이션과 웹
 애플리케이션의 차이점



          jsp / eclipse 정보공유 http://okjsp.pe.kr
2. 톰캣 서버 연결



• Target Runtime



             jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제

• 톰캣 서버 포트를 8080에서 9090으로
 변경하기
• 프로젝트 퍼블리쉬하지 않게 설정
 조정하기
• 자바 프로젝트와 다이나믹 웹
 프로젝트의 차이점


         jsp / eclipse 정보공유 http://okjsp.pe.kr
3. JSP/Servlet 만들기



      jsp / eclipse 정보공유 http://okjsp.pe.kr
Servlet 만들기




   jsp / eclipse 정보공유 http://okjsp.pe.kr
Servlet 클래스




   jsp / eclipse 정보공유 http://okjsp.pe.kr
URL Mapping




  jsp / eclipse 정보공유 http://okjsp.pe.kr
Servlet Template




     jsp / eclipse 정보공유 http://okjsp.pe.kr
doGet()

response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<h1>Hello World</h1>");
out.close();



               jsp / eclipse 정보공유 http://okjsp.pe.kr
URL mapping




  jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제



• DB를 이용해 방명록 만들기



        jsp / eclipse 정보공유 http://okjsp.pe.kr
4. 한글 인코딩 처리



    jsp / eclipse 정보공유 http://okjsp.pe.kr
Java Hangul


new String(string.getBytes("8859_1"), "ms949");


new String(string.getBytes("ms949"), "8859_1");




                  jsp / eclipse 정보공유 http://okjsp.pe.kr
홖경변수

System.getProperty("user.language");


JAVA_OPTS="-Duser.language=en"
JAVA_OPTS="-Duser.language=ko"



             jsp / eclipse 정보공유 http://okjsp.pe.kr
JSP encoding

<%@ page pageEncoding="ms949" %>


<%@ page
  contentType="text/html;charset=ms949"
  %>



              jsp / eclipse 정보공유 http://okjsp.pe.kr
JSP encoding
request.setCharacterEncoding("ms949");


Filter
<filter>
     <filter-name>Set Character Encoding</filter-name>
     <filter-class>filters.SetCharacterEncodingFilter</filter-class>
     <init-param>
      <param-name>encoding</param-name>
      <param-value>utf-8</param-value>
     </init-param>
</filter>

<filter-mapping>
     <filter-name>Set Character Encoding</filter-name>
     <url-pattern>/*</url-pattern>
</filter-mapping>


                             jsp / eclipse 정보공유 http://okjsp.pe.kr
한글 문제 처리 방법

• 다른 DB클라이언트로 한글 확인
• 인코딩 함수 모두 제거 후 점진 적용
• 브라우저의 소스보기에서 한글 확인
• 중간단계의 한글 깨짐 해결
 우선숚위는 최하위로


        jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제

• 자바에서의 캐릭터 인코딩 처리 기술
• JSP의 인코딩 처리 기술
• 한글 문제 처리 방법
• HTTP에서의 인코딩 처리 기술

       jsp / eclipse 정보공유 http://okjsp.pe.kr
5. Spring 웹
  프레임워크 다루기


• JPetStore 샘플을 통해서 스프링
 프레임워크 숙지




         jsp / eclipse 정보공유 http://okjsp.pe.kr
warfile.bat 실행




    jsp / eclipse 정보공유 http://okjsp.pe.kr
hsqldb 서버 기동




    jsp / eclipse 정보공유 http://okjsp.pe.kr
import war file




    jsp / eclipse 정보공유 http://okjsp.pe.kr
Import src




  jsp / eclipse 정보공유 http://okjsp.pe.kr
JPetStore 실행




   jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제
•   Spring Framework 에서 다음을 순서대로
    나열하시오
    •   Controller
    •   DAO
    •   Service
    •   JSP
    •   applicationContext.xml

                     jsp / eclipse 정보공유 http://okjsp.pe.kr
6. 원격 서버 배포하기



    jsp / eclipse 정보공유 http://okjsp.pe.kr
배포시 주의사항

• 개발 서버는 Hudson 등을 통해
 자동화 가능
• 운영계는 원상복구에 대한 이슈가
 크기 때문에 심볼릭 링크 등을
 통해서 빠르게 원복할 수 있도록 함



          jsp / eclipse 정보공유 http://okjsp.pe.kr
ftp ant task 등
<ftp server="${ftp.server}"
       port="21"
       remotedir="${ftp.remotedir}"
       userid="${ftp.userid}"
       password="${ftp.password}"
       depends="yes"
       binary="yes"
>
    <fileset dir="${publish.home}">
      <include name="images/**/*.gif"/>
      <include name="images/**/*.jpg"/>
      <include name="WEB-INF/lib/*.jar"/>
      <include name="WEB-INF/classes/*.class"/>
    </fileset>
</ftp>



                                jsp / eclipse 정보공유 http://okjsp.pe.kr
Remote System Explorer




        jsp / eclipse 정보공유 http://okjsp.pe.kr
RSE Ftp




jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 톰캣에서 war 파일로 프로젝트
 배포하기
• ant의 ftp 태스크를 이용해서
 배포하기



         jsp / eclipse 정보공유 http://okjsp.pe.kr
Day-5



jsp / eclipse 정보공유 http://okjsp.pe.kr
이클립스와 테스트 자동화
• 1. 이클립스에서 지원하는 테스트케이스
• 2. JUnit 이해하기
• 3. 테스트케이스와 리팩토링
• 4. Findbugs 플러그인을 통한 품질향상
• 5. JUnit과 Findbugs의 지속적인 리포트
• 6. Selenium을 이용한 웹 UI 레코딩 테스트
            jsp / eclipse 정보공유 http://okjsp.pe.kr
1. 이클립스에서
지원하는 테스트케이스

• 테스트케이스는 입력값과 출력값을
 지정해서 테스트 되는 함수가 그
 조건의 충족 여부를 확인 가능한
 프로그램
• assertEquals(예상출력, 함수(입력));

          jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트의 자동화
• 테스트케이스는 프로그램으로
 자동화해야 한다.
• 품질은 테스트의 범위와 실행 횟수에
 영향을 받는다.
• 수작업의 테스트는 기한 내 테스트
 실행 횟수를 감소시킨다.
• 테스트는 빨리 쉽게 수행 가능해야
 한다.
       jsp / eclipse 정보공유 http://okjsp.pe.kr
Test Harness

• Scaffold
• Outside of Application
• Fine grained TestCases
• It’s useful for changing software
• Acrobatic with safety net

             jsp / eclipse 정보공유 http://okjsp.pe.kr
jsp / eclipse 정보공유 http://okjsp.pe.kr
jsp / eclipse 정보공유 http://okjsp.pe.kr
TestCase 제작




   jsp / eclipse 정보공유 http://okjsp.pe.kr
TestCase 제작




   jsp / eclipse 정보공유 http://okjsp.pe.kr
TestCase 제작




   jsp / eclipse 정보공유 http://okjsp.pe.kr
TestCase 제작
package net.okjsp;
import junit.framework.TestCase;
public class HelloWorldTest extends
  TestCase {
}



             jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 메소드




  jsp / eclipse 정보공유 http://okjsp.pe.kr
assert...

•   assertTrue(실행결과);
•   assertFalse(실행결과);
•   assertEquals(목적값, 실행결과);
•   assertEquals(float목적값, 실행결과,
    오차범위);



              jsp / eclipse 정보공유 http://okjsp.pe.kr
일단 테스트 고




  jsp / eclipse 정보공유 http://okjsp.pe.kr
JUnit Result




   jsp / eclipse 정보공유 http://okjsp.pe.kr
컴파일 되게 만들기




   jsp / eclipse 정보공유 http://okjsp.pe.kr
컴파일 되게 만들기




   jsp / eclipse 정보공유 http://okjsp.pe.kr
다시 테스트 고




  jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 통과하게 하기




    jsp / eclipse 정보공유 http://okjsp.pe.kr
기능 추가하기




  jsp / eclipse 정보공유 http://okjsp.pe.kr
컴파일 되게 만들기




   jsp / eclipse 정보공유 http://okjsp.pe.kr
다시 테스트 고




  jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 통과하게 하기




    jsp / eclipse 정보공유 http://okjsp.pe.kr
리팩토링 하기-중복제거
    재홗용




    jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 히스토리




  jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 조건 강화하기




    jsp / eclipse 정보공유 http://okjsp.pe.kr
다시 테스트 고




  jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 통과하게 하기




    jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트에 관하여




  jsp / eclipse 정보공유 http://okjsp.pe.kr
Test and Debug




    jsp / eclipse 정보공유 http://okjsp.pe.kr
참고

• http://junit.org
• http://www.eclipse.org
• http://xper.org
• http://okjsp.tistory.com/tag/test


             jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제



• 테스트케이스란?



       jsp / eclipse 정보공유 http://okjsp.pe.kr
2. JUnit 이해하기
•    java version of xUnit family.
    • CPPUnit, JSUnit, ASUnit,
      httpUnit…
• Kent Beck, Erich Gamma
• assert
• TestCase, TestSuite
• Matter of S/W quality.
               jsp / eclipse 정보공유 http://okjsp.pe.kr
sf.net/projects/junit




       jsp / eclipse 정보공유 http://okjsp.pe.kr
TestCase
• Ver3.8.x
• Extends TestCase
• assertTrue
• assertEquals
• Ver4.x
• Annotation
             jsp / eclipse 정보공유 http://okjsp.pe.kr
TestSuite


• AllTests
• Group of TestCases
• Regression Test Automation


             jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• JUnit 테스트케이스로 디버깅하기
• TestCase와 TestSuite 구분하기


          jsp / eclipse 정보공유 http://okjsp.pe.kr
3. 테스트케이스와
    리팩토링



   jsp / eclipse 정보공유 http://okjsp.pe.kr
리팩토링 하기




  jsp / eclipse 정보공유 http://okjsp.pe.kr
리팩토링 하기-inline




     jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 스위트




  jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 스위트




  jsp / eclipse 정보공유 http://okjsp.pe.kr
젂체 테스트하기




  jsp / eclipse 정보공유 http://okjsp.pe.kr
정리-테스트 리듬
•   Rhythm
    • TestCase
    • Change Small Code
    • All Test
    • Refactoring
    • All Test
•   돌다리도 두드려 가라.
•   모래 코드 위에 코드를 추가하지 말라.

           jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 코드 분리하기-
   소스폴더




    jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 코드 분리하기-
   소스폴더




    jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 코드 분리-Move




     jsp / eclipse 정보공유 http://okjsp.pe.kr
테스트 코드 분리-Move




     jsp / eclipse 정보공유 http://okjsp.pe.kr
다시 테스트 고




  jsp / eclipse 정보공유 http://okjsp.pe.kr
JUnit Beyond




   jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• 리팩토링이란?
• 리팩토링과 테스트케이스의 관계?


       jsp / eclipse 정보공유 http://okjsp.pe.kr
4. Findbugs 플러그인을
     통한 품질향상




      jsp / eclipse 정보공유 http://okjsp.pe.kr
from




• http://findbugs.sourceforge.net

             jsp / eclipse 정보공유 http://okjsp.pe.kr
What for
• Find Java Program Bugs
• Search by bug patterns
• Search for compiled byte code
 • Refer source code for Human
   Readable
• Provide fix guide for each bug
              jsp / eclipse 정보공유 http://okjsp.pe.kr
Tool
• Command line
• Desktop Application
  • Java Web Start; jnlp
• Plugin
  • IDE:
    • Eclipse, NetBeans …
  • Build Tool:
    • Ant, Maven
  • CI Tool :
    • Hudson
             jsp / eclipse 정보공유 http://okjsp.pe.kr
Command line
• Download, Unzip, set Path
• options
 • findbugs
   -textui
   -javahome /path/to/jdk1.5.0
   -xml
   -output findbugs.xml
   /path/to/classes

             jsp / eclipse 정보공유 http://okjsp.pe.kr
Desktop




jsp / eclipse 정보공유 http://okjsp.pe.kr
Eclipse plugin

• Update URL
 • http://findbugs.cs.umd.edu/eclips
   e/




             jsp / eclipse 정보공유 http://okjsp.pe.kr
Eclipse plugin-editor




       jsp / eclipse 정보공유 http://okjsp.pe.kr
Eclipse plugin-view




      jsp / eclipse 정보공유 http://okjsp.pe.kr
Eclipse plugin-perspective




          jsp / eclipse 정보공유 http://okjsp.pe.kr
Related
•   http://findbugs.sourceforge.net


•   https://hudson.dev.java.net


•   http://okjsp.tistory.com/tag/findbugs




                jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• Findbugs 이클립스 플러그인
 사용하기
• Hudson 플러그인으로 리포팅하기


         jsp / eclipse 정보공유 http://okjsp.pe.kr
5. JUnit과 Findbugs의
   지속적인 리포트



       jsp / eclipse 정보공유 http://okjsp.pe.kr
JUnit Ant Task
  •   junit-ant.jar, junit.jar
      copy to $ANT_HOME/lib/
<target name="test" depends="compile">
     <junit>
          <classpath refid="test.classpath"/>
          <test name="test.UnitTest"></test>
     </junit>
</target>




                      jsp / eclipse 정보공유 http://okjsp.pe.kr
junitreport
<mkdir dir="report/html"/>
<junit printsummary="on" haltonfailure="on">
     <classpath refid="test.classpath"/>
     <formatter type="xml"/>
     <batchtest todir="report">
          <fileset dir="dst">
                <include name="**/*Test*"/>
          </fileset>
     </batchtest>
</junit>
<junitreport todir="report">
     <fileset dir="report">
          <include name="TEST-*.xml"/>
     </fileset>
     <report format="frames" todir="report/html"/>
</junitreport>


                      jsp / eclipse 정보공유 http://okjsp.pe.kr
junitreport




  jsp / eclipse 정보공유 http://okjsp.pe.kr
Findbugs Ant Task
  •   $FINDBUGS_HOME/lib/findbugs-ant.jar
      copy to $ANT_HOME/lib/
<taskdef name="findbugs"
classname="edu.umd.cs.findbugs.anttask.FindBugsTask" />
<target name="findbugs" depends="compile">
    <findbugs home="${findbugs.home}"
           output="xml" outputFile="findbugs.xml"
           jvmargs="-Xms512M -Xmx1024M " timeout="1800000">
           <sourcePath path="WebContent/WEB-INF/src" />
           <class location="WebContent/WEB-INF/classes" />
      </findbugs>
</target>




                      jsp / eclipse 정보공유 http://okjsp.pe.kr
HUDSON Report


• https://hudson.dev.java.net/



             jsp / eclipse 정보공유 http://okjsp.pe.kr
How to use in our team
• Each one’s IDE; before commit;
• Using App’s Health Care
 • CI graph
• Code Review


             jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제


• JUnit과 Findbugs의 Ant 연결 파일과
 Ant Task 실행을 위해 파일을 복사할
 위치는 어디인가?




          jsp / eclipse 정보공유 http://okjsp.pe.kr
6. Selenium을 이용한
웹 UI 레코딩 테스트

• Overview
• Install
• UI Recording


             jsp / eclipse 정보공유 http://okjsp.pe.kr
• Install Firefox
 • http://getFirefox.com
• 도구 > 부가 기능
 • Search "Selenium"


             jsp / eclipse 정보공유 http://okjsp.pe.kr
install




jsp / eclipse 정보공유 http://okjsp.pe.kr
Selenium IDE




   jsp / eclipse 정보공유 http://okjsp.pe.kr
Recording




 jsp / eclipse 정보공유 http://okjsp.pe.kr
VerifyText




  jsp / eclipse 정보공유 http://okjsp.pe.kr
Replay




jsp / eclipse 정보공유 http://okjsp.pe.kr
tune




jsp / eclipse 정보공유 http://okjsp.pe.kr
TestCase




 jsp / eclipse 정보공유 http://okjsp.pe.kr
TestSuite




 jsp / eclipse 정보공유 http://okjsp.pe.kr
Selenium Core


• Selenium Core is a
  DHTML test execution framework.




             jsp / eclipse 정보공유 http://okjsp.pe.kr
연습문제



• 방명록 웹UI 테스트케이스 작성하기



        jsp / eclipse 정보공유 http://okjsp.pe.kr
정리

05.09             이클립스 기본

05.16   서브버젂과 빌드 도구 ANT

05.23   이클립스와 협업 프로세스

05.30           이클립스 웹개발

06.13   이클립스와 테스트 자동화


        jsp / eclipse 정보공유 http://okjsp.pe.kr
이클립스 기본
•   이클립스 개요
•   Hello World 실행하기
•   코드 네비게이션
•   프로젝트 기반의 소스 아키텍처
•   프로퍼티 에디터 플러그인 설치하기
•   Mylyn과 작업리스트


              jsp / eclipse 정보공유 http://okjsp.pe.kr
서브버젂과 빌드 도구 ANT

•   1. 이클립스 서브버젂 플러그인 Subversive
•   2. Version Control System 기본
•   3. 소스의 공유와 배포에 관하여
•   4. 버젂 비교하기
•   5. ANT 빌드스크립트 만들기
•   6. ANT를 이용한 자동화


                jsp / eclipse 정보공유 http://okjsp.pe.kr
이클립스와 협업 프로세스

•   1. 지속적인 통합 Continuous Integration
•   2. Hudson 개요
•   3. Hudson과 Subversion 연결
•   4. 개발프로세스에서 이클립스 포지셔닝
•   5. Eclipse Communication Framework
•   6. 프로젝트 Health Check


                 jsp / eclipse 정보공유 http://okjsp.pe.kr
이클립스 웹개발

•   1. 웹프로젝트의 특징
•   2. 톰캣 서버 연결
•   3. JSP/Servlet 만들기
•   4. 경우에 따른 인코딩 처리
•   5. Spring 웹 프레임워크 다루기
•   6. 원격 서버 배포하기


               jsp / eclipse 정보공유 http://okjsp.pe.kr
이클립스와 테스트 자동화

•   1. 이클립스에서 지원하는 테스트케이스
•   2. JUnit 이해하기
•   3. 테스트케이스와 리팩토링
•   4. Findbugs 플러그인을 통한 품질향상
•   5. JUnit과 Findbugs의 지속적인 리포트
•   6. Selenium을 이용한 웹 UI 레코딩 테스트


              jsp / eclipse 정보공유 http://okjsp.pe.kr
수고하셨습니다.
  이클립스로
행복한 개발하세요.

   jsp / eclipse 정보공유 http://okjsp.pe.kr

Collaboration with Eclipse final

  • 1.
    Effective Software Project Collaboration using Eclipse okjsp 2011.08 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 2.
    Schedule 1,2 이클립스 기본 3 VCS & 빌드 도구 ANT 4 이클립스와 협업 프로세스 5,6 이클립스 웹개발 7,… 이클립스와 테스트 자동화 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 3.
    0. Set up •jdk 1.7 • eclipse 3.7 indigo • tomcat 7.0.19 • mysql 5.5 • Github.com jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 4.
    JAVA_HOME jsp /eclipse 정보공유 http://okjsp.pe.kr
  • 5.
    java -version jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 6.
    Ganymede jsp /eclipse 정보공유 http://okjsp.pe.kr
  • 7.
    eclipse 3.4 JEE jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 8.
    1. 이클립스 개요 •Source Compile • Project Build • Tool positioning • 개발 생산성 향상 • IDE jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 9.
    Source Compile • javac •eclipse auto compile • src • build or classes jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 10.
    Project Build • buildscript • ready for use jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 11.
    Tool positioning 요구분석 usecase 설계 modeling 개발 IDE 테스트 Testing Tool 릴리스 build Tool jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 12.
    개발 생산성 향상 •requirement 확인 • control complexity • refactoring • automation jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 13.
    IDE • coding • compile/build •run/debug jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 14.
    연습문제 • 컴파일과 빌드의차이점은? • IDE의 기본 기능 세 가지는? jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 15.
    2. Hello World 실행하기 • Java Application • Java Web Application • Console View • Argument, Parameter, Method Signature jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 16.
    Start jsp / eclipse정보공유 http://okjsp.pe.kr
  • 17.
    Perspective jsp/ eclipse 정보공유 http://okjsp.pe.kr
  • 18.
    Java Project jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 19.
    jsp / eclipse정보공유 http://okjsp.pe.kr
  • 20.
    Java Application • main() •Java Project jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 21.
    Create Class jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 22.
    Create Class jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 23.
    Hello World jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 24.
    Run jsp / eclipse정보공유 http://okjsp.pe.kr
  • 25.
    Quick Access ^3 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 26.
    Console View Console View Preferences jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 27.
    Java Web Application •servlet container • Dynamic Web Project jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 28.
    Argument, Parameter, Method Signature • Argument •main(String[] args) • Parameter • key, value pairs transfer • Query String • Method Signature • public static void main(String[] args) jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 29.
    연습문제 • 구구단 출력프로그램을 자바 프로젝트로 작성하기 • 웹 프로젝트로 구구단을 작성하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 30.
    3. 코드 네비게이션 •Reading Code • Readability • Find • Open Resource • Definition • References jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 31.
    legend • ctrl :^ • alt : @ • shift : ~ jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 32.
    Find/Search • 찾기/바꾸기 • ^ + F • 파일 찾기 • ^ + ~ + R, @ + n u • 문자열 포함된 소스 찾기 • contextMenu + find • ^ + H jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 33.
    Find/Search #2 • 코드 패턴 찾기 • ^ + j, ^~ + j ; incremental find • ^ + k, ^~ + k ; selection find • 상속 관계 찾기 • ^ + t • 메소드 찾기 • ^ + o ; Outline jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 34.
    Find/Search #3 • 선언부 찾기 • ^ + leftClick • f3 • 참조 소스 목록 • ctrl + shift + g • contextMenu > References > Project • 같은 변수 찾기 • 형광펜 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 35.
    Navigate • 라인번호로 이동 •^+L • 중괄호({} brace) 처음과 끝 • ctrl + shift + p • @ + ~ + 좌우화살표 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 36.
    Navigate #2 • 파일과파일 사이 이동 • ^ + f6 • 뒤로/앞으로 • @ + 좌우 화살표 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 37.
    코드 비교하기 • comparewith... • replace with... jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 38.
    편집 • copy &paste • ^ + insert / ~ + insert •^+c/^+v • ^ + @ + 상하 화살표 • method copy/remove • outline view에서 copy/remove jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 39.
    연습문제 • 오픈소스 프로젝트import 하기 • 편집기 단축키 중 ctrl+shift+R의 역할은? • 자바 편집기에서 ctrl+shift+G의 역할은? • 클래스, 메소드, 변수의 선언위치로 이동하는 단축키는? jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 40.
    4. 프로젝트 기반의 소스 아키텍처 • 개발 표준 • 소스 디렉토리 구조 • 서비스 디렉토리 구조 • 버젂관리 해야할 것 • 빌드 스크립트의 가변성 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 41.
    개발 표준 • 용어집 •코딩 컨벤션 • CRUD 코드 샘플 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 42.
    소스 디렉토리 구조 • src • src/java • src/test • WebContent • WebContent/WEB-INF/web.xml • WebContent/WEB-INF/lib • WebContent/WEB-INF/classes • docs jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 43.
    서비스 디렉토리 구조 •Context Root • /WEB-INF/web.xml • /WEB-INF/lib • /WEB-INF/classes jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 44.
    버젂관리 해야할 것 •src • WebContent/ • .ignore • project configuration jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 45.
    빌드 스크립트의 가변성 • properties 이용 • relative path jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 46.
    연습문제 • 다이나믹 웹프로젝트 기본 폴더 구조는? jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 47.
    5. 프로퍼티 에디터 플러그인 설치하기 • Properties의 특성 • 프로젝트 내에서 properties 파일의 위치 • propedit plugin jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 48.
    Update Site URL http://propedit.sourceforge.jp/eclipse/updates/ jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 49.
    Software Updates jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 50.
    Check plugin &Install jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 51.
    Plugin Licenses jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 52.
    Install Complete jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 53.
    Software Updates • InstalledSoftware • Update... • Uninstall... • Revert Configuration... • Available Software • Update site url jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 54.
    연습문제 • 플러그인 설치의두 가지 방법을 기술 • AnyEdit plugin • Subversive plugin • pathtools jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 55.
    6. Mylyn과 작업리스트 •Mylyn 개요 • ToDo 리스트의 관리 • 일정관리 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 56.
    New Task jsp/ eclipse 정보공유 http://okjsp.pe.kr
  • 57.
    Mylyn 개요 • TaskList • Planning • Context • Category • Activate Task • Focus on Active Task jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 58.
    Task List jsp/ eclipse 정보공유 http://okjsp.pe.kr
  • 59.
    ToDo 리스트의 관리 •Context 와 연결 • 우선숚위 • Estimation jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 60.
    일정관리 • Personal Planning • Scheduled for • Due • Estimated hours jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 61.
    연습문제 • Mylyn과 구글의이슈트래커와 연결 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 62.
    Day-2 jsp / eclipse정보공유 http://okjsp.pe.kr
  • 63.
    이클립스 서브버전 플러그인 Subversive • Ganymede project • Polarion license • Team UI jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 64.
    eclipse.org/subversive jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 65.
    Subversive Update URL http://www.polarion.com/products/svn/subversive.php?src=eclipseproject jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 66.
    연습문제 • 오픈소스 프로젝트호스팅 서비스와 서브버젂 플러그인을 연결해서 프로젝트 소스를 가져오기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 67.
    Version Control System기본 • 버전관리 라이프사이클 • import • add • commit • checkout • update • repository • sandbox jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 68.
    젂통적인 개발방식 server client 개발자 browser ftp, telnet A ftp, telnet 개발자 B jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 69.
    VCS를 이용한 개발 server 개발자 client A browser VCS build 개발자 B : sandbox; VCS서버와 sync되는 소스 작업공간 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 70.
    용어 • 저장소 Repository 버젂관리되는 파일이 저장되는 서버의 기준 디렉토리 • 모듈 Module 저장소의 하위 단위, 한 모듈은 보통 하나의 프로젝트 • 체크아웃 checkout 모듈을 작업자의 PC로 가져오는 명령 • 샌드박스 sandbox 파일의 수정이 가능한 VCS서버와 동기화되는 작업공간. • 전송 Commit 작업 완료된 파일을 VCS서버에 반영 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 71.
    Source Repository Image from: http://designpatternschash.blogspot.com/2008/09/what-is-tortoise-svn.html jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 72.
    Update, Commit Image from: http://designpatternschash.blogspot.com/2008/09/what-is-tortoise-svn.html jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 73.
    연습문제 • VCS 용어의 의미를 기술 • import • commit • update • conflict • repository • sandbox jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 74.
    소스의 공유와 배포에관하여 • Sandbox • Update Frequently • Commit by function unit • Team Communication • Time Gap jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 75.
    Process jsp / eclipse정보공유 http://okjsp.pe.kr
  • 76.
    VCS Best Practices • 작업 시작 젂에 항상 project update를 시행 • 완료된 파일은 매일 점심 식사 젂과 퇴근 젂에 젂송(Commit) • 충돌이 자주 생기는 파일은 해당 작업자들간의 의사소통이 잘 안 된다는 표시 • 에러가 난 파일은 해결될 때까지 젂송(Commit) 자제 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 77.
    연습문제 • VCS를 이용한공유시 소스의 이력을 볼 수 있는 방법은? • 웹 애플리케이션 배포시 이상이 생겼을 경우 원상복구를 빨리 할 수 있는 방법을 기술하시오. jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 78.
    버젂 비교하기 • Comparewith ... • Source Tree Time Machine jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 79.
    Show in History jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 80.
    https svn trust jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 81.
    History View jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 82.
    Compare With ... jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 83.
    Get Content jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 84.
    연습문제 • 히스토리 뷰에서과거 소스의 내용을 가져와 현재의 소스에 적용하는 방법 • 일주일 전 프로젝트 소스 가져오기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 85.
    ANT 빌드스크립트 만들기 •project • target • task jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 86.
    Ant.apache.org jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 87.
    Ant Outline jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 88.
    연습문제 • 이클립스IDE와 빌드툴의차이 • 기존 프로젝트에 ANT 빌드 스크립트를 적용하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 89.
    ANT를 이용한 자동화 •Build Script • Crontab • Conditional Build based on property • javadoc • JUnit jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 90.
    ftp task <target name="upload"depends="publish" description="ftp upload text files"> <ftp server="${ftp.server}" port="21" remotedir="${ftp.remotedir}" userid="${ftp.userid}" password="${ftp.password}" depends="yes“ binary="yes"> <fileset dir="${publish.home}"> <!-- jsp 파일 업로드 --> <include name=“**/*.jsp"/> <!-- class 파일과 resources 업로드 --> <include name="WEB-INF/classes/kr/**/*.class"/> <!-- 정적인 파일 업로드 --> <include name="**/*.htm*"/> </fileset> </ftp> </target> jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 91.
    Optional Task jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 92.
    연습문제 • ftp를 이용하려면필요한 라이브러리 • 빌드날짜가 포함된 jar 파일 생성하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 93.
    Day-3 jsp / eclipse정보공유 http://okjsp.pe.kr
  • 94.
    1. 지속적인 통합 Continuous Integration • 주기적인 빌드를 통해서 프로젝트 팀 간의 인터페이스 격차를 조기에 발견 • 빅뱅통합에 드는 비싼 비용을 절감 • PC급의 빌드 서버 활용 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 95.
    Commit Time issue •interfaces, xml small but important files • break whole build • fear of commit • short periodical commit time interval jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 96.
    Best Practices • Maintain a Single Source Repository. • Automate the Build • Make Your Build Self-Testing • Everyone Commits Every Day • Build the Mainline on an Integration Machine • Keep the Build Fast • Test in a Clone of the Production Environment • Make it Easy for Anyone to Get the Latest Executable • Everyone can see what's happening • Automate Deployment jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 97.
    연습문제 • 지속적인 통합의장점 세 가지 기술 • 지속적인 통합의 프랙티스 열 가지 기술 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 98.
    2. Hudson 개요 •Building/testing software project continuously • Monitoring execution of externally-run jobs jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 99.
    Hudson Plugins • installation • Using interface • http://yourhost/hudson/managePlugins • Download • download *.hpi file into • $HUDSON_HOME/plugins source: http://wiki.hudson-ci.org/display/HUDSON/Plugins jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 100.
    Hudson Plugins #1 •Source code management • Build triggers • Build tools • Build wrappers • Build notifiers • Slave launchers and controllers jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 101.
    Hudson Plugins #2 •Build reports • Artifact uploaders • External site/tool integrations • UI plugins • Page decorators • Misc jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 102.
    Hudson Plugins jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 103.
    Hudson Plugins jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 104.
    Findbugs plugin jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 105.
    Hudson Security • java -jar hudson.war --argumentsRealm.passwd.kenu=okpass --argumentsRealm.roles.kenu=admin jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 106.
    Hudson Security jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 107.
    Hudson Security jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 108.
    Hudson Security jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 109.
    Hudson Security • Quick and Simple Security <http://hudson.gotdns.com/wiki/display/HUDSON/Quick+and+Simple+Security> • Standard Security Setup <http://hudson.gotdns.com/wiki/display/HUDSON/Standard+Security+Setup> • Apache frontend for security <http://hudson.gotdns.com/wiki/display/HUDSON/Apache+frontend+for+security> • Authenticating scripted clients <http://hudson.gotdns.com/wiki/display/HUDSON/Authenticating+scripted+clients> • Help! I locked myself out! <http://hudson.gotdns.com/wiki/display/HUDSON/Disable+security> jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 110.
    Eclipse plugin source: http://code.google.com/p/hudson-eclipse/ jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 111.
    연습문제 • Hudson의 두가지 목적은? • Hudson 플러그인 설치 방법 두 가지 • Hudson의 기본인증 기능을 설치하기 • 구글 메싞저와 연결하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 112.
    3. Hudson과 Subversion 연결 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 113.
    Check out URL jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 114.
    Job Configure jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 115.
    연습문제 • 오픈소스 프로젝트와Hudson 연결 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 116.
    4. 개발프로세스에서 이클립스 포지셔닝 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 117.
    jsp / eclipse정보공유 http://okjsp.pe.kr
  • 118.
    연습문제 • 이클립스 프로젝트의Ant 빌드스크립트를 만들고 Hudson을 통해 개발서버에 배포하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 119.
    5. Eclipse Communication Framework jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 120.
    ECF in Ganymede jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 121.
    jsp / eclipse정보공유 http://okjsp.pe.kr
  • 122.
    Real-time Shared Editing http://www.vimeo.com/1195398?pg=embed&sec=1195398 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 123.
    연습문제 • ECF 프레임워크를통해서 짝 프로그래밍하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 124.
    6. 프로젝트 HealthCheck jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 125.
    Health Check jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 126.
    연습문제 • 프로젝트 모니터링을위해 Hudson에 메일 설정하기 • JUnit Report 설정하기 • Findbugs를 통해 프로젝트 버그 정적 분석하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 127.
    Day-4 jsp / eclipse정보공유 http://okjsp.pe.kr
  • 128.
    1. 웹프로젝트의 특징 •ServerSide Script • ClientSide Script jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 129.
    Java Project Dynamic WebProject jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 130.
    설정 파일 비교 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 131.
    연습문제 • 서버 사이드스크립트와 클라이언트 사이드 스크립트의 런타임 차이점 • Client/Server 애플리케이션과 웹 애플리케이션의 차이점 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 132.
    2. 톰캣 서버연결 • Target Runtime jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 133.
    연습문제 • 톰캣 서버포트를 8080에서 9090으로 변경하기 • 프로젝트 퍼블리쉬하지 않게 설정 조정하기 • 자바 프로젝트와 다이나믹 웹 프로젝트의 차이점 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 134.
    3. JSP/Servlet 만들기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 135.
    Servlet 만들기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 136.
    Servlet 클래스 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 137.
    URL Mapping jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 138.
    Servlet Template jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 139.
    doGet() response.setContentType("text/html"); PrintWriter out =response.getWriter(); out.println("<h1>Hello World</h1>"); out.close(); jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 140.
    URL mapping jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 141.
    연습문제 • DB를 이용해방명록 만들기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 142.
    4. 한글 인코딩처리 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 143.
    Java Hangul new String(string.getBytes("8859_1"),"ms949"); new String(string.getBytes("ms949"), "8859_1"); jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 144.
  • 145.
    JSP encoding <%@ pagepageEncoding="ms949" %> <%@ page contentType="text/html;charset=ms949" %> jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 146.
    JSP encoding request.setCharacterEncoding("ms949"); Filter <filter> <filter-name>Set Character Encoding</filter-name> <filter-class>filters.SetCharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>utf-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>Set Character Encoding</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 147.
    한글 문제 처리방법 • 다른 DB클라이언트로 한글 확인 • 인코딩 함수 모두 제거 후 점진 적용 • 브라우저의 소스보기에서 한글 확인 • 중간단계의 한글 깨짐 해결 우선숚위는 최하위로 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 148.
    연습문제 • 자바에서의 캐릭터인코딩 처리 기술 • JSP의 인코딩 처리 기술 • 한글 문제 처리 방법 • HTTP에서의 인코딩 처리 기술 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 149.
    5. Spring 웹 프레임워크 다루기 • JPetStore 샘플을 통해서 스프링 프레임워크 숙지 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 150.
    warfile.bat 실행 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 151.
    hsqldb 서버 기동 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 152.
    import war file jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 153.
    Import src jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 154.
    JPetStore 실행 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 155.
    연습문제 • Spring Framework 에서 다음을 순서대로 나열하시오 • Controller • DAO • Service • JSP • applicationContext.xml jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 156.
    6. 원격 서버배포하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 157.
    배포시 주의사항 • 개발서버는 Hudson 등을 통해 자동화 가능 • 운영계는 원상복구에 대한 이슈가 크기 때문에 심볼릭 링크 등을 통해서 빠르게 원복할 수 있도록 함 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 158.
    ftp ant task등 <ftp server="${ftp.server}" port="21" remotedir="${ftp.remotedir}" userid="${ftp.userid}" password="${ftp.password}" depends="yes" binary="yes" > <fileset dir="${publish.home}"> <include name="images/**/*.gif"/> <include name="images/**/*.jpg"/> <include name="WEB-INF/lib/*.jar"/> <include name="WEB-INF/classes/*.class"/> </fileset> </ftp> jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 159.
    Remote System Explorer jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 160.
    RSE Ftp jsp /eclipse 정보공유 http://okjsp.pe.kr
  • 161.
    연습문제 • 톰캣에서 war파일로 프로젝트 배포하기 • ant의 ftp 태스크를 이용해서 배포하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 162.
    Day-5 jsp / eclipse정보공유 http://okjsp.pe.kr
  • 163.
    이클립스와 테스트 자동화 •1. 이클립스에서 지원하는 테스트케이스 • 2. JUnit 이해하기 • 3. 테스트케이스와 리팩토링 • 4. Findbugs 플러그인을 통한 품질향상 • 5. JUnit과 Findbugs의 지속적인 리포트 • 6. Selenium을 이용한 웹 UI 레코딩 테스트 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 164.
    1. 이클립스에서 지원하는 테스트케이스 •테스트케이스는 입력값과 출력값을 지정해서 테스트 되는 함수가 그 조건의 충족 여부를 확인 가능한 프로그램 • assertEquals(예상출력, 함수(입력)); jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 165.
    테스트의 자동화 • 테스트케이스는프로그램으로 자동화해야 한다. • 품질은 테스트의 범위와 실행 횟수에 영향을 받는다. • 수작업의 테스트는 기한 내 테스트 실행 횟수를 감소시킨다. • 테스트는 빨리 쉽게 수행 가능해야 한다. jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 166.
    Test Harness • Scaffold •Outside of Application • Fine grained TestCases • It’s useful for changing software • Acrobatic with safety net jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 167.
    jsp / eclipse정보공유 http://okjsp.pe.kr
  • 168.
    jsp / eclipse정보공유 http://okjsp.pe.kr
  • 169.
    TestCase 제작 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 170.
    TestCase 제작 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 171.
    TestCase 제작 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 172.
    TestCase 제작 package net.okjsp; importjunit.framework.TestCase; public class HelloWorldTest extends TestCase { } jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 173.
    테스트 메소드 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 174.
    assert... • assertTrue(실행결과); • assertFalse(실행결과); • assertEquals(목적값, 실행결과); • assertEquals(float목적값, 실행결과, 오차범위); jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 175.
    일단 테스트 고 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 176.
    JUnit Result jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 177.
    컴파일 되게 만들기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 178.
    컴파일 되게 만들기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 179.
    다시 테스트 고 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 180.
    테스트 통과하게 하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 181.
    기능 추가하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 182.
    컴파일 되게 만들기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 183.
    다시 테스트 고 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 184.
    테스트 통과하게 하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 185.
    리팩토링 하기-중복제거 재홗용 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 186.
    테스트 히스토리 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 187.
    테스트 조건 강화하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 188.
    다시 테스트 고 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 189.
    테스트 통과하게 하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 190.
    테스트에 관하여 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 191.
    Test and Debug jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 192.
    참고 • http://junit.org • http://www.eclipse.org •http://xper.org • http://okjsp.tistory.com/tag/test jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 193.
    연습문제 • 테스트케이스란? jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 194.
    2. JUnit 이해하기 • java version of xUnit family. • CPPUnit, JSUnit, ASUnit, httpUnit… • Kent Beck, Erich Gamma • assert • TestCase, TestSuite • Matter of S/W quality. jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 195.
    sf.net/projects/junit jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 196.
    TestCase • Ver3.8.x • ExtendsTestCase • assertTrue • assertEquals • Ver4.x • Annotation jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 197.
    TestSuite • AllTests • Groupof TestCases • Regression Test Automation jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 198.
    연습문제 • JUnit 테스트케이스로디버깅하기 • TestCase와 TestSuite 구분하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 199.
    3. 테스트케이스와 리팩토링 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 200.
    리팩토링 하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 201.
    리팩토링 하기-inline jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 202.
    테스트 스위트 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 203.
    테스트 스위트 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 204.
    젂체 테스트하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 205.
    정리-테스트 리듬 • Rhythm • TestCase • Change Small Code • All Test • Refactoring • All Test • 돌다리도 두드려 가라. • 모래 코드 위에 코드를 추가하지 말라. jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 206.
    테스트 코드 분리하기- 소스폴더 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 207.
    테스트 코드 분리하기- 소스폴더 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 208.
    테스트 코드 분리-Move jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 209.
    테스트 코드 분리-Move jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 210.
    다시 테스트 고 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 211.
    JUnit Beyond jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 212.
    연습문제 • 리팩토링이란? • 리팩토링과테스트케이스의 관계? jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 213.
    4. Findbugs 플러그인을 통한 품질향상 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 214.
    from • http://findbugs.sourceforge.net jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 215.
    What for • FindJava Program Bugs • Search by bug patterns • Search for compiled byte code • Refer source code for Human Readable • Provide fix guide for each bug jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 216.
    Tool • Command line •Desktop Application • Java Web Start; jnlp • Plugin • IDE: • Eclipse, NetBeans … • Build Tool: • Ant, Maven • CI Tool : • Hudson jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 217.
    Command line • Download,Unzip, set Path • options • findbugs -textui -javahome /path/to/jdk1.5.0 -xml -output findbugs.xml /path/to/classes jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 218.
    Desktop jsp / eclipse정보공유 http://okjsp.pe.kr
  • 219.
    Eclipse plugin • UpdateURL • http://findbugs.cs.umd.edu/eclips e/ jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 220.
    Eclipse plugin-editor jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 221.
    Eclipse plugin-view jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 222.
    Eclipse plugin-perspective jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 223.
    Related • http://findbugs.sourceforge.net • https://hudson.dev.java.net • http://okjsp.tistory.com/tag/findbugs jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 224.
    연습문제 • Findbugs 이클립스플러그인 사용하기 • Hudson 플러그인으로 리포팅하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 225.
    5. JUnit과 Findbugs의 지속적인 리포트 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 226.
    JUnit Ant Task • junit-ant.jar, junit.jar copy to $ANT_HOME/lib/ <target name="test" depends="compile"> <junit> <classpath refid="test.classpath"/> <test name="test.UnitTest"></test> </junit> </target> jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 227.
    junitreport <mkdir dir="report/html"/> <junit printsummary="on"haltonfailure="on"> <classpath refid="test.classpath"/> <formatter type="xml"/> <batchtest todir="report"> <fileset dir="dst"> <include name="**/*Test*"/> </fileset> </batchtest> </junit> <junitreport todir="report"> <fileset dir="report"> <include name="TEST-*.xml"/> </fileset> <report format="frames" todir="report/html"/> </junitreport> jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 228.
    junitreport jsp/ eclipse 정보공유 http://okjsp.pe.kr
  • 229.
    Findbugs Ant Task • $FINDBUGS_HOME/lib/findbugs-ant.jar copy to $ANT_HOME/lib/ <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" /> <target name="findbugs" depends="compile"> <findbugs home="${findbugs.home}" output="xml" outputFile="findbugs.xml" jvmargs="-Xms512M -Xmx1024M " timeout="1800000"> <sourcePath path="WebContent/WEB-INF/src" /> <class location="WebContent/WEB-INF/classes" /> </findbugs> </target> jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 230.
    HUDSON Report • https://hudson.dev.java.net/ jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 231.
    How to usein our team • Each one’s IDE; before commit; • Using App’s Health Care • CI graph • Code Review jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 232.
    연습문제 • JUnit과 Findbugs의Ant 연결 파일과 Ant Task 실행을 위해 파일을 복사할 위치는 어디인가? jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 233.
    6. Selenium을 이용한 웹UI 레코딩 테스트 • Overview • Install • UI Recording jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 234.
    • Install Firefox • http://getFirefox.com • 도구 > 부가 기능 • Search "Selenium" jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 235.
    install jsp / eclipse정보공유 http://okjsp.pe.kr
  • 236.
    Selenium IDE jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 237.
    Recording jsp /eclipse 정보공유 http://okjsp.pe.kr
  • 238.
    VerifyText jsp/ eclipse 정보공유 http://okjsp.pe.kr
  • 239.
    Replay jsp / eclipse정보공유 http://okjsp.pe.kr
  • 240.
    tune jsp / eclipse정보공유 http://okjsp.pe.kr
  • 241.
    TestCase jsp /eclipse 정보공유 http://okjsp.pe.kr
  • 242.
    TestSuite jsp /eclipse 정보공유 http://okjsp.pe.kr
  • 243.
    Selenium Core • SeleniumCore is a DHTML test execution framework. jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 244.
    연습문제 • 방명록 웹UI테스트케이스 작성하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 245.
    정리 05.09 이클립스 기본 05.16 서브버젂과 빌드 도구 ANT 05.23 이클립스와 협업 프로세스 05.30 이클립스 웹개발 06.13 이클립스와 테스트 자동화 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 246.
    이클립스 기본 • 이클립스 개요 • Hello World 실행하기 • 코드 네비게이션 • 프로젝트 기반의 소스 아키텍처 • 프로퍼티 에디터 플러그인 설치하기 • Mylyn과 작업리스트 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 247.
    서브버젂과 빌드 도구ANT • 1. 이클립스 서브버젂 플러그인 Subversive • 2. Version Control System 기본 • 3. 소스의 공유와 배포에 관하여 • 4. 버젂 비교하기 • 5. ANT 빌드스크립트 만들기 • 6. ANT를 이용한 자동화 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 248.
    이클립스와 협업 프로세스 • 1. 지속적인 통합 Continuous Integration • 2. Hudson 개요 • 3. Hudson과 Subversion 연결 • 4. 개발프로세스에서 이클립스 포지셔닝 • 5. Eclipse Communication Framework • 6. 프로젝트 Health Check jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 249.
    이클립스 웹개발 • 1. 웹프로젝트의 특징 • 2. 톰캣 서버 연결 • 3. JSP/Servlet 만들기 • 4. 경우에 따른 인코딩 처리 • 5. Spring 웹 프레임워크 다루기 • 6. 원격 서버 배포하기 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 250.
    이클립스와 테스트 자동화 • 1. 이클립스에서 지원하는 테스트케이스 • 2. JUnit 이해하기 • 3. 테스트케이스와 리팩토링 • 4. Findbugs 플러그인을 통한 품질향상 • 5. JUnit과 Findbugs의 지속적인 리포트 • 6. Selenium을 이용한 웹 UI 레코딩 테스트 jsp / eclipse 정보공유 http://okjsp.pe.kr
  • 251.
    수고하셨습니다. 이클립스로 행복한개발하세요. jsp / eclipse 정보공유 http://okjsp.pe.kr