How to deploy Web-CAT automatic grading system on Ubuntu 14.04

A teacher in my school where I'm working asked me about an automatic grading software because he will teach a programming course (python) next year. After searching around Google, I found Web-CAT. The following is an excerpt from Web-CAT's website:

Web-CAT is an advanced automated grading system that can grade students on how well they test their own code. It is free, open-source software. It is highly customizable and extensible, and supports virtually any model of program grading, assessment, and feedback generation. Web-CAT is implemented a web application with a plug-in-style architecture so that it also can serve as a platform for providing additional student support services to help students learn programming or software testing. Some of its key features:
  • Customizable and extensible
  • Plug-in-style architecture
  • Supports student-written tests, measurement of test coverage, and grading on test thoroughness
  • Supports static analysis tools to assess documentation and coding style
  • Supports manual grading with direct on-line markup of assignments

I's trying to deploy it on my computer and successfully made it running following these steps:

1. Install Apache Tomcat 7 and components:

$ sudo apt-get install tomcat7

After the installation process finished, you can go to your browser and try http://localhost:8080



In addition, you can also install documentations, admin web interface, examples:

$ sudo apt-get install tomcat7-docs tomcat7-admin tomcat7-examples

There are several places (in Ubuntu) you should keep in mind:

  1. Configuration: /etc/tomcat7/
  2. Logs: /var/logs/tomcat7/
  3. Cache: /var/cache/tomcat7/
  4. Default apps root (where to place your apps): /var/lib/tomcat7/webapps/
  5. Tomcat Admin app: /usr/share/tomcat7-admin/


2. Configure Tomcat:

a. If you want to change the port (8080) to whatever port you want (e.g. 8085), edit the file /etc/tomcat7/server.xml:

$ sudo nano /etc/tomcat7/server.xml

change the following:
...
 <Connector port="8088" protocol="HTTP/1.1"
               connectionTimeout="20000"
               URIEncoding="UTF-8"
               redirectPort="8443" />
...

to:
...
 <Connector port="8085" protocol="HTTP/1.1"
               connectionTimeout="20000"
               URIEncoding="UTF-8"
               redirectPort="8443" />
...

restart tomcat:

$ sudo service tomcat7 restart

b. Add the admin user:

$ sudo nano /etc/tomcat7/tomcat-users.xml

Inside the block <tomcat-users>...</tomcat-users>, add this:

<user username="myusername" password="MyPassword" roles="manager-gui,admin-gui"/>

Restart tomcat:

$ sudo service tomcat7 restart

Now you can access the admin web interface of Tomcat via this url: http://localhost:8085/manager
(the port is now changed from 8080 to 8085). Use the password



c. Increase the max upload file size limit of tomcat admin interface to 100MB (for uploading Web-CAT war file):

$ sudo nano /usr/share/tomcat7-admin/manager/WEB-INF/web.xml

...
    <multipart-config>
      <!-- 100MB max -->
      <max-file-size>104857600</max-file-size>
      <max-request-size>104857600</max-request-size>
      <file-size-threshold>0</file-size-threshold>
    </multipart-config>
...

restart tomcat:

$ sudo service tomcat7 restart


3. Download and install Web-CAT:

a. Download: go to http://sourceforge.net/projects/web-cat/files/latest/download?source=files and download the latest Web-CAT war file (it's Web-CAT_1.4.0.war in my case).

b. Go to tomcat admin interface, upload the war file and deploy the app:


After the tomcat admin finishes processing web-CAT war file successfully, you should see this message at the top:

Message: 
OK - Started application at context path /Web-CAT_1.4.0

c. Setup Web-CAT the first time:

* Go to http://localhost:8085/Web-CAT_1.4.0/ and following the steps to configure Web-CAT:









4. Web_CAT interface overview:





Comments