Skip to content
Test My Code exercise server used by e.g.
Branch: master
Clone or download
nygrenh Merge pull request #476 from RTMC/master
.R files are recognized only if they are inside folder R/
Latest commit 8cd35e2 Apr 19, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
app .R files are recognized only if they are inside folder R/ Dec 19, 2017
bin Added doorkeeper Mar 25, 2016
config Add endpoint for the last hour's submissions Nov 30, 2017
db Change created_at attribute creation procedure for awarded point to n… Aug 11, 2017
doc More whitespace and better readability in User Manual Aug 16, 2016
ext Upgrade the tmc-sandbox submodule Oct 30, 2016
lib Always sandbox error logs human readable Nov 29, 2017
script Code style auto-corrections by RuboCop Feb 18, 2015
test Code style auto-corrections by RuboCop Feb 18, 2015
vendor DateTimePicker for deadlines Aug 4, 2015
.dockerignore Ignore more stuff Sep 22, 2016
.gitignore automatically created manual things back to gitignore Oct 8, 2016
.hound.yml Add .hound.yml Nov 25, 2016
.rspec Initial commit of code by written by students + README + LICENSE. Jul 4, 2011
.rubocop.yml Add .hound.yml Nov 25, 2016 Fix usermanual build for build requests Mar 23, 2016
.travis.yml Split student usecases and reshard travis Mar 31, 2016 Reflect changes to changelog Jan 29, 2016 Configure RuboCop Feb 18, 2015
Dockerfile Refactor dockerfiles Sep 22, 2016
DockerfileBase Refactor dockerfiles Sep 22, 2016
Gemfile Order dependencies lexicographically in Gemfile Mar 17, 2017
Gemfile.lock Minor updates and fixes Sep 27, 2016
LICENSE Initial commit of code by written by students + README + LICENSE. Jul 4, 2011
README.markdown mpartel not a current maintainer; linked to rage Oct 4, 2017
Rakefile another junit formatter for rsec and jenkins Feb 17, 2013
common.yml Allow running tests in docker containers Aug 16, 2016 Implemented password reset. Jan 17, 2012 Dev env Sep 22, 2016
docker-compose-dev.yml Fix bg tasks Sep 22, 2016
docker-compose-remote-sandbox-dev.yml docker compose file for running dev using remote sandbox, fixed entry… Oct 19, 2016
docker-compose.yml Fix random issues with tmc-sandbox Sep 12, 2016 docker compose file for running dev using remote sandbox, fixed entry… Oct 19, 2016
rubysudo Improved dev scripts. Feb 1, 2014 unset set -v after setup is done Apr 6, 2016


Test My Code server

Test My Code ("TMC") is a tool to automate most of the exercise checking when teaching programming. It runs code submitted by students, gives feedback if tests fail and maintains a scoreboard. This allows for lots of small exercises without the need for course instructors to manually go through all of them.

The system has been used with great success by the University of Helsinki CS Dept. in several elementary programming and data structures courses with hundreds of users.


Automatically built usermanual can be viewed at:


For setup and startup instructions, please see the installation guide.

Running dev in Docker

Before running dev in docker one needs to do some manual setup:

  • git submodule update --init --recursive
  • rake compile To build neccessary external dependencies.

The dev docker mounts local folder to the image and allows code changes to be visible in real time. Dev environment can be run with docker-compose: docker-compose -f docker-compose-dev.yml up

To run rails migrations etc you may exec those like this: docker exec -it tmcserver_dev_1 rake db:create db:migrate db:seed.

The container name can be checked with docker ps

Running tests in parallel

Tests can be run parallel with docker-compose. This expects you to have functioning docker and docker-compose setup.

For collecting test results from different testruns you need to clone and use this: Basically you wan't to clone the repo and bundle install once and run rackup --host --port 4567 to have it accessible from the testruns running in docker.

Once it's running run all tests by executing env REPORT_URL=<IP OF DOCKER INTERFACE> docker-compose up --build and see test results flowing to rspec test result aggregator.

The test environment builds hermetic images for each testrun by including all source files to the testrun container. Thus we need to use --build (or trust docker to detect changes in directories) to run tests for newest code.

API Documentation

API documentation can be found at


The project is maintained by the Agile Education research group.

The project used to be maintained by:

The project started as a Software Engineering Lab project at the University of Helsinki CS Dept. but has since been gradually almost completely rewritten. The original authors of the server component were

  • Patrik Marjanen
  • Jarno Mynttinen
  • Martti Rannanjärvi (mrannanj)
  • Katri Rantanen

Another team wrote a NetBeans plugin for the system.

The course instructor was Martin Pärtel (mpartel). Other closely involved instructors were

  • Matti Luukkainen (mluukkai)
  • Antti Laaksonen
  • Arto Vihavainen
  • Jaakko Kurhila

The system was improved and C language support was added in another SE lab project by

Checkstyle-support was integrated by



You can’t perform that action at this time.