MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
Write Setup and Teardown Code Using Classes ...... 33-56
Test Fixtures ............................... 33-56
Test Case with Method-Level Setup Code.......... 33-56
Test Case with Class-Level Setup Code ............ 33-57

Types of Qualifications.......................... 33-60

Tag Unit Tests................................. 33-63
Tag Tests.................................. 33-63
Select and Run Tests......................... 33-64

Write Tests Using Shared Fixtures................. 33-68

Create Basic Custom Fixture..................... 33-72

Create Advanced Custom Fixture.................. 33-75

Create Basic Parameterized Test.................. 33-82

Create Advanced Parameterized Test............... 33-88

Use External Parameters in Parameterized Test ...... 33-97

Create Simple Test Suites ....................... 33-102

Run Tests for Various Workflows................. 33-105
Set Up Example Tests........................ 33-105
Run All Tests in Class or Function ............... 33-105
Run Single Test in Class or Function ............. 33-106
Run Test Suites by Name..................... 33-107
Run Test Suites from Test Array................ 33-107
Run Tests with Customized Test Runner.......... 33-107

Programmatically Access Test Diagnostics......... 33-109

Add Plugin to Test Runner ...................... 33-110

Write Plugins to Extend TestRunner .............. 33-113
Custom Plugins Overview ..................... 33-113
Extending Test Level Plugin Methods ............ 33-114
Extending Test Class Level Plugin Methods ....... 33-114
Extending Test Suite Level Plugin Methods....... 33-115

xxxvi Contents

Free download pdf