The I/O Console is where users assess their code by running it against the custom input and checking its output. The I/O Console also helps the users to check the result of the test cases provided in a question.
The interviews platform provides a split view interface that lets the users see the code editor and I/O Console side by side, utilizing the maximum available screen. This enables the users to see the maximum portion of their lines while checking its result.
Accessing the I/O Console
- The I/O console in an interview is closed by default. To access the I/O Console, you can go to the right pane of the interview screen and click on the I/O button.
- This will split your screen into two parts where you can see your code and the I/O Console side by side.
Using Custom Input
- On the top of the I/O Console, you can see three tabs Input/Output, Test Cases, and Console. Selecting the Input/Output tab here, you can enter your input on the Input space and click on the Run Code button at the bottom of the screen to check your code against the custom input.
- In case of a successful compilation, the result will be displayed in the Your Output space.
- If you want to stop the Run Code process, you can click on the Abort button that appears once you click on the Run Code.
Running the Test Cases
- In case of a successful compilation of the custom input, you will see a message on the top of the tab that says, “Compilation successful. You can now Run the Tests” this clickable notation will run your test cases and take you to the Test Cases tab where you can access the results.
- You can also click on the Test Cases tab at the top of the console to access the test cases directly. You must click on the Run Tests at the bottom of the page to run your test cases.
- Once you run your test cases by either method, you will see the result at the top of the Test Cases tab.
- The interface shows the status of the test cases and the number of Test Cases passed.
- You can select your desired test case from the Testcase drop-down.
- Input, output, and expected output will be displayed for the selected test case.
- Hidden test cases (the ones with the lock icon) are not visible to the candidate.
You can also expand and collapse these fields as shown in the below graphic.