CS 2334: Web-Cat Instructions
Configuring Eclipse (do these once)
Install the Web-Cat Plug-In
- Help menu: select Install New Software
- Click Add
- Enter Name: WebCAT Plugin
- Enter Location: http://web-cat.org/eclipse
- Click OK
- Click Select All and Next
- Click Next
- Read license, select Accept, click Finish
- Wait
- Security warning: click OK
- Restart Eclipse: click Yes
- Eclipse restarts
- Window menu: select Preferences
- Select: Configured Assignments
- Fill in the Submit URL as:
http://web-cat.cs.ou.edu/WebObjects/Web-CAT.woa/wa/assignments/eclipse?institution=OU
- Click: OK
Using spaces instead of tabs
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:
- Window menu: select preferences
- Select Java/Code Style/Formatter
- Click New to create a custom profile
- Click OK
- Click the Indentation tab
- Under General Settings/Tab Policy: select Spaces
Only
- Also select Statements within switch body
- Under White Space/Control Structures/if-else, select before opening
parenthesis
- Under White Space/Expressions/Function Invocations,
select before opening parenthesis
- Under the Braces tab, select next line on all
items (expect, perhaps, Array initializer)
- Under the Control Statements tab, select Insert New Line Before else/catch/finally (three check boxes)
- Click Apply. Click OK until you are out of the
preferences menu.
Submitting to Web-Cat
Method 1: Submitting from Eclipse
- Complete the writing and testing of your project.
- Project menu: select Submit Assignment
- Project text box: make sure that your current project is selected
- Under Select the assignment to submit, select CS
2334/[assignment name], where assignment name
corresponds to the current assignment.
- Do this once: Click Change username and password. Enter
your Web-Cat username and password. Click OK
- (back to Submit an assignment for grading window)
Click Finish
- 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:
- From the File menu, select Export.
- Select Java/JAR File. Click Next.
- Select and expand your project folder.
- Select your src and doc folders.
- Select Export Java source files and resources.
- Select an export destination location (e.g., your Documents
folder/directory). This file should end in .jar
- Select Add directory entries.
- Click Finish.
- In your web browswer, login to the Web-Cat server.
- Click the Submit button.
- Browse to your jar file.
- Click the Upload Submission button.
- 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.
- 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. Starting with lab 2, you
will also produce your own unit tests.
The Web-Cat report includes a lot of information. Here are the key
pieces:
Result Summary
- Total Score: this is your grade at the current time. It may or
may not include human-added points.
- Score Summary:
File Details
This section lists all of your graded Java files and indicates the
number of points that were deducted due to the static code checker.
You can click through each of the files. For each file, you will see:
- Comments about where points were deducted by the static checker
- Any notes left by the grader
- (this feature is not active yet) Highlighting of your code based on your own unit tests:
- Green: code blocks that were "touched" by one or more
unit tests
- Yellow: a branch ("if" statement) for which either the
true or false cases were tested, but
not both
- Red: code blocks that were not "touched" by one of your
unit tests
TA/Instructor Comments
We will place any high-level comments in this section as we are
completing the human grading step.
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.
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.
Code Coverage from Your Tests
This section reports how much of your main classes are tested by your
set of unit tests. Note: this feature is currently not working on
the server. You will always see "No Coverage."
Estimate of Problem Coverage
This section summarizes the degree to which your submission passed our
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.
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:
- Proper indentation with no tabs. You can force Eclipse to
reformat your code properly by using: Ctrl-a to select all of
your code and Ctrl-i to indent the selected code. Remember to
save before you resubmit your code
- Properly formatted class-level documentation. This is a
Javadoc section at the top of each file that includes:
- @author line
- @version line. Your version should be the date that you
created the Java file for the first time.
- Properly formatted method-level documentation. This is a
Javadoc section that is placed ahead of each method that
includes:
- @param line for each parameter (if there are parameters)
- @return line if the method returns a value
- A space between a conditional and the subsequent open
parenthesis. For example:
if (x < 5)
not:
if(x < 5)
- Each curly bracket must have its own line. For example:
if (x < 5)
{
++y;
}
not:
if (x < 5) {
++y;
}
- All blocks must have curly brackets. For example
if (x < 5)
{
++y;
}
not:
if (x < 5)
++y;
- Lines must not exceed 80 characters in length.
- All declared variables must be used.
- All import statements must be used.
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 149 other people using the server at the same time.
Notes
- Browser: we are aware that older versions of Firefox do not
function properly with Web-Cat. When in doubt, you can set a
different default browser for Eclipse under: Window Menu/Preferences/General/Web Browser
- Always use the default package in Eclipse -- do not create your
own packages.
- Do not use the Web-Cat server to do debugging. You should make
sure that your code is executing without problems on your local
computer before submitting the code.
- The Web-Cat server won't do automatic grading if it can't
compile your code. If you are receiving zeros for both
automatically graded items, then this is a clue that you have a
compiler error. See the Compilation Produced
Errors/Warnings section of your Web-Cat feedback for more
detail
FAQ
andrewhfagg--gmail.com
Last modified: Wed Sep 28 15:32:31 2016