CS 2334: Web-Cat Instructions

Configuring Eclipse (do these once)

Install the Web-Cat Plug-In

  1. Help menu: select Install New Software
  2. Click Add
  3. Enter Name: WebCAT Plugin
  4. Enter Location: http://web-cat.org/eclipse
  5. Click OK
  6. Click Select All and Next
  7. Click Next
  8. Read license, select Accept, click Finish
  9. Wait
  10. Security warning: click OK
  11. Restart Eclipse: click Yes
  12. Eclipse restarts
  13. Window menu: select Preferences
  14. Select: Configured Assignments
  15. Fill in the Submit URL as:
    http://web-cat2.cs.ou.edu/WebObjects/Web-CAT.woa/wa/assignments/eclipse?institution=OU

  16. Click: OK

Using spaces instead of tabs (and other configuration steps)

The Web-Cat style checker expects that all indentation be done with spaces instead of tabs. This makes your code more portable because a tab can translate into different amounts of space depending on the viewer. Here is the process for informing Eclipse that it should use spaces instead of tabs for indentation:
  1. Window menu: select preferences
  2. Select Java/Code Style/Formatter
  3. Click New to create a custom profile
  4. Click OK
  5. Click the Indentation tab
  6. Under General Settings/Tab Policy: select Spaces Only
  7. Also select Statements within switch body
  8. Under White Space/Control Structures/if-else, select before opening parenthesis
  9. Under the Braces tab, select next line on all items (except, perhaps, Array initializer)
  10. Under the Control Statements tab, select Insert New Line Before else/catch/finally/while (four check boxes)
  11. Click Apply. Click OK until you are back to the preferences menu.
  12. In the preferences menu: select General tab, select Editors/Text Editors/Show Print Margin and set the Print Margin Column to 120.
  13. Click Apply. Click OK until you are out of the preferences menu.


Submitting to Web-Cat

Method 1: Submitting from Eclipse
  1. Complete the writing and testing of your project.
  2. Project menu: select Submit Assignment
  3. Project text box: make sure that your current project is selected
  4. Under Select the assignment to submit, select CS 2334/[assignment name], where assignment name corresponds to the current assignment.
  5. Do this once: Click Change username and password. Enter your Web-Cat username and password. Click OK
  6. (back to Submit an assignment for grading window) Click Finish
  7. Your browser should automatically open a Web-Cat page that shows your submission being graded. After a short wait, the page will show a report of your submission.

Method 2: Submitting directly to the Web-Cat server:

  1. From the File menu, select Export.
  2. Select Java/JAR File. Click Next.
  3. Select and expand your project folder.
  4. Select your src and doc folders.
  5. Select Export Java source files and resources.
  6. Select an export destination location (e.g., your Documents folder/directory). This file should end in .jar
  7. Select Add directory entries.
  8. Click Finish.
  9. In your web browser, login to the Web-Cat server.
  10. Click the Submit button.
  11. Browse to your jar file.
  12. Click the Upload Submission button.
  13. The next page will give you a list of all files that you are uploading. If you selected the correct jar file, then click the Confirm button.
  14. Your browser will then open a Web-Cat page that shows your submission being graded. After a short wait, the page will show a report of your submission. See the main class web page for a link that describes the Web-Cat output.


Interpreting the Web-Cat Report

Note 1: Your code grades depend on both automatic and human grader input. When you first submit code, you will only have access to the automatically graded components; the human input will be made available after the submission deadline.

Note 2: Unit tests are special segments of code that are designed to test your program. We will always provide a set of unit tests to check the correctness of your submission. While you will not be given the content of these tests, you will get a report on which tests passed and which ones failed.

Note 3: You will be implementing your own unit tests starting with lab 2.

The Web-Cat report includes a lot of information. Here are the key pieces:

Result Summary

File Details

This section lists all of your graded Java files and indicates the number of points that were deducted by the static code checker. You can click through each of the files. For each file, you will see:

TA/Instructor Comments

We will place any high-level comments in this section as we are completing the human grading step. These comments will include discussion of any deducted points not already noted directly in your code.

Compilation Produced Errors/Warnings

This section gives the output of the compiler as it attempted to compile your code. If you are not receiving automatic feedback, then you likely have a compiler error that you must address. Looking carefully at the compiler output, you will see that the nature of the error is discussed in detail, including the source file name and the line number.

Note that compiler errors should largely be getting caught by Eclipse as you are testing your code locally. A very common case that will not be caught is when our unit tests do not compile against your code. This happens when you deviate from the API required by the lab/project specification.

Results from Running Your Tests

This section gives a summary of your individual unit tests and, for each one, indicates whether your code passed or failed the unit test. Before you submit your code to Web-Cat, your own tests should already be passing (in which case, you should not have trouble here).

Code Coverage from Your Tests

This section reports how much of your code base is covered by your own unit tests. In Eclipse, you can test coverage on your local machine (we will discuss this in Lab 2). If you are passing these coverage tests, then you will pass them on the server.

Estimate of Problem Coverage

This section summarizes the degree to which your submission passed our unit tests. You will be able to see the percent of passed tests and a few hints, but you will not have access to the specifics of the failing tests. In general failing a test here, while passing all of your own unit tests suggests that your own tests are incomplete.


Style Checks

The Web-Cat server will confirm that your code adheres to specific style requirements. Any deviations from these requirements will result in point subtractions from your Style/Coding grade (-1 or -2, depending on the type of error). Here are the key things that the static code analyzer checks for:


Resubmission

Based on the feedback from the Web-Cat server, you may alter your program and, up until the deadline, resubmit it. Please do not abuse this ability, as there are many other people using the server at the same time. Note that the server will stop providing feedback at some time before the project deadline.


Notes


andrewhfagg--gmail.com

Last modified: Fri Aug 25 17:21:07 2017