You can create DevOps questions that help to assess the Linux skills of a candidate. When a candidate takes a test comprising of DevOps 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 DevOps 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 DevOps questions, which differs from other question types where the candidate views the problem statement and enters their solution on the same page. This article will take you through the steps in creating a DevOps question.
Note: Even if there is more than one DevOps question in 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. DevOps questions can only be used in Tests and not imported in Interviews at this point.
Steps to Create a DevOps Question
- Click on the Library tab on the home page, and then click on the Create Question button.
- In the Select Question Type dialog box, select the DevOps question type.
In the Problem Statement page, specify:
A. 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. Refer to the Scoring a DevOps Question topic for more information.
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 and set the difficulty level for your Question by associating the tags as Easy, Medium or Hard. Alternatively, associate custom Tags to identify your Question by its complexity or levels.
a. Click the Tags drop-down, and type a keyword. Example, Easy.
b. Click Add, the “Easy” tag is associated with the Question.
When you view your Questions in the Library, the associated tags will be indicated for every Question. You can use these Tags to generate candidate reports and performance graphs.
Refer, Associating the Tags for Questions for more information.
D. Problem Description
- A good problem statement should comprise a clear and detailed problem description.
E. Interviewer Guidelines
- Interviewer Guidelines 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: Interviewer Guidelines are only visible to your team and you; however, candidates cannot view these notes.
You can support your problem statement and internal notes by attaching a relevant reference file in these sections. Refer to the How to Attach a File to a Problem Statement topic for more information.
- Click on the Save & Proceed button.
On the Advanced Settings page:
- Select the appropriate radio button to choose the required operating system for the question. Currently, Ubuntu 18.04, and Red Hat Enterprise Linux 8.0 (RHEL) are supported.
- The Independent of linux distribution radio button is selected by default, and you can retain this selection if the question is not dependent on a particular operating system.
- Select the Yes radio button to enable root access for the question, if required.
You might want to enable root access to 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 on the Save & Proceed button.
On 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 awarding partial credit for the questions. This is a mandatory script. The Check script timeout limit is 20 minutes. Refer to the Scoring a DevOps 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.
Defining the setup and check scripts for the Question
- Click on the Save & Proceed button. If there are any errors in your Setup, Check or Solve scripts, you will be prompted to fix these errors before proceeding to save the Question.
- The Questions you create are stored in the HackerRank Library under the “My company questions” section. The Question type and the associated tags are indicated below every Question title as shown below.
While in the Library, you can proceed to create more questions or add Questions to your Tests.