Skip to content

Commit 8b33be1

Browse files
committed
Rewrite documentation
1 parent 7cba22e commit 8b33be1

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

utbot-go/docs/DEVELOPERS_GUIDE.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22

33
# How UTBot Go works in general
44

5-
![](diagrams/how-it-works.png)
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+
617

718
In the diagram above, you can see _the main stages of the UTBot Go test generation pipeline_. Let's take a look at each
819
in more detail!
@@ -28,24 +39,29 @@ representation of the target functions, sufficient for the subsequent generation
2839
### Fuzzing
2940

3041
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.
3244

33-
### Fuzzed functions execution
45+
### Fuzzed function execution
3446

3547
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.
3749

3850
Essentially, the target function, the values generated for it, and the result of its execution form a test case. In
3951
fact, that is why this stage ends the global process of generating test cases.
4052

53+
### Getting results
54+
55+
Saving results of fuzzed function execution and sending them to fuzzing for analysis.
56+
4157
### Test code generation
4258

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).
4661

4762
_That's how the world (UTBot Go) works!_
4863

4964
## How to test UTBot Go
5065

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.
67+
-26.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)