How do I debug Test Suites in Cody Coursework?

1 回表示 (過去 30 日間)
MathWorks Community Team
MathWorks Community Team 2014 年 2 月 27 日
編集済み: MathWorks Community Team 2015 年 4 月 24 日
With the introduction of Cody Coursework, I'm sometimes asked how faculty can debug problem Test Suites.

採用された回答

MathWorks Community Team
MathWorks Community Team 2014 年 2 月 27 日
編集済み: MathWorks Community Team 2015 年 4 月 24 日
Remember, the Test Suite is a MATLAB script which, in turn, calls and/or parses the students' code function. So my first recommendation is to use MATLAB on your desktop to build, debug and test your script.
Online, you can also use "Run Tests" during problem creation. Command output is echoed, thus you can print diagnostic data if desired. You can also experiment with MATLAB commands such as dir(), path(), which() etc. as needed.
As a last resort, the host system within which your Test Suite and students' function MATLAB code is executed runs linux. You can use the MATLAB shell escape (!, exclamation point) to execute any needed server-side shell commands. For example, !ls will list all files in the current working directory.
There are many possibilities the power of the MATLAB language offers for implementing test suites. We will add more information and examples in future, and I encourage you to share your own insights as answers or comments below.

その他の回答 (1 件)

J-G van der Toorn
J-G van der Toorn 2014 年 3 月 2 日
I must be doing something wrong, but I cannot find out what it is: when I click Test Reference Solution, it briefly shows Please Wait... but after that, nothing happens, nothing is shown, and apparently no test has run.
Is this my mistake, or is there currently something wrong with the server that checks the Reference Solutions?
Jan-Gerard
  1 件のコメント
Santosh Kasula
Santosh Kasula 2014 年 3 月 3 日
There is an issue with testing the reference solution. We are currently working on it, and hoping to release a fix soon.

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

カテゴリ

Help Center および File ExchangeTest Execution についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by