|
33 | 33 | // COVERAGE USING JACOCO
|
34 | 34 | // JaCoCo can do on-demand instrumentation
|
35 | 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, |
| 36 | + "title" : "JaCoCo - Running Student JUnit Tests in hw0/tests/ and Generating Coverage Report for Student Tests", |
| 37 | + "command" : ["java -noverify -javaagent:submitty_jacocoagent.jar=destfile=coverage.exec -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_junit/:. TestRunner hw0", |
| 38 | + "java -jar submitty_jacococli.jar report coverage.exec --classfiles hw0 --csv jacoco_report.csv" |
| 39 | + ], |
| 40 | + "points" : 10, |
50 | 41 | "validation" : [
|
| 42 | + { |
| 43 | + |
| 44 | + "method" : "MultipleJUnitTestGrader", |
| 45 | + "actual_file" : "STDOUT_0.txt", |
| 46 | + "deduction" : 0.5 |
| 47 | + }, |
51 | 48 | {
|
52 | 49 | "method" : "errorIfEmpty",
|
53 |
| - "actual_file" : "STDOUT.txt", |
| 50 | + "actual_file" : "STDOUT_1.txt", |
54 | 51 | "description" : "JaCoCo report generation output",
|
55 | 52 | "deduction" : 0.0
|
56 | 53 | },
|
|
59 | 56 | "actual_file" : "jacoco_report.csv",
|
60 | 57 | "description" : "JaCoCo coverage report",
|
61 | 58 | // specify the package & class to check (can omit to check all)
|
62 |
| - "package" : "hw0", |
| 59 | + "package" : "hw0", |
63 | 60 | //"class" : "Factorial",
|
64 | 61 | // which threshold(s) to apply
|
65 | 62 | "instruction_coverage_threshold" : 90,
|
66 | 63 | //"branch_coverage_threshold" : 90,
|
67 | 64 | //"line_coverage_threshold" : 70,
|
68 | 65 | //"complexity_coverage_threshold" : 80,
|
69 | 66 | //"method_coverage_threshold" : 80,
|
70 |
| - "deduction" : 1.0 |
| 67 | + "deduction" : 0.5 |
71 | 68 | }
|
72 | 69 | ]
|
73 | 70 | },
|
|
82 | 79 | "num_tests" : 4
|
83 | 80 | }
|
84 | 81 | ]
|
85 |
| - }, |
86 |
| - |
87 |
| - |
| 82 | + } |
| 83 | + /*, |
| 84 | + Sorry! Emma is no longer currently supported. |
88 | 85 | // ------------------------------------------------------------------------------
|
89 | 86 | // COVERAGE USING EMMA
|
90 | 87 | {
|
91 |
| - "title" : "EMMA - Instrumentation of Student Code", |
| 88 | + "title" : "EMMA - Instrument of Student Code, Run JUnit Tests, and Generate Coverage Report", |
92 | 89 | "command" : "java -cp submitty_emma.jar emma instr -m overwrite -ip hw0",
|
93 |
| - "points" : 0, |
| 90 | + "points" : 10, |
94 | 91 | "validation" : [
|
95 | 92 | {
|
96 | 93 | "method" : "EmmaInstrumentationGrader",
|
97 |
| - "actual_file" : "STDOUT.txt" |
98 |
| - } |
99 |
| - ] |
100 |
| - }, |
101 |
| - { |
102 |
| - "title" : "EMMA - Running Student JUnit Tests in hw0/tests/", |
103 |
| - "command" : "java -noverify -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_emma.jar:submitty_junit/:. TestRunner hw0", |
104 |
| - "points" : 4, |
105 |
| - "validation" : [ |
| 94 | + "actual_file" : "STDOUT.txt", |
| 95 | + "deduction" : 0.0 |
| 96 | + }, |
106 | 97 | {
|
107 | 98 | "method" : "MultipleJUnitTestGrader",
|
108 |
| - "actual_file" : "STDOUT.txt" |
| 99 | + "actual_file" : "STDOUT_0.txt" |
| 100 | + }, |
| 101 | + { |
| 102 | + "method" : "errorIfEmpty", |
| 103 | + "actual_file" : "STDOUT_1.txt", |
| 104 | + "description" : "EclEmma report generation output", |
| 105 | + "deduction" : 0.0 |
| 106 | + }, |
| 107 | + { |
| 108 | + "method" : "EmmaCoverageReportGrader", |
| 109 | + "actual_file" : "emma_report.txt", |
| 110 | + "description" : "EclEmma coverage report", |
| 111 | + "coverage_threshold" : 90 |
109 | 112 | }
|
110 | 113 | ]
|
111 | 114 | },
|
112 |
| - { |
113 |
| - "title" : "EMMA - Generating Coverage Report for Student Tests", |
114 |
| - "command" : "java -cp submitty_emma.jar emma report -r txt -in coverage.em,coverage.ec -Dreport.txt.out.file=emma_report.txt", |
115 |
| - "points" : 6, |
116 |
| - "validation" : [ |
117 |
| - { |
118 |
| - "method" : "errorIfEmpty", |
119 |
| - "actual_file" : "STDOUT.txt", |
120 |
| - "description" : "EclEmma report generation output", |
121 |
| - "deduction" : 0.0 |
122 |
| - }, |
123 |
| - { |
124 |
| - "method" : "EmmaCoverageReportGrader", |
125 |
| - "actual_file" : "emma_report.txt", |
126 |
| - "description" : "EclEmma coverage report", |
127 |
| - "coverage_threshold" : 90, |
128 |
| - "deduction" : 1.0 |
129 |
| - } |
130 |
| - ] |
131 |
| - }, |
132 | 115 | {
|
133 | 116 | "title" : "EMMA - Instructor JUnit Tests",
|
134 | 117 | "command" : "java -noverify -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_emma.jar:. org.junit.runner.JUnitCore hw0.test.FactorialTest",
|
|
141 | 124 | }
|
142 | 125 | ]
|
143 | 126 | }
|
| 127 | + */ |
144 | 128 |
|
145 | 129 | ]
|
146 | 130 | }
|
0 commit comments