Chapter 3: Programming Courseworks

LabTS

face Josiah Wang Tim Kimber Tom Crossland

Now that you’ve pushed your changes to GitLab, you can check the code against the autotesting system – called LabTS.

You can access LabTS at teaching.doc.ic.ac.uk/labts.

LabTS was developed within DoC by Dr Mark Law, Dr Mark Wheelhouse and Dr Tristan Allwood. It’s part of the infrastructure used to manage coding exercises in the department. It uses the GitLab system and can access and run the code that you have pushed to the server.

The LabTS web site shows all the exercises that have been set for you in your modules. It allows you to run a set of tests provided by course leader – these tests are run on a version of your code at a given commit. You can then select one of these commits as a submission for the coursework.

LabTS landing page

LabTS is allows you to check your work before submitting. The same system (but not necessarily the same tests!) will be used to perform automatic testing that will be used by your markers. So, using LabTS means you can see whether your code runs and produces output in the test environment.

LabTS should not be used to do the bulk of your testing during development. That should be done locally on whichever machine you’re writing the code on. LabTS is for doing occasional ‘sanity checks’.

LabTS does not mark your work. Testing is not the same as marking, and passing all the tests does not imply that your code is faultless. Your markers will be looking at the code itself. They will have the test output to help them understand what you have done and award a mark. So, make your code presentable. In fact, make it beautiful.

Exercise 7

  1. Log in to LabTS.
  2. You should see a link for the mock exercise, named LabTS Exercise. Click on this link. You will see a page showing the commits in your exercise repo.
  3. Run the LabTS autotests for the commit you just made – you can identify it by the commit message you used. It might take a little while to run, just be patient!

There are two tests, one for the Python script and one for the C++ script. Assuming you only adjusted one of them (and did so correctly!), you should see a score of 1/2 when the testing finishes.