( 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 more hidden test cases for your question.
When you click Run code, the hidden test cases execute and display only the status as "Success" or "Wrong Answer" depending on whether the output from your code matches the exact expected output of the test case. The input and output values of these test cases are hidden.
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 have executed successfully and the output is hidden.
Tip: If your Hidden test cases are failing with a "Wrong Answer" status, it may indicate that your logic is not able to handle corner scenarios and provide a complete solution to the given problem. You can debug your code using the Test against custom input option and analyze the issue with your logic.
For detailed information about test cases in coding questions, refer to the following topics: