Storing unit testing file artifacts

5 ビュー (過去 30 日間)
Joel
Joel 2020 年 8 月 13 日
コメント済み: Andy Campbell 2020 年 10 月 2 日
I'm working on an automated unit testing setup in MATLAB for an external program. In our scenario, MATLAB does the test setup (copying input files in place), executes the external program, and reads the output files to verify their contents.
This is all working great using MATLAB's class-based unit test framework - developers can kick off runtests and see their results in the command window in just a few minutes.
Now what I want to do is automate this on a regression test server and store the results. I see mentions in a couple other answers for how to store image/figure artifacts, but what about files? What I really want is this workflow:
>> runtests % scheduled, started automatically
...runs...
New folder: /mytests/testrun_yyyymmdd
Contents:
Test1_artifact1.txt
Test1_artifact2.txt
TestReport.pdf
etc.
This may be a manual job, but if there are hooks in the MATLAB framework to help, I'd like to use them.
Thanks.
  1 件のコメント
Andy Campbell
Andy Campbell 2020 年 10 月 2 日
also, are you using a specific CI server? There may be other features/integrations tthat might help depending on what you are using.

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

採用された回答

Harshendra Shah
Harshendra Shah 2020 年 8 月 19 日
Hi Joel,
You can import FileArtifacts class inside your testpoint and use it to copy the files to a new location.
Please refer to the following link for the same.
Regards,
Harshendra

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWrite Unit Tests についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by