Skip to Content
훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우
book

훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우

by 최원재, 강전희, 안재덕, 남윤화, 피트 구들리프
May 2016
Beginner to intermediate
438 pages
8h 46m
Korean
Hanbit Media, Inc.
Content preview from 훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우
144
1
부
you.write(code) ;
외부 인터페이스에 의존하는 객체를 테스트할 때, 테스트 케이스에서 해당 인터페이스에 대한
견본을 제공할 수 있다. 테스트 진영에 따라 용어는 다를 수 있으나 보통 테스트 대역
test
double
이
라 부른다. 대역에는 다양한 형태가 있으며 일반적으로 사용하는 형태는 다음과 같다.
견본(
Dummies
)
견본 객체는 보통 빈 껍데기다. 테스트에서 견본을 실행하지는 않지만, 인자 목록을 채우기 위해 필요
하다.
짝(
Stubs
)
짝 객체는 인터페이스의 단순화된 구현체로서, 미리 정의된 응답을 반환하고 자신에 대한 호출과 관련
된 정보를 저장하곤 한다.
모조(
Mocks
)
모조 객체는 테스트 대역 중 최고로 여러 모조 객체 지원 라이브러리의 기능을 한다. 모조 객체는 명시
적인 인터페이스에서 자동으로 생성될 수 있고, 테스트 대상 시스템(
SUT
)에서 어떻게 사용될지에 대
해 미리 전달받을 수 있다.
SUT
테스트를 수행한 뒤에, 모조 객체를 확인하여 기대한 바와 같은 행위
를 하였는지 확인할 수 있다.
언어에 따라 모조 객체 지원 프레임워크에 대한 지원 여부나 방법이 다르다. 리플렉션 기능이 있는 언
어의 경우 모조 객체를 동기화하기 더 쉽다.
모조 객체를 적절히 사용하면 테스트가 더 간단하고 쉬워진다. 하지만 그것은 남용하기도 쉽다. 너무
많은 모조 객체들을 복합적으로 사용하여 테스트가 엉켜버리면, 문제를 파악하기 어렵고 유지 보수도
쉽지 않다. 즉 모조 객체를 지나치게 사용하면 나쁜 테스트 코드가 되기 쉽고
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

클라우드 네이티브: 클라우드 네이티브 애플리케이션을 설계, 개발, 운영하는 핵심 가이드

클라우드 네이티브: 클라우드 네이티브 애플리케이션을 설계, 개발, 운영하는 핵심 가이드

정원천, 보리스 숄, 트렌트 스완슨, 피터 야우쇼베츠

Publisher Resources

ISBN: 9788968482304