All Collections
Candidates
During the Test
What is the difference between "Run Code" and "Submit Code"?
What is the difference between "Run Code" and "Submit Code"?
Priyanka Khandagale avatar
Written by Priyanka Khandagale
Updated over a week ago

LEARNING OUTCOME

Candidates taking online coding assessments will understand how to test, debug and run their code in the IDE.

In the WeCP Platform, when you attempt to solve a coding Question, Run code executes your code against the sample test cases but doesn't submit the code for final scoring while Submit code executes your code against all the test cases (the main and the sample test cases) and it submits the code for final scoring. A detailed explanation of both the buttons:

  1. Run code - This button compiles your code against the sample test cases. It is also used to debug the code. You can use this option to re-compile your code after making changes and test for errors. Please note that clicking "Run Code" doesn't test your solution against Hidden Test Cases, hence, doesn't calculate any scores for the test cases.

  1. Submit code - This button Submits your final answer to a coding problem. You can modify a submission and resubmit your answer any number of times before the Test ends. Scores are calculated for the best submission i.e code yielding the highest score.

Please note the following:

  1. When completing a coding test, you will be presented with a Code Editor screen to enter your code that will be assessed by the recruiter.

  2. Depending on the type of test you are taking, you could be presented with predefined code that you need to edit or append your code.

  3. You have the option to switch to a Custom Test Case screen where you can input and debug code using Run Code.
    ​
    ​

    Screenshot_2021-12-24_at_12.27.13_PM.png
  4. Ensure the final code is included in the Code Editor screen where you can test/debug using the Run Code option.

    Note: When you are ready to submit your answers, disable the Custom Test Case screen by clicking on the Console button.
    ​
    ​

  5. With your code completed and tested, click on Submit to send your answers to the recruiter. Submitted code cannot be edited.

Did this answer your question?