콘텐츠로 바로 가기
MathWorks

자기 주도형 온라인 교육

  • Self-Paced Content
  • MathWorks
  • MATLAB 도움말 센터
  • 커뮤니티
  • 학습
  • MATLAB 받기 MATLAB
  • 로그인
    • 내 계정
    • 나의 커뮤니티 프로필
    • 라이선스를 계정에 연결

    • 로그아웃
  • MathWorks 지원 요청하기
  • Visit mathworks.com
  • Online Courses
MathWorks MathWorks

웹사이트 선택

번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:

  • (English)
  • (Deutsch)
  • (Français)
  • (简体中文)
  • (English)

또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.

사이트 성능 최적화 방법

최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.

미주

  • América Latina (Español)
  • Canada (English)
  • United States (English)

유럽

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

아시아 태평양

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文
    • English
  • 日本 (日本語)
  • 한국 (한국어)

지역별 지사에 문의

image for course 단위 테스트

단위 테스트

코드 품질을 개선하고 버그를 방지하며 올바른 동작 여부를 확인할 수 있는 효과적인 단위 테스트를 작성하는 방법에 대해 배웁니다. 테스트 개념을 이해하고 테스트 스크립트와 함수를 작성하며 테스트 전 작업과 테스트 후 작업을 관리할 수 있습니다.

교육과정 모듈

Introduction

Get an overview of the content covered.

강의 내용:
  • Course Overview
  • Learning Outcomes and Prerequisites
  • Course Example
  • What is Unit Testing?

What is a Test?

Write tests with comparisons, functions that test equality, and assert statements.

강의 내용:
  • Elements of a Test
  • is* Functions
  • Compare with == Versus isequal
  • Test Response
  • Assert Statements

Test as You Go with a Test Script

Combine tests into a test script, and run tests on your code base.

강의 내용:
  • Why Use a Test Script?
  • The Format of a Test Script
  • Write a Test Script
  • Test Script Results
  • Run a Test Script
  • Fix Broken Tests

Avoid Bugs in Comparisons

Use tests that make numeric comparisons within a given tolerance.

강의 내용:
  • Bugs in Comparisons
  • Numerical Precision
  • Check for Equality (Within a Given Tolerance)
  • Add a Tolerance to Satellite Application Tests

Write Test Functions

Write test functions to test the output and behavior of programs.

강의 내용:
  • Why Use Test Functions?
  • The Format of a Test Function
  • Convert Satellite Parameters Tests to Test Functions

Verify Behavior

Use functions that verify application behavior.

강의 내용:
  • Verify Application Behavior
  • Verification Functions
  • Satellite Parameters Tests Using verifyTrue
  • Other verify* Functions

Test for Desired Warnings and Errors

Verify programs produce the correct warnings and errors.

강의 내용:
  • Commands as Inputs to Test
  • Test for an Expected Error Message - Satellite Application
  • Test for an Expected Error Message - Square Root Function

Add Pre- and Post- Test Tasks

Define set-up tasks for testing, and undo them when finished.

강의 내용:
  • What Are Pre- and Post-Test Tasks?
  • The Format of Pre- and Post- Test Tasks
  • Pre- and Post- Test Tasks for Satellite Parameters Tests

Conclusion

Review course content, learn next steps, and provide feedback on the course.

강의 내용:
  • Summary
  • Additional Resources
  • Survey

형식:자기 주도형

언어:한국어

언어

  • 자동화된 피드백이 제공되는 실습 연습문제
  • 웹 브라우저를 통해 MATLAB 이용
  • 공유 가능한 진도 보고서 및 교육과정 수료증

함수를 작성하는 방법과 이유

사용자 지정 함수를 작성하여 코드의 유연성을 높일 수 있습니다.

  • 신뢰 센터
  • 등록 상표
  • 개인정보 취급방침
  • 불법 복제 방지
  • 애플리케이션 상태
  • 문의하기

© 1994-2025 The MathWorks, Inc.