Skip to content

Commit bd14410

Browse files
author
Brandon Lax
committed
Update readme and documentation
1 parent 5c623ba commit bd14410

18 files changed

+106
-38
lines changed

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,44 @@
22

33
This repo contains the autograder used in EN.500.112 Gateway Computing: JAVA at Johns Hopkins University.
44

5-
The design of the autograder allows for a large number of options
5+
The design of the autograder allows for a large number of options. The Gradescope autograder is set up into three parts.
6+
7+
## setup.sh
8+
This is what is run in creating the the VM that the autograder runs in. The only thing that we currently have this file do
9+
is install java on the VM.
10+
11+
## run_autograder
12+
This file does all the prep work for an individual submission. This is what gets run whenever a student submits their code.
13+
The current version does a couple of things:
14+
1. Deletes any leftover files (this is more for when running locally as every time a student submits it creates a new VM)
15+
2. Compiles the autograder
16+
3. runs AutograderMain.java
17+
18+
## Autograder/AutograderMain
19+
This file contains the main method that runs the autograder. Autograder.java is designed to make this as customizable as possible.
20+
21+
Currently Autograder.java offers the following tests for use in the AutograderMain.java main method. For more detail about how to use these methods
22+
see https://bralax.github.io/gradescope_autograder/index.html.
23+
24+
* A Java source file exists
25+
* A java source file compiles
26+
* A java source file is checkstyle compliant
27+
* A java source produces a proper standard out (diff test)
28+
* A java source produces an expected output from a method (comparison method)
29+
* A java source has a specific method
30+
* A java source's methods match the expected output of a sample version
31+
* A java source passes a junit test
32+
* A java source has an expected number of methods
33+
* A java source has an expected number of methods
34+
* A java source has no public instance methods
35+
36+
If you need another test, reach out and it could be added in the future.
37+
38+
## Autograder Structure
39+
40+
* Autograder
41+
* results
42+
* results.json - the place where all the test results need to end up
43+
* source - All the files uploaded as the autograder
44+
* submission - All the files the user uploads
45+
* run_autograder - The running script is seperated from the autograder and run from the base directory.

