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
to run UnitTestBot on the User's repository and then imports the SARIF output into the Security Code Scanning Alerts section,
142
+
where the User can find all the displayed code errors.
143
+
144
+
Please note that at the moment this action cannot work with Maven projects due to the fact that
145
+
our [maven plugin](https://github.com/UnitTestBot/UTBotJava/tree/main/utbot-maven) is not published.
146
+
147
+
More information about the action can be found [here](https://github.com/UnitTestBot/UTBotJava-action#readme).
148
+
149
+
Also, there is a detailed [example](https://github.com/UnitTestBot/UTBotJava-action-example) of using UTBotJava-action.
126
150
127
151
### CLI
128
152
129
-
TODO (Nikita Stroganov)
153
+
TODO (???)
130
154
131
155
### Contest estimator
132
156
Contest estimator runs UnitTestBot on the provided projects and returns the generation statistics such as instruction coverage.
@@ -213,10 +237,34 @@ Also, JavaDocs built in two modes: as plain text or in especial format enriched
213
237
214
238
This subsystem is fully located in the ```utbot-summary``` module.
215
239
216
-
### Sarif report
217
-
TODO (Nikita Stroganov)
240
+
### SARIF report
241
+
242
+
SARIF (Static Analysis Results Interchange Format) is a JSON–based format for displaying static analysis results.
243
+
244
+
All the necessary information about the format and its use can be found
245
+
in the [official documentation](https://github.com/microsoft/sarif-tutorials/blob/main/README.md)
246
+
and in the [GitHub wiki](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning) about it.
218
247
248
+
In our project `SarifReport` class is responsible for generating reports.
249
+
We use SARIF reports to display errors detected by UnitTestBot such as
250
+
unchecked exceptions, overflows, assertion errors and so on.
251
+
252
+
For example, for the class below
253
+
```Java
254
+
publicclassMain {
255
+
intexample(intx) {
256
+
return1/ x;
257
+
}
258
+
}
259
+
```
219
260
261
+
We'll create a report which contains the following information:
262
+
-`java.lang.ArithmeticException: / by zero` may occur in the line 3
263
+
- The exception occurs if `x == 0`
264
+
- To reproduce this error, the user can run the generated test `MainTest.testExampleThrowsAEWithCornerCase`
0 commit comments