TIP: Please make sure to read Getting started with programming tasks first.

You can start with our sample project that can be found on GitHub:

Open sample project.

Download sample project. 

Technical details for JavaScript with Gulp support

Any Gulp project might be used as a programming task. We support Karma for unit tests, npm and bower for external dependencies.

The project will be executed with following commands:

npm install
bower install
gulp test

Important: NPMv2 will be used to build the project.

Note: When you will be creating a ZIP package with project contents, please skip node_modules and bower_components folders. Your code pack must contain a Gulpfile.js file. Unit tests executed during the build might be used to perform an automatic evaluation of candidate's answer

Automatic assessment

It is possible to automatically assess solution posted by the candidate. Automatic assessment is based on Unit Tests results and Code Quality measurements.

All unit tests that are executed during the build will be detected by the Devskiller platform. However, it is required to add a karma-junit-reporter plugin to karma configuration and set it to output tests results to test-results.xml:

  var configuration = {
    // ...
    plugins : [
    ],    //...
    junitReporter: {
      outputFile: 'test-results.xml'
    }  };

Check karma.conf.js in the sample project for a full Karma configuration.

There are two kinds of unit tests:

  1. Candidate tests - unit tests that are visible for the candidate during the test. Should be used to do only the basic verification and help the candidate to understand the requirements. Candidate tests WILL NOT be used to calculate the final score.
  2. Verification tests - unit tests that are hidden from the candidate during the test. Files containing verification tests will be added to the project after the candidate finishes the test and will be executed during verification phase. Verification tests result will be used to calculate the final score.

After candidate finishes the test, our platform builds the project posted by the candidate and executes verification tests and static code analysis.

Devskiller project descriptor

Programming task can be configured with the Devskiller project descriptor file. Just create a devskiller.json file and place it in the root directory of your project. Here is an example project descriptor:

  "verification": {
    "testNamePatterns": [".*verify_pack.*"],
    "pathPatterns": ["**verify_pack**"]
  "readOnlyFiles" : [ "src/index.html", "gulp/**" ]

You can find more details about devskiller.json descriptor in our documentation.

Automatic verification with verification tests

To enable automatic verification of candidates' solution, you need to define which tests should be treated as verification tests.

All files classified as verification tests will be removed from a project prepared for the candidate.

To define verification tests, you need to set two configuration properties in devskiller.json project descriptor:

  • testNamePatterns - an array of RegEx patterns which should match all the test names of verification tests. Test name contains: PhantomJS 1.9.8 (Linux 0.0.0).[test_suite_name]. In our sample project all verification tests are in a test suite starting with verify_pack string, so the following pattern will be sufficient:
"testNamePatterns" : [".*verify_pack.*"]
  • pathPatterns - an array of GLOB patterns which should match all the files containing verification tests. All the files that match defined patterns will be deleted from candidates' projects and will be added to the projects during the verification phase. These files will not be visible for candidate during the test. In our sample project all verification tests are in verify_pack subfolder, so the following pattern will be sufficient:
"pathPatterns": ["**verify_pack**"]
Did this answer your question?