Using Multiple Test Cases Option for Coding Questions - How it helps?

Know how displaying multiple test cases to candidates in coding assessments helps you assess coders better

A test case consists of an input to the code and an expected output to verify a program’s actual expected intent as per the problem statement. It helps in validating your code against different permutations and combinations that the problem statement might demand. 

While iMocha provided 6 test cases per coding question, only a single test case could be marked as default. A default test case is a test case of which, the input and expected output is displayed to the candidate. The rest of the test cases were not displayed to the candidate and were run against the code during Report Generation. A single default test case is not adequate to validate multiple permutations & combinations or boundary conditions. Hence, we have introduced the option of extending these default test cases to 6 and an additional set can be added as non-default.

Multiple Test Cases 

In the above image, apart from the Custom input, there are additional 5 test cases that are displayed to the candidates. When multiple test cases are displayed, candidates can view which test cases have failed and rectify their code to handle the failed scenarios. 

Why is this useful?

With the additional test cases which should be ideally configured to check boundary conditions and unique permutation and combination, the candidate now has more power in their hand to ensure that their code meets the expectation of the problem statement before submitting. For instance, when 2 out of 4 test cases fail, the candidate can troubleshoot the issues in their logic or move to a different approach which results in the passing of all test cases. This will help the candidates better their code and help Hiring Managers and Recruiters shortlist sharper candidates. 

How to add multiple test cases in your own coding questions?

Click My Questions -> Add Question -> Coding

Add your problem statement in the given box

Test Cases

The number of test cases that are selected as default will be displayed to the candidates on the test platform after compiling their code. You can add a maximum of 6 test cases as default. 

How the test cases will be seen in reports?

Tests cases report

All the test cases that were displayed to the candidates will be shown in the reports as well.

Note: The default test cases should be configured with 0 points and the scoring should be configured for the non-default test cases.

For any queries write to us at support@imocha.io