Contents:

Introduction

Students in CSE331 are required to submit the implementation parts of their assignments electronically. Many assignments have two submission phases: the first is the original assignment submission (due by the date listed at the top of the assignment), and the second is a "returnin" submission, which gives you a second chance to improve your graded original submission.

We collect your assignments from your SVN repository. Thus, you must commit your files to SVN. For the original submission, this is sufficient. However, the validate step is highly recommended.

validate

Validating your code checks it for common errors, such as your code not compiling correctly on CSE331. Such errors could prevent you from receiving credit for your code, so you should always validate your assignment before you complete it . However, validation is not guaranteed to catch all errors in your code.

You should validate your assignment by running ant validate. This checks out a fresh copy of your code (to a temporary directory) and ensures that your implementation:

Most ant targets that the staff supplies should work both in the Allen Center software labs and on your home computer, but ant validate only works on attu. This is because we grade your solutions on attu, so it is important to verify that your code compiles and runs correctly in exactly that environment. validate does not work well with Eclipse's integrated Ant support either, so even if you are using Eclipse as your development environment, you should validate on the command line by running the following on attu:

cd ~/workspace331/cse331/src/hwN/
ant validate

You can do this via SSH from any machine. (Even if you are working on an Allen Center Linux machine you still need to SSH into attu.) If you are working at home you will first need to check out a copy of your code on attu using the command line. Note that if you check out your working copy in the location suggested there, the path to your project (as listed in the directions above and in the ouput below) will not include the workspace331/ directory.

If validation was successful, you should see output that looks something like:


Buildfile: /homes/iws/username/workspace331/cse331/src/hw1/build.xml

validate:
     [echo] Validate checks out a fresh copy of the hw, checks for the
     [echo]       presence of required files, and runs all your tests to make sure
     [echo]       they pass.  This target can only run on the attu IWS machine.
     [echo]
     [echo]       Note: the test reports will be generated under the scratch
     [echo]       directory the validate target creates.
     [echo]
   [delete] Deleting directory /homes/iws/username/workspace331/cse331/scratch
    [mkdir] Created dir: /homes/iws/username/workspace331/cse331/scratch
     [echo] /projects/instr/12sp/cse331/username/workspace331/REPOS
     [exec] A    cse331
     [exec] A    cse331/.classpath
     
     ...
     
     [exec] BUILD SUCCESSFUL
     [exec] Total time: 2 seconds
   [delete] Deleting directory /homes/iws/username/workspace331/cse331/scratch

If there is an error, the validate script should provide some information about what is wrong:


Buildfile: /homes/iws/username/workspace331/cse331/src/hw1/build.xml

validate:
     [echo] Validate checks out a fresh copy of the hw, checks for the
     [echo]       presence of required files, and runs all your tests to make sure
     [echo]       they pass.  This target can only run on the attu IWS machine.
     [echo]
     [echo]       Note: the test reports will be generated under the scratch
     [echo]       directory the validate target creates.
     [echo]
     
     ...
     
     [exec] cleancopy:
     [exec]      [echo] Hw directory: /homes/iws/username/workspace331/cse331/scratch/cse331/src/hw1
     [exec]
     [exec] BUILD FAILED
     [exec] /homes/iws/username/workspace331/cse331/scratch/cse331/src/common.xml:106: The following error occurred while executing this line:
     [exec] /homes/iws/username/workspace331/cse331/scratch/cse331/src/common.xml:121: Could not find required file: answers/hw1_answers.pdf
     [exec]
     [exec] Total time: 1 second
     [exec]
     [exec] cleancopy.check:

BUILD FAILED
/homes/iws/username/workspace331/cse331/src/common.xml:160: exec returned: 1



This error would indicate that a required file, answers/hw1_answers.pdf is missing. Make sure you've committed this file to SVN.

If the validate output indicates errors, you should fix them before the deadline, or you will lose points on your assignment. If validate failed because the public test suite failed, you can view a summary of the JUnit failures in your YourWorkspaceDirectory/scratch/cse331/src/hwN/test/reports directory.

Important: be aware that the validation script tests your code against your own test suite. Although by default we populate hwN.test.SpecificationTests with the public test suite, it is your responsibility to retain those tests in hwN.test.SpecificationTests if you want the validatation script to check your code against the public tests.


Back to tools.
Back to the CSE331 home page.
For problems or questions regarding this page, contact: cse331-staff@cs.washington.edu.