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
UnitTestBot gets the synthetic representation of generated test cases from the fuzzer or the symbolic engine. This representation, or model, is
7
-
implemented in the `UtExecution` class.
6
+
UnitTestBot gets the synthetic representation of generated test cases from the fuzzer or the symbolic engine.
7
+
This representation (or model) is implemented in the `UtExecution` class.
8
8
9
9
The `codegen` module generates the real test code based on this `UtExecution` model and renders it in a
10
10
human-readable form in accordance with the requested configuration (considering programming language, testing
@@ -213,7 +213,7 @@ The further AST levels are created similarly. The AST leaves are `CgLiteral`, `C
213
213
The below-mentioned functionality is implemented in `CgMethodConstructor`.
214
214
215
215
To create a test method:
216
-
* store the initial values of the static fields and perform the seven steps for creating test method body mentioned later,
216
+
* store the initial values of the static fields and perform the seven steps for creating test method body mentioned later;
217
217
* if the static field values undergo changes, perform these seven steps in the `try` block and recover these values in the `finally` block accordingly.
218
218
219
219
To create test method body:
@@ -225,14 +225,14 @@ To create test method body:
225
225
6. generate result assertions
226
226
7. for successful tests, generate field state assertions
227
227
228
-
_Note:_ generating assertions has pitfalls. In primitive cases like comparing two integers, we can use the standard
228
+
_Note:_ generating assertions has pitfalls. In primitive cases, like comparing two integers, we can use the standard
229
229
assertions of a selected test framework. To compare two objects of an arbitrary type, we need a
230
230
custom implementation of equality assertion, e.g. using `deepEquals()`. The `deepEquals()` method compares object
231
231
structures field by field. The method is recursive: if the current field is not of the primitive type, we call
232
232
`deepEquals()` for this field. The maximum recursion depth is limited.
233
233
234
234
For the parameterized tests
235
-
- we do not support mocking, so we do not set up the initial environment,
235
+
- we do not support mocking, so we do not set up the initial environment;
236
236
- we do not generate field state assertions.
237
237
238
238
`UtExecution` usually represents a single test scenario, and one `UtExecution` instance is used to create a single
@@ -256,7 +256,7 @@ From the group of `UtExecution` elements, we take the first successful execution
256
256
257
257
## Renderer
258
258
259
-
We have a general approach for rendering the code of test classes. `UtUtils` class is rendered differently: we
259
+
We have a general approach for rendering the code of test classes. `UtUtils` class is rendered differently: we
260
260
hardcode the required method implementations for the specific code generation language.
261
261
262
262
All the renderers implement `CgVisitor` interface. It has a separate `visit()` method for each supported
@@ -284,7 +284,7 @@ While constructing the test class, we create test generation reports. It contain
284
284
number of generated tests, the number of successful tests, etc. It also may contain information on potential problems
285
285
like trying to use mocks when mocking framework is not installed.
286
286
287
-
The report is represented as an HTML-string allowing to include clickable links.
287
+
The report is an HTMLstring with clickable links.
288
288
289
289
_Note:_ no test generation reports are created for parameterized tests.
0 commit comments