You can create a SudoRank question that help to assess Linux skills of a candidate. When a candidate takes a test comprising SudoRank questions, we set up their own sandbox Linux virtual machine to log in remotely. You can ask them to perform whatever tasks you like: install a package, create a file with certain contents, or perform an action with a specific tool like grep.
You can write a script to score the performance of candidates, or rely on the session playback of the session to grade the test subjectively. The video playback feature allows you to view if a candidate checked a manpage, or knew how a tool worked from memory.
When a candidate is viewing a SudoRank problem, this problem statement is displayed alongside the login credentials and an SSH command for logging into the Linux virtual machine. The in-browser code editor does not exist for the SudoRank questions, which differs from other question types where the candidate views the problem statement and enters their solution on the same page.
Note: Even if there is more than one SudoRank question on a test, a candidate is supplied with only one virtual machine. The candidate logs on to the same machine to perform each task, and run all the post-submission scripts on the same machine in succession.
- You must be logged in to your HackerRank for Work account.
- Click Library tab on the home page and then click +New Question.
- In the Select a question type dialog box, click SudoRank.
- In the Problem Statement page, specify:
- Problem Name
The problem name should be short and topical. It should not give any hints to solve the problem.
While you can assign any score you want for the questions you create, we use certain standards for assigning scores to the questions we create that you might find useful.
For an easy question that can be solved in 15 minutes
For a medium question that can be solved in 30 minutes
For a difficult question that can be solved in 45 to 60 minutes
Tags are words or phrases that help with searchability and organization of your questions. You can add the existing tags or create new tags. When you later generate candidate reports, these tags help in generating performance graphs based on these tags.
- Problem Description
A good problem statement should comprise a clear and detailed problem description.
- Internal Notes
Internal notes are for later reference. You can include a rubric about scoring the questions or write solutions to the problems in this section. These can be used by your team while evaluating the test.
Note: Internal notes are only visible to your team and you; however, candidates cannot view these notes.
- Click Save & Proceed.
- In the Advanced Settings page:
- Select the appropriate radio button to choose the required operating system for the question.
Currently, Ubuntu and Red Hat Enterprize Linux (RHEL) are supported.
You can also select Independent of linux distribution radio button if the problem is not dependent on a particular operating system. This option is selected by default.
- Select the Yes radio button to enable root access for the question, if required.
You might want to enable root access to the questions where candidates would require special privileges to perform a task.
Note: Root access is provided via the 'sudo' command. Even if one question in the test requires root access, the candidate is provided with root access privilege on the machine.
- Click Save & Proceed.
- In the Scripts page, set up the following scripts:
- Configure the Setup script to set up the environment for the candidate to log in.
This script is run at server startup time before the candidate logs in. Here, you can install any packages for the candidates or create some sample input files for them to interact with. The Setup script timeout limit is 5 minutes.
- Configure the Check script to score and evaluate the performance of the candidate. This script is run once the candidate has submitted the code. You can create a custom scoring logic that suits your requirements. You can allow to award partial credit for the questions. This is a mandatory script. The Check script timeout limit is 20 minutes.
Refer the Scoring a SudoRank question topic to understand the required output format of the Check script.
- Configure the Solve script to store the correct answer to the problem.
You can add this script to solve the question. This is only for your reference and we do not run this script.This script is placed in the /tmp folder. When you try the test as a recruiter or admin, you can access this script for easy debugging and testing. This is an optional script.
Note: All these scripts are written in Bash.
- Click Save & Proceed.