Codility has developed a new Freeform Task Creation option, allowing authors to define conditions and expected behavior evaluated by unit tests.
Candidates receive explicit requirements specified through unit tests and are free to write code using more complex entities, to meet the unit test requirements. This approach offers authors a way to write tests for a broader range of problems with less effort and a lower risk of errors. Moreover, this way of testing is closer to how developers write and test code in practice. Candidates also benefit, as they now can use their creativity and problem-solving skills more freely.
The new Freeform tasks currently support 18 programming languages:
To create your own Freeform task, navigate to the Task Library and select "Create a task". Upon selecting this option, you'll find a list of task styles available and you can select Freeform tasks to begin creating your content.
Once you're on the editor, the first section to complete is the Task Details. Here you'll be able to complete the following fields for your task:
- Think of a name that will be easy to find for you and your colleagues to find in your Task Library.
- Write a short summary of what the task is about.
- Time limit
- We recommend setting a more relaxed time for candidates to solve the task.
This is the text your candidates will see in the Codility code editor.
Make sure the requirements and instructions are clear, so your candidates can easily understand the problem they will be solving.
As you work through completing each section, it is designed to autosave your work as you switch between sections. You can reference the top right of the page to see the saved confirmation for reference.
Now that you've completed the task details, it's time to work on the next section of the editor, the Problem description.
In this step, you'll be presented with a file tree that consists of 3 files: tests, initial, and golden. Each file will end with the extension related to the language your task is in. For example, if we were creating a Python task then you would see the files of tests.py, initial.py, and golden.py in the file tree.
- Tests file: Here is where you would write the unit tests for the task you have created.
- Initial file: This file is where you can specify the starting code available to the candidate when the task first loads in the editor.
- Golden file: The golden file is where you can write your perfect solution for the described problem you've created.
Once you've completed the file tree for your task, be sure to use the Run Tests option to validate your content. The Run Tests option will evaluate your Golden file against the test cases you created and ensure the output matches the expected unit test. If a unit test fails, you will see which unit test the Golden solution failed so that you may review and edit as needed.
Once you're happy with your task, the final step is to Publish your task. You will find the Publish Task button located at the top right. During this step, we will automatically evaluate the AI Resistance of your custom task. This process may take a few minutes to complete and you will have the option to Skip and Publish if you prefer.
You'll then be able to see your published task in the library and have the ability to use the "Try task out" button if you'd like to give it a test drive.
(Important note: Trying a task out does not deduct an invite from your account balance).
Additionally, when searching for your task in the Task Library, you'll find it located under the Company Tasks tab. Any unpublished Freeform task will be available for you to review and continue editing under the Freeform task drafts tab.
Feel free to reach out to your Customer Success Manager or email@example.com if you have any additional questions.