Expected failures in Unittest

6 ビュー (過去 30 日間)
Jeremiah
Jeremiah 2023 年 7 月 28 日
コメント済み: Jeremiah 2023 年 8 月 2 日
We are starting to automate our unit-testing. One unit-tests demonstrates a failure, but cannot easily be fixed. I would like to leave this test in as a reminder of our shame, but not fail the overall test report. Even better, I would like to be notified when the test is fixed.
I believe this concept is covered in Python with an xfail or expectedFailure decorator. Does MATLAB have anything similar?
I can create a list of the expected-failures and add a few conditionals into my test runner, but I would rather use a built-in.

回答 (1 件)

Pratyush
Pratyush 2023 年 8 月 2 日
I understand that you want to know about any inbuilt functionlity that could be used to filter out test cases.In MATLAB 'matlab.unittest.qualifications.Assumable' class could be used in a manner similar to that of xfail in python.
  1 件のコメント
Jeremiah
Jeremiah 2023 年 8 月 2 日
Not quite what I pictured, but very simple and easy to maintain. Thanks!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeTesting Frameworks についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by