I have set up a small testing scripts for the second assessed coursework (note this is not the full test suite that will be used in evaluating submissions). The tests live on the following machine.

   inf900179.inf.susx.ac.uk 	

You log into this machine using a secure shell (ssh) in a two hop process as follows.

  1. Connect to Sussex unix service:
       ssh username@unix.sussex.ac.uk
  2. Connect to Server from unix.sussex.ac.uk to inf900179.inf.susx.ac.uk (the test server) using
       ssh username@inf900179.inf.susx.ac.uk

Here ssh is an SSH client, you can of course also use any other SSH client; and username is your Sussex login. Note that you can only log into inf900179.inf.susx.ac.uk from an 'official' machine like unix.sussex.ac.uk. This is due to the university's firewalling policy.

BTW, if you are on Windows, you can use a tool like winSCP (installed on lab computers) or PuTTY (https://www.putty.org/) to log into remote machines (PuTTY is already installed on lab machines, too).

Setting up tests for Task 1.

  1. Go to your home directory (on inf900179) by executing cd ~
  2. If you have a directory named task1, remove it: rm -rf task1.
  3. Copy /usr/share/all1.tar into your home directory (on inf900179), i.e.
       cp /usr/share/all1.tar .
    Note the terminal period. is part of the command!
  4. Unarchieve the file all1.tar by executing tar xf all1.tar This will create a new directory task1.

Running tests for Task 1.

  1. Upload your submission for Task 1 into the directory task1.
  2. Change into the directory task1: cd task1
  3. To check that your code compiles correctly, simply compile: javac *.java and to run the full test suite, execute: ./runtests. Note that this takes quite a while (up to 45 seconds). You find the tests programs executed in the subdirectory tests/task1. The result of the test will be in a file called results-task1.txt.

Tasks 2 and 3. You proceed just as with Task 1 above, but replace occurrences of the number 1 by 2 and 3, e.g. tar xf all2.tar

Copying data to / from the tester machine.

Copying files from the intermediate machine to the machine with the tester scripts can be done with the scp command. Let's say I want to transfer a file named MySolutions.zip, then you could copy it over like so:

	    scp  MySolutions.zip  inf900179.inf.susx.ac.uk:
	  
Note that scp is a mnemonic for "secure copy". Naturally, you can also copy data the other way (from the tester machine to some other internet connected computer).


Note. I have only tried out the test suite against my own example solutions. There may be various glitches when compiled against other solutions. If you encounter problems that you think are not caused by your solution, please let me know.