HackerRank Tests based on Front-end, Back-end, or Full-Stack Developer roles provide developers an option to use the git-based IDE in their local to solve Project type problems. This article describes how you can use your local IDE to solve Project type problems in HackerRank tests.
Steps to Answer Projects assessments
- Click on the Start Test button from your test invitation email to launch the assessment portal.
- You will be prompted to choose between the Online IDE or Local IDE to answer your question.
- Once you have chosen the mode click on continue, and continue with filling the confirmation form.
- Allow the environment to set up. It might take a couple of minutes to set up. Once the environment is set up click on Go to Test button to open the Test page.
- Click on Solve to answer a particular question.
- On the next page, under "Clone git repository", copy the project's git link to download the project on your local machine via a terminal.
- Watch the below snippet to know more about how to clone the git repository.
- You can find all your commits as well as browse the files in a read-only browser as shown in the below screenshot. Every time you push a new commit by adding a temporary file to the project, this section will reload to show you your latest commits.
- You can click on the Run Tests button in the lower right corner of the page to test your code.
- Click on the Submit Test button to submit your code. You can submit as many times as you want, Remember that your code on the "master" branch will be considered for your final evaluation.
- Alternatively, you can also use the HackerRank online IDE to write your code and submit your solution. Click on the button as shown in the below screenshot to switch to online IDE.
- Be mindful of the following points while solving questions in the online IDE.
- Click Run and then Install to install build dependencies.
- Click the Run button on the menu bar of the IDE to run the code.
- Click on Open Preview to view the application website.
- Always save your code before you view the app. You will be asked to enable the popups and then the app is launched in another tab. You can see the changes you have made to the code in real-time with this feature.
- Click on Terminal from the menu bar to open the terminal
- Do not modify ids or classes for the existing UI elements because they are required for the unit tests.
- If the total test time elapses, you will be automatically logged out of the test. In this case, we use your latest auto-saved code on our IDE to evaluate your test.
- Click Submit Code and continue at the right bottom corner of your screen to submit the question if you are satisfied with your answer.
- You can revisit your submitted answers and modify the submissions any number of times before the Test ends.