|
1 | 1 | {
|
| 2 | + "autograding" : { |
| 3 | + "work_to_details": [ "*.csv" ] |
| 4 | + }, |
2 | 5 | "resource_limits" : {
|
3 | 6 | "RLIMIT_CPU" : 60,
|
4 | 7 | "RLIMIT_NPROC" : 100,
|
|
12 | 15 | // instructor-provided JUnit test-based grading.
|
13 | 16 | {
|
14 | 17 | "type" : "Compilation",
|
15 |
| - "title" : "Java - Compilation", |
| 18 | + "title" : "Class Compilation", |
16 | 19 | "command" : "javac -cp submitty_junit.jar hw0/Factorial.java",
|
17 | 20 | "executable_name" : "hw0/Factorial.class",
|
18 | 21 | "points" : 2
|
19 | 22 | },
|
20 | 23 | {
|
21 | 24 | "type" : "Compilation",
|
22 |
| - "title" : "Java - Student and Instructor JUnit Test Compilation", |
| 25 | + "title" : "Student and Instructor JUnit Test Compilation", |
23 | 26 | "command" : "javac -cp submitty_junit.jar:. hw0/test/*Test.java",
|
24 | 27 | "executable_name" : "hw0/test/FactorialTest.class",
|
25 | 28 | "points" : 2
|
26 | 29 | },
|
27 | 30 |
|
| 31 | + |
| 32 | + // ----------------------------------------------------------------------- |
| 33 | + // COVERAGE USING JACOCO |
| 34 | + // JaCoCo can do on-demand instrumentation |
| 35 | + { |
| 36 | + "title" : "JaCoCo - Running Student JUnit Tests in hw0/tests/", |
| 37 | + "command" : "java -noverify -javaagent:submitty_jacocoagent.jar=destfile=coverage.exec -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_junit/:. TestRunner hw0", |
| 38 | + "points" : 4, |
| 39 | + "validation" : [ |
| 40 | + { |
| 41 | + "method" : "MultipleJUnitTestGrader", |
| 42 | + "actual_file" : "STDOUT.txt" |
| 43 | + } |
| 44 | + ] |
| 45 | + }, |
| 46 | + { |
| 47 | + "title" : "JaCoCo - Generating Coverage Report for Student Tests", |
| 48 | + "command" : "java -jar submitty_jacococli.jar report coverage.exec --classfiles hw0 --csv jacoco_report.csv", |
| 49 | + "points" : 6, |
| 50 | + "validation" : [ |
| 51 | + { |
| 52 | + "method" : "errorIfEmpty", |
| 53 | + "actual_file" : "STDOUT.txt", |
| 54 | + "description" : "JaCoCo report generation output", |
| 55 | + "deduction" : 0.0 |
| 56 | + }, |
| 57 | + { |
| 58 | + "method" : "JaCoCoCoverageReportGrader", |
| 59 | + "actual_file" : "jacoco_report.csv", |
| 60 | + "description" : "JaCoCo coverage report", |
| 61 | + // specify the package & class to check (can omit to check all) |
| 62 | + "package" : "hw0", |
| 63 | + //"class" : "Factorial", |
| 64 | + // which threshold(s) to apply |
| 65 | + "instruction_coverage_threshold" : 90, |
| 66 | + //"branch_coverage_threshold" : 90, |
| 67 | + //"line_coverage_threshold" : 70, |
| 68 | + //"complexity_coverage_threshold" : 80, |
| 69 | + //"method_coverage_threshold" : 80, |
| 70 | + "deduction" : 1.0 |
| 71 | + } |
| 72 | + ] |
| 73 | + }, |
| 74 | + { |
| 75 | + "title" : "JaCoCo - Instructor JUnit Tests", |
| 76 | + "command" : "java -noverify -cp submitty_junit.jar:submitty_hamcrest.jar:. org.junit.runner.JUnitCore hw0.test.FactorialTest", |
| 77 | + "points" : 6, |
| 78 | + "validation" : [ |
| 79 | + { |
| 80 | + "method" : "JUnitTestGrader", |
| 81 | + "actual_file" : "STDOUT.txt", |
| 82 | + "num_tests" : 4 |
| 83 | + } |
| 84 | + ] |
| 85 | + }, |
| 86 | + |
| 87 | + |
| 88 | + // ------------------------------------------------------------------------------ |
| 89 | + // COVERAGE USING EMMA |
28 | 90 | {
|
29 |
| - "title" : "Java - Instrumentation of Student Code", |
| 91 | + "title" : "EMMA - Instrumentation of Student Code", |
30 | 92 | "command" : "java -cp submitty_emma.jar emma instr -m overwrite -ip hw0",
|
31 | 93 | "points" : 0,
|
32 | 94 | "validation" : [
|
|
36 | 98 | }
|
37 | 99 | ]
|
38 | 100 | },
|
39 |
| - |
40 | 101 | {
|
41 |
| - "title" : "Java - Running Student JUnit Tests in hw0/tests/", |
| 102 | + "title" : "EMMA - Running Student JUnit Tests in hw0/tests/", |
42 | 103 | "command" : "java -noverify -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_emma.jar:submitty_junit/:. TestRunner hw0",
|
43 | 104 | "points" : 4,
|
44 | 105 | "validation" : [
|
|
48 | 109 | }
|
49 | 110 | ]
|
50 | 111 | },
|
51 |
| - |
52 | 112 | {
|
53 |
| - "title" : "Java - Generating Coverage Report for Student Tests", |
| 113 | + "title" : "EMMA - Generating Coverage Report for Student Tests", |
54 | 114 | "command" : "java -cp submitty_emma.jar emma report -r txt -in coverage.em,coverage.ec -Dreport.txt.out.file=emma_report.txt",
|
55 | 115 | "points" : 6,
|
56 | 116 | "validation" : [
|
|
63 | 123 | {
|
64 | 124 | "method" : "EmmaCoverageReportGrader",
|
65 | 125 | "actual_file" : "emma_report.txt",
|
| 126 | + "description" : "EclEmma coverage report", |
66 | 127 | "coverage_threshold" : 90,
|
67 | 128 | "deduction" : 1.0
|
68 | 129 | }
|
69 | 130 | ]
|
70 | 131 | },
|
71 |
| - |
72 | 132 | {
|
73 |
| - "title" : "Java - Instructor JUnit Tests", |
74 |
| - "command" : "java -noverify -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_emma.jar:. org.junit.runner.JUnitCore hw0.test.FactorialTest", |
| 133 | + "title" : "EMMA - Instructor JUnit Tests", |
| 134 | + "command" : "java -noverify -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_emma.jar:. org.junit.runner.JUnitCore hw0.test.FactorialTest", |
75 | 135 | "points" : 6,
|
76 | 136 | "validation" : [
|
77 | 137 | {
|
|
81 | 141 | }
|
82 | 142 | ]
|
83 | 143 | }
|
| 144 | + |
84 | 145 | ]
|
85 | 146 | }
|
0 commit comments