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 Puppet

Every Puppet module in your project will be tested with the following commands:

bundle install
bundle exec rake spec_clean
bundle exec rake ci:setup:rspec spec

We use rspec-puppet for testing Puppet code together with CI:Reporter.

Please check the provided Gemfile for the list of dependencies.

Note: When you will be creating a ZIP archive with project contents, please skip reports/, spec/fixtures/ and .bundle/directories.

Automatic assessment

It is possible to automatically assess the solution posted by the candidate. Automatic assessment is based on unit tests results and code quality measurements.

There are two kinds of unit tests:

  1. Candidate tests - unit tests that the candidate can see during the test should be used only for basic verification and to guide the candidate in understanding the requirements of the project. Candidate tests WILL NOT be used to calculate the final score.
  2. Verification tests - unit tests that the candidate can’t see during the test. Files containing verification tests will be added to the project after the candidate finishes the test and will be executed during the verification phase. The results of the verification tests will be used to calculate the final score.

Once the solution is developed and submitted, the platform executes verification tests and performs static code analysis.

Devskiller project descriptor

Programming tasks can be configured with the Devskiller project descriptor file:

  1. Create adevskiller.jsonfile.
  2. Place it in the root directory of your project.

Here is an example project descriptor:

    "verification" : {
        "testNamePatterns" : [ ".*Verification.*" ],
        "pathPatterns" : [ "**spec/**/**_verify_**" ]

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

Automatic verification with verification tests

The solution submitted by the candidate may be verified using automated tests. You’ll just have to define which tests should be treated as verification tests.

All files classified as verification tests will be removed from the project prior to inviting the candidate.

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

  • testNamePatterns  - an array of RegEx patterns which should match all the names of the verification tests.
  • 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 to the candidate during the test.

In our sample project all verification tests names are prefixed with [module_name] Verification string and are located in spec subdirectories. In this case the following patterns will be sufficient:

"testNamePatterns" : [ ".*Verification.*" ],
"pathPatterns" : [ "**/spec/**/**_verify_**" ]
Did this answer your question?