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: utbot-go/docs/DEVELOPERS_GUIDE.md
+24-8Lines changed: 24 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,18 @@
2
2
3
3
# How UTBot Go works in general
4
4
5
-

5
+
```mermaid
6
+
flowchart TB
7
+
A["Targets selection and configuration (IDEA plugin or CLI)"]:::someclass --> B(Go source code analysis)
8
+
classDef someclass fill:#b810
9
+
10
+
B --> C(Fuzzing)
11
+
C --> D(Fuzzed function execution)
12
+
D --> E(Getting results)
13
+
E --> C
14
+
C ---> F(Test file generation)
15
+
```
16
+
6
17
7
18
In the diagram above, you can see _the main stages of the UTBot Go test generation pipeline_. Let's take a look at each
8
19
in more detail!
@@ -28,24 +39,29 @@ representation of the target functions, sufficient for the subsequent generation
28
39
### Fuzzing
29
40
30
41
Fuzzing is the first part of the test cases generation process. At this stage, values, that will be used
31
-
to test the target functions, are generated. Namely, to be passed to functions as arguments in the next steps.
42
+
to test the target functions, are generated. Namely, to be passed to functions as arguments in the next steps.
43
+
Then the result of function execution is analyzed and the generation of new values continues or stops.
32
44
33
-
### Fuzzed functions execution
45
+
### Fuzzed function execution
34
46
35
47
In the previous step, UTBot Go generated the values that the functions need to be tested with — now the task is to
36
-
do this. Namely, execute the functions with the values generated for them and save the result.
48
+
do this. Namely, execute the functions with the values generated for them.
37
49
38
50
Essentially, the target function, the values generated for it, and the result of its execution form a test case. In
39
51
fact, that is why this stage ends the global process of generating test cases.
40
52
53
+
### Getting results
54
+
55
+
Saving results of fuzzed function execution and sending them to fuzzing for analysis.
56
+
41
57
### Test code generation
42
58
43
-
Finally, the last stage: the test cases are ready, UTBot Go needs only to generate code for them. Nothing terrible
44
-
happens here, but one need to carefully consider the features of the Go language (for example, the necessity to cast
45
-
constants to the desired type, oh).
59
+
Finally, the last stage: the test cases are ready, UTBot Go needs only to generate code for them. Need to carefully consider the features of the Go language (for example, the necessity to cast
60
+
constants to the desired type).
46
61
47
62
_That's how the world (UTBot Go) works!_
48
63
49
64
## How to test UTBot Go
50
65
51
-
_**TODO:**_ Gradle `runIde` task and building CLI application JAR locally.
66
+
_**TODO:**_ Gradle `runIde` task or building CLI application JAR locally. To build CLI version the `build` on `utbot-cli-go` should be called.
0 commit comments