Hi, I want to ask a question.
Is it possible to show (run) testcases until one of them fails?
I want to imitate behaviour of USACO Training gateway http://train.usaco.org/usacogate
For example, we have test case A, B, C, D, E
If A and B are right and C is wrong, it stops and only show (run) test cases of A, B and C. D and D didn't (or at least hidden).
Is it possible?
Sure. Just set each test case's Display value to Show but in addition check Hide rest if fail.
it is a way to use that in order to avoid running more test cases? (Instead of hide them)
No, the "Hide Rest If Fail" feature just suppresses the display of subsequent cases to the student. The rest still get run, and are displayed to staff (shaded darker).
If you want a "lazy evaluation" mode you have to implement it yourself with a template grader. For non-combinator graders you can set the abort attribute of the returned JSON record (see http://coderunner.org.nz/mod/book/view.php?id=193&chapterid=738). With a combinator grader you can return as many or as few test results as you like, so you simply stop testing on the first failing case.
Thanks for your quick answer Richard!!
I was thinking in problems that not use combinator (for performance reasons). But I see the best way is desing problems that can use the power of combinator :)