Creating a custom coding test

Article 5 of 5 in a series on creating your own tests.

This is the fifth article in a series of five, to help you create your own tests using the TestGorilla platform. The full series includes:

  1. Developing an effective screening test
  2. Choosing a question type
  3. Writing situational judgment questions
  4. How to create your own test
  5. Creating a custom coding test 

 

Account owners, admins, and recruiters on our Pro plans can add their own tests.

When creating your own test, we recommend outlining it before putting it into the TestGorilla platform. This will help ensure that everything is organized and laid out exactly as you want.

Approx. reading time 8 minutes

IMPORTANT UPDATE:

Custom coding questions are no longer available on our platform. You can now create custom coding tests instead, offering a more streamlined and flexible experience. All previously created custom coding questions have been archived.

 

In this article

  1. What is a custom coding test?
  2. Creating a custom coding test
  3. Language-agnostic coding tests
  4. Common questions
  5. Next step

 

What is a custom coding test?

Custom coding tests are used to assess a candidate’s ability to create or debug code in a specified language within a certain time limit. Unlike coding questions, custom coding tests allow for more flexibility and collaboration and are easier to create, edit, and test.

Custom coding tests are:

  • Language agnostic, allowing candidates to choose from a variety of programming languages.
  • Designed to provide a consistent candidate experience by including one question per test.
  • Built for collaboration, enabling multiple users to contribute to the creation process.

 

Who can create a coding question?

Any user with the Owner, Admin, or Recruiter role is able to create a custom coding test or question. Due to the highly technical nature of coding tests, you are required to have an expert in your required coding language create your questions for you.

Note: TestGorilla cannot assist you with the content of custom tests. Any tests you create yourself must be an original creation.

 

Available coding languages

We currently have 20 coding languages available, which can be used in both tests and questions:

  • C: 10.2.0
  • C# : 6.12.0
  • C++ : 10.2.0
  • Go:  1.16.2
  • Java: 15.0.2
  • JavaScript: 18.15.0
  • Kotlin: 1.8.20
  • PHP:  8.2.3
  • Python:  3.10.0
  • R: 4.1.1
  • Ruby:  3.0.1
  • Scala: 3.2.2
  • SQL: SQLite 3.31.1
  • Swift: 5.3.3
  • Typescript:  5.0.3

The following languages are available for language-agnostic tests:

  • Dart: 2.19.6
  • Elixir: 1.11.3
  • Erlang: 23.0.0
  • Julia: 1.8.5
  • Perl: 5.36.0
  • Rust: 1.68.2
Note: Only one language can be used per test or question.

 

 

Creating a custom coding test

Create the custom coding test

  1. In your TestGorilla account, click on your name to open the right-hand drop-down menu.
  2. Select Test Library.
  3. From here, select My company tests on the right.
  4. Finally, select Create New Test.

Add your test details

  1. Name your new custom coding test
  2. Write a Test Summary.
  3. In Question Type, select Coding (programming languages).
  4. In Programming Languages, select the programming languages you want to allow for the coding challenge. Your candidates will be able to take the test in any of the programming languages that you choose in this section. You can also choose to select all or select only one.
  5. Complete additional metadata (for your internal use): Difficulty level, Language, and to whom this test is relevant.
  6. When you’ve entered all the information, select Save.

Go to the Questions section

Once you’ve saved your basic test information, select Questions to the left of the screen to create your coding questions.

Create a coding question

1. Test description

Complete, on the left side of the screen, the instructions for the coding challenge that candidates will see.

2. Test cases

Test cases consist of pairs of inputs and their corresponding expected outputs. In other words, they define the relationship between input variables and the output a function should produce if it is implemented correctly. By testing a function with these predefined input-output pairs, you can verify whether it behaves as intended.

  • Visible to candidates for self-evaluation: You can configure pre-set test cases that will be visible to candidates during the challenge. These test cases allow candidates to test their code and verify its functionality. While candidates can create their own test cases, configuring pre-set ones can guide them and provide a clearer framework for self-evaluation.
  • Hidden to candidates, used for calculating the test score: these test cases remain hidden from candidates and are used to calculate the test score. Candidates' code will be evaluated against these cases, with the score increasing based on the number of test cases that pass successfully.
Note: If the function has multiple inputs or outputs, please map each variable in a new line.

 

Example: If you have 3 variables as input to your function (n=1, x=2, y=5) then in the test case’s input you should write:

1
2

 

3. Initial code

You can choose to configure the initial code that your candidates will see, for all of the programming languages you have selected. This is optional, but recommended to ensure a better candidate experience.

Note: For the coding challenge to work properly, the code needs to:
  • Read the inputs, one per line
  • Contain the function that solves the coding challenge
  • Run the function and print the expected output

 

Example: This is an example initial code for Python, for a function that has 3 variables as input and one variable as output:

n = int(input())
x = int(input())
y = int(input())
def FunctionName(n, x, y):
#Write your code here
result = FunctionName(n, x, y)
print(result)

Save your test

The verification code is basically the model answer. You need to code it and run it to ensure all test cases you entered are passed. This process only needs to be done for one programming language and is required before you are able to save the question.

 

Language-agnostic coding tests

With our language-agnostic coding tests, you can configure which programming languages are available for candidates to use. Candidates can choose from any of the 20 supported languages.

Language-agnostic tests allow candidates to:

  • Select their preferred language.
  • Access onboarding tooltips and practice questions.
  • Personalize the integrated development environment (IDE) to match their preferences.

 

Common questions

Is there a limit to the number of coding tests in an assessment?
Depending on your plan, you can include up to 5 tests per assessment. Consider assessment length carefully to avoid overwhelming candidates.

Can I edit an existing custom coding test?
Yes, you can edit your custom coding tests at any time to update languages, test cases, or other details.

 

Next steps

While not included in this series, we do have other articles that are helpful when making your own test that are worth taking a look at. They are:

Was this article helpful?
16 out of 24 found this helpful

Articles in this section