コンテンツへスキップ
MathWorks

自己学習形式のオンラインコース

  • Self-Paced Content
  • MathWorks
  • MATLAB ヘルプ センター
  • コミュニティ
  • 学習
  • MATLAB を入手する MATLAB
  • サインイン
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける

    • サインアウト
  • MathWorks サポートまでお問い合わせください。
  • Visit mathworks.com
  • e ラーニング コース
MathWorks MathWorks

Web サイトの選択

Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:

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

また、以下のリストから Web サイトを選択することもできます。

最適なサイトパフォーマンスの取得方法

中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の 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

形式: 自己学習形式

言語:日本語

言語

  • フィードバックを自動的に受けられる実践的な演習環境
  • Web ブラウザーから MATLAB にアクセス可能
  • 共有可能な進捗レポートとコース修了証

関数を記述する方法と理由

カスタム関数を記述してコードの柔軟性を高めます。

  • トラストセンター
  • 商標
  • プライバシー ポリシー
  • 違法コピー防止
  • アプリケーション ステータス
  • お問い合わせ

© 1994-2025 The MathWorks, Inc.