You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/FAQ.md
+105-37
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,12 @@
5
5
*[How do I use Checkstyle?](https://github.com/jacquard-autograder/jacquard-examples/blob/main/README.md#how-do-i-use-checkstyle)
6
6
*[What's PMD? How do I use it?](https://github.com/jacquard-autograder/jacquard-examples/blob/main/README.md#whats-pmd-how-do-i-use-it)
7
7
*[How do I set test result visibility?](https://github.com/jacquard-autograder/jacquard-examples/blob/main/README.md#how-do-i-set-test-result-visibility)
8
+
*[How is code coverage measured?](https://github.com/jacquard-autograder/jacquard-examples/blob/main/README.md#how-is-code-coverage-measured)
9
+
*[What is cross-testing?](https://github.com/jacquard-autograder/jacquard-examples/blob/main/README.md#what-is-cross-testing)
8
10
*[Why was the name "Jacquard" chosen?](https://github.com/jacquard-autograder/jacquard-examples/blob/main/README.md#why-was-the-name-jacquard-chosen)
11
+
*[Where can I view the Javadoc?](https://github.com/jacquard-autograder/jacquard-examples/blob/main/README.md#where-can-i-view-the-javadoc)
12
+
*[Where can I get support?](https://github.com/jacquard-autograder/jacquard-examples/blob/main/README.md#where-can-i-get-support)
13
+
9
14
10
15
## How do I make sure I have the latest version of the Jacquard library?
See also the [Autograder configuration chapter](https://northeastern.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=ba36573d-dd4a-493d-8b3d-b06a0181c9ff&start=15) (0:15-2:06) from [Taking a first look at Homework 1](https://northeastern.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=ba36573d-dd4a-493d-8b3d-b06a0181c9ff).
59
+
See also the [Autograder configuration chapter](https://northeastern.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=6b00de8f-4abe-49a6-a348-b12e0012f37b&start=15) (0:15-2:06) from [Example 2.1: Going through a more complicated AutograderMain](https://northeastern.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=6b00de8f-4abe-49a6-a348-b12e0012f37b).
55
60
56
61
## How do I use Checkstyle?
57
62
@@ -67,7 +72,7 @@ CheckstyleGrader checkstyleGrader = new CheckstyleGrader(
67
72
5.0); // maximum penalty/points
68
73
```
69
74
70
-
See also the [`CheckstyleGrader` javadoc](http://jacquard.ellenspertus.com/com/spertus/jacquard/checkstylegrader/CheckstyleGrader.html).
75
+
See also the [`CheckstyleGrader` javadoc](https://jacquard.ellenspertus.com/com/spertus/jacquard/checkstylegrader/CheckstyleGrader.html).
71
76
72
77
We recommend putting your configuration file in your project's `config/`
73
78
directory so it is copied to Gradescope. We also recommend sharing it with
@@ -93,10 +98,10 @@ built in to PMD, such as [`category/java/bestpractices.xml`](https://github.com/
which lets you specify one or more rulesets to be used in their entirety [used in [Jacquard Example 0](https://github.com/jacquard-autograder/jacquard-example0)]
which lets you specify one ruleset and one or more rules from that ruleset [used in [Jacquard Example 2](https://github.com/jacquard-autograder/jacquard-example2)]
100
105
101
106
There are PMD plugins for [IntelliJ](https://plugins.jetbrains.com/plugin/1137-pmd) and [Eclipse](https://marketplace.eclipse.org/category/free-tagging/pmd).
102
107
@@ -119,15 +124,15 @@ opposed to the cross-tester) must be annotated with [`@GradedTest`](https://jacq
119
124
attribute `visibility` has the default value [`Visibility.VISIBLE`](https://jacquard.ellenspertus.com/com/spertus/jacquard/common/Visibility.html#VISIBLE) but
120
125
can be set to any other visibility. This code is from [Jacquard Example 0](https://github.com/jacquard-autograder/jacquard-example0):
121
126
```java
122
-
@Test
123
-
@GradedTest(name="works for empty list", points=5.0, visibility=Visibility.AFTER_PUBLISHED)
@@ -137,38 +142,101 @@ The visibility level can be set for all other types of autograder results throug
137
142
The visibility level of a generated [`Result`](https://jacquard.ellenspertus.com/com/spertus/jacquard/common/Result.html) can be mutated by calling the [`changeVisibility(Visibility visibility)` instance method](https://jacquard.ellenspertus.com/com/spertus/jacquard/common/Result.html#changeVisibility(com.spertus.jacquard.common.Visibility)) or [`Result.changeVisibility(List<Result> results, Visibility visibility)`](https://jacquard.ellenspertus.com/com/spertus/jacquard/common/Result.html#changeVisibility(java.util.List,com.spertus.jacquard.common.Visibility)), as shown:
138
143
139
144
```java
140
-
// Use the default configuration, which includes full visibility.
which uses a linear function of the line coverage percentage (ignoring branch coverage)
178
+
If you want to write your own scorer, we suggest viewing [`LinearScorer.java`](https://github.com/jacquard-autograder/jacquard/blob/main/src/main/java/com/spertus/jacquard/coverage/LinearScorer.java).
179
+
180
+
## What is cross-testing?
181
+
Cross-testing is my term for running multiple sets of tests against multiple implementations.
182
+
Most autograders only run instructor tests against student code. Jacquard also supports running
183
+
student tests against multiple versions of instructor code.
184
+
185
+
Cross-testing using submitted code is specified by a CSV file, such as
* If the tests do not report any errors on the implementation of the `size()` method in the `student` package, 10 points are earned.
195
+
* If the tests do not report any errors on the implementation of the `size()` method in the `correct` package, 5 points are earned.
196
+
* If the tests do report an errors on the implementation of the `size()` method in the `buggy` package, 5 points are earned.
197
+
198
+
The negative signs in the "buggy" column indicate that the tests are inverted (i.e., points are earned if they fail).
199
+
200
+
Test names must start with the name of the method under test, such as "sizeWorksForEmptyList()".
201
+
202
+
This excerpt from [Example 2's `main()` method](https://github.com/jacquard-autograder/jacquard-example2/blob/main/src/main/java/student/AutograderMain.java#L79)
203
+
shows how the cross-tester is created and run:
204
+
```java
205
+
// Create CrossTester to run student tests on:
206
+
// * student code (20 points)
207
+
// * hidden correct implementation (15 points)
208
+
// * hidden buggy implementation (15 points)
209
+
// Grading detail is in student-tests.csv.
210
+
CrossTester crossTester =newCrossTester(
211
+
student.ILOSTest.class, // the test to run
212
+
"student-tests.csv"// the name of the CSV file
213
+
);
214
+
results.addAll(crossTester.run());
162
215
```
163
216
217
+
See also the [Example 2 cross-tester video](https://northeastern.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=165ca9fa-98eb-4f0f-8841-b069013430c5).
218
+
164
219
## Why was the name "Jacquard" chosen?
165
220
166
221
The CSV files used for cross-testing made me think of looms, such as the [looms created by
167
222
Joseph Marie Jacquard](https://en.wikipedia.org/wiki/Jacquard_machine), which were
168
223
controlled by punched cards so play an important role in computing history. Also, the
169
224
starting letters correspond to Java or Java Autograder. Claude.ai suggested
170
-
this backronym: _Java Assignment Checking with Quality Unit-testing, Analysis, Reporting, and Diagnostics_.
225
+
this backronym:
226
+
227
+
***J**ava
228
+
***A**ssignment
229
+
***C**hecking with
230
+
***Q**uality
231
+
***U**nit-testing,
232
+
***A**nalysis,
233
+
***R**eporting, and
234
+
***D**iagnostics
235
+
236
+
## Where can I view the Javadoc?
171
237
238
+
The Javadoc is available at [https://jacquard.ellenspertus.com/](https://jacquard.ellenspertus.com/).
239
+
There are also linked badges at the bottom of Markdown pages, such as this one.
0 commit comments