docs/Autograder.html

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 11:01:38 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 19:53:40 EDT 2019 -->
66
<title>Autograder</title>
77
<meta name="date" content="2019-05-20">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
@@ -112,7 +112,7 @@ <h2 title="Class Autograder" class="title">Class Autograder</h2>
112112
<br>
113113
<pre>public class <span class="typeNameLabel">Autograder</span>
114114
extends java.lang.Object</pre>
115-
<div class="block">Classs representing an autograder.
115+
<div class="block">Classs representing an autograder.\n
116116
It's main method is the running of the autograder
117117
and instances can be made to store all important information.</div>
118118
</li>
@@ -179,13 +179,17 @@ <h3>Constructor Summary</h3>
179179
</tr>
180180
<tr class="altColor">
181181
<td class="colOne"><code><span class="memberNameLink"><a href="Autograder.html#Autograder--">Autograder</a></span>()</code>
182-
<div class="block">The Autograder class constructor.</div>
182+
<div class="block">The Autograder class constructor.\n
183+
Initializes the list of all tests.\n
184+
Also sets the visibility to hidden and
185+
the score to 0.1</div>
183186
</td>
184187
</tr>
185188
<tr class="rowColor">
186189
<td class="colOne"><code><span class="memberNameLink"><a href="Autograder.html#Autograder-int-double-">Autograder</a></span>(int&nbsp;visible,
187190
double&nbsp;score)</code>
188-
<div class="block">The Autograder class constructor.</div>
191+
<div class="block">The Autograder class constructor.\n
192+
Initializes the list of all tests.</div>
189193
</td>
190194
</tr>
191195
</table>
@@ -214,7 +218,10 @@ <h3>Method Summary</h3>
214218
<tr id="i1" class="rowColor">
215219
<td class="colFirst"><code>void</code></td>
216220
<td class="colLast"><code><span class="memberNameLink"><a href="Autograder.html#addTestResult-jh61b.grader.TestResult-">addTestResult</a></span>(jh61b.grader.TestResult&nbsp;t)</code>
217-
<div class="block">Method to add a seperately made test to the results.</div>
221+
<div class="block">Method to add a seperately made test to the results.\n
222+
This allows for people to make child classes of the autograder
223+
if they need tests that dont currently exist that they would
224+
prefer to avoid adding to this class.</div>
218225
</td>
219226
</tr>
220227
<tr id="i2" class="altColor">
@@ -415,13 +422,18 @@ <h3>Method Summary</h3>
415422
<tr id="i27" class="rowColor">
416423
<td class="colFirst"><code>void</code></td>
417424
<td class="colLast"><code><span class="memberNameLink"><a href="Autograder.html#testRunFinished--">testRunFinished</a></span>()</code>
418-
<div class="block">This is the wrap-up code of the autograder.</div>
425+
<div class="block">This is the wrap-up code of the autograder.\n
426+
<b>Must be the last line of the main method.</b> \nIt
427+
prints all of the results in a JSON format to
428+
standard out.</div>
419429
</td>
420430
</tr>
421431
<tr id="i28" class="altColor">
422432
<td class="colFirst"><code>boolean</code></td>
423433
<td class="colLast"><code><span class="memberNameLink"><a href="Autograder.html#testSourceExists-java.lang.String-">testSourceExists</a></span>(java.lang.String&nbsp;programName)</code>
424-
<div class="block">Test to check if source file exists.</div>
434+
<div class="block">Test to check if source file exists.\n
435+
Will output whether the file exists as well as
436+
add a junit test for it.</div>
425437
</td>
426438
</tr>
427439
</table>
@@ -520,7 +532,7 @@ <h3>Constructor Detail</h3>
520532
<h4>Autograder</h4>
521533
<pre>public&nbsp;Autograder(int&nbsp;visible,
522534
double&nbsp;score)</pre>
523-
<div class="block">The Autograder class constructor.
535+
<div class="block">The Autograder class constructor.\n
524536
Initializes the list of all tests.</div>
525537
<dl>
526538
<dt><span class="paramLabel">Parameters:</span></dt>
@@ -536,8 +548,8 @@ <h4>Autograder</h4>
536548
<li class="blockList">
537549
<h4>Autograder</h4>
538550
<pre>public&nbsp;Autograder()</pre>
539-
<div class="block">The Autograder class constructor.
540-
Initializes the list of all tests.
551+
<div class="block">The Autograder class constructor.\n
552+
Initializes the list of all tests.\n
541553
Also sets the visibility to hidden and
542554
the score to 0.1</div>
543555
</li>
@@ -557,7 +569,7 @@ <h3>Method Detail</h3>
557569
<li class="blockList">
558570
<h4>addTestResult</h4>
559571
<pre>public&nbsp;void&nbsp;addTestResult(jh61b.grader.TestResult&nbsp;t)</pre>
560-
<div class="block">Method to add a seperately made test to the results.
572+
<div class="block">Method to add a seperately made test to the results.\n
561573
This allows for people to make child classes of the autograder
562574
if they need tests that dont currently exist that they would
563575
prefer to avoid adding to this class. For an example see
@@ -576,8 +588,8 @@ <h4>addTestResult</h4>
576588
<h4>testRunFinished</h4>
577589
<pre>public&nbsp;void&nbsp;testRunFinished()
578590
throws java.lang.Exception</pre>
579-
<div class="block">This is the wrap-up code of the autograder.
580-
<b>Must be the last line of the main method.</b> It
591+
<div class="block">This is the wrap-up code of the autograder.\n
592+
<b>Must be the last line of the main method.</b> \nIt
581593
prints all of the results in a JSON format to
582594
standard out.</div>
583595
<dl>
@@ -593,7 +605,7 @@ <h4>testRunFinished</h4>
593605
<li class="blockList">
594606
<h4>testSourceExists</h4>
595607
<pre>public&nbsp;boolean&nbsp;testSourceExists(java.lang.String&nbsp;programName)</pre>
596-
<div class="block">Test to check if source file exists.
608+
<div class="block">Test to check if source file exists.\n
597609
Will output whether the file exists as well as
598610
add a junit test for it.</div>
599611
<dl>

docs/AutograderMain.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 11:01:38 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 19:53:40 EDT 2019 -->
66
<title>AutograderMain</title>
77
<meta name="date" content="2019-05-20">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/Listener.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 11:01:38 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 19:53:40 EDT 2019 -->
66
<title>Listener</title>
77
<meta name="date" content="2019-05-20">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/Picture.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 11:01:38 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 19:53:40 EDT 2019 -->
66
<title>Picture</title>
77
<meta name="date" content="2019-05-20">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/PictureAutograder.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 11:01:39 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 19:53:40 EDT 2019 -->
66
<title>PictureAutograder</title>
77
<meta name="date" content="2019-05-20">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/Program.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 11:01:39 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 19:53:40 EDT 2019 -->
66
<title>Program</title>
77
<meta name="date" content="2019-05-20">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/allclasses-frame.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 11:01:39 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 19:53:40 EDT 2019 -->
66
<title>All Classes</title>
77
<meta name="date" content="2019-05-20">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/allclasses-noframe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 11:01:39 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 19:53:40 EDT 2019 -->
66
<title>All Classes</title>
77
<meta name="date" content="2019-05-20">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/constant-values.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 11:01:39 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_121) on Mon May 20 19:53:40 EDT 2019 -->
66
<title>Constant Field Values</title>
77
<meta name="date" content="2019-05-20">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

0 commit comments

Comments
 (0)