( If you are a Recruiter using HackerRank for Work and looking for information about Test Cases, refer to the Defining Test Cases for Coding Questions topic. )
Hidden test cases include your test setter's corner cases or different scenarios defined to validate your coding solution. These test cases check whether your solution addresses the problem including its various constraints, but do not display the expected output of the test case.
For instance, the hidden test cases may be defined to validate your coding logic against boundary values, error handling scenarios, etc. Depending on the complexity of the coding Question or for specific skills assessment, your test setter may include one or more hidden test cases for your question.
When you click Run code, the hidden test cases get executed and your output and debug output are displayed. You may use the print statement to debug why the hidden test cases are failing.
Typically, each hidden test case in a Coding question may include specific scores for producing the exact expected output.
In the following example, the Hidden test cases are executed and your output and debug output are displayed.
Comments
2 comments
I was working on the https://www.hackerrank.com/challenges/special-palindrome-again problem and found that debug output is never displayed for hidden test cases, directly contradicting what this article says. It only displayed debug output for the sample test cases, when the "Run Code" button was clicked. Hidden test cases were only ran when the "Submit Code" button was clicked and again, no debug output is displayed for that.
^^ I am encountering the same glitch for Jumping on the Clouds challenge (and others)
Please sign in to leave a comment.