Skip to content

Commit 5d6c11a

Browse files
Anna Solyanskayakorifey
Anna Solyanskaya
authored andcommitted
Added SmokeTest.md and CONTRIBUTING.md
Added links in README.md
1 parent 7bbef78 commit 5d6c11a

9 files changed

+129
-1
lines changed

CONTRIBUTING.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#How to contribute to UTBot
2+
3+
##Want a new feature or change existing one?
4+
* Create an issue with proposal and describe your idea
5+
* Wait for our feedback, it will be decided who is preparing the pull request: we may need your help or fix on our side
6+
7+
##Found a defect?
8+
Ensure this defect wasn't already reported in our [Issues](https://github.com/UnitTestBot/UTBotCpp/issues)
9+
10+
If not - create a new one containing:
11+
* Environment *(describe your full setup)*
12+
* Pre-Conditions *(some special prerequisites)*
13+
* Steps to reproduce *(to be on the same page)*
14+
* Actual and expected result *(what went wrong?)*
15+
16+
If you already have a PR with solution - link it with the created issue
17+
18+
Please refer to [SmokeTest.md](SmokeTest.md) before submitting PR

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ To install UTBot VSCode plugin, use VSCode *Install from VSIX* command.
3030

3131
## How to contribute to UTBot
3232

33-
See **DEVNOTE.md**.
33+
See [**DEVNOTE.md**](DEVNOTE.md)
34+
and [**CONTRIBUTING.md**](CONTRIBUTING.md)

SmokeTest.md

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
#How to check UTBot manually
2+
3+
It's recommended to perform some smoke checks on UTBot before raising a pull request
4+
5+
##Check installation in your own local environment
6+
7+
Download an archive with build artifacts on a local machine and unpack it into separate folder locally
8+
9+
10+
-[ ] Check folder contains:
11+
12+
- ```utbot_distr.tar.gz``` - UTbot binary/dependencies
13+
- ```utbot_plugin.vsix``` - UTBot plugin for VSCode
14+
- ```unpack_and_run_utbot.sh``` - setup script
15+
- ```version.txt``` - version file
16+
17+
18+
-[ ] Perform setup on server side:
19+
20+
Move binary and script into a new separate directory
21+
22+
```
23+
mkdir utbot-release-version
24+
mv utbot_distr.tar.gz utbot-release-version
25+
mv unpack_and_run_utbot.sh utbot-release-version
26+
```
27+
and run installation script in it
28+
```
29+
cd utbot-release-version
30+
chmod +x unpack_and_run_utbot.sh && ./unpack_and_run_utbot.sh
31+
```
32+
Check process is up and running
33+
34+
```
35+
ps aux | grep utbot | grep port
36+
```
37+
38+
PID/port 2121 should be found
39+
40+
If no errors and process is up then
41+
42+
-[ ] Perform client setup:
43+
44+
- In local VSCode look for *Install from VSIX* command, select early downloaded ```utbot_plugin.vsix``` and install it - "UnitTestBot for C/C++" plugin should be visible in Extensions
45+
- For Win: setup SSH remote connection with server - locally installed UTBot plugin should be available in remote mode (no new installation required)
46+
- Open folder with source code, test connection as proposed, click Next and finish setup configuring project
47+
48+
##Check UTBot: Generate Tests
49+
On a source code project
50+
- [ ] For Current Function:
51+
1. Move to any function in the (as example) ```file.c```
52+
2. Right mouse click → UTBot: Generate Tests... → for Current Function
53+
54+
![1](pics/VSCode_CurrentFunction.png "Generating tests example")
55+
56+
- ```file_test.cpp``` is generated
57+
58+
![2](pics/VSCode_CurrentFunction2.png "Run Tests With Coverage")
59+
60+
- "Run Tests with Coverage" generates coverage report shown in a source ```file.c```
61+
62+
![3](pics/VSCode_CurrentFunction3.png "Coverage ")
63+
64+
65+
- [ ] For Current File:
66+
1. Move to any `file2.c` in the project
67+
2. Right click → UTBot: Generate Tests... → for Current File
68+
- `file2_test.cpp` is generated
69+
- "Run Tests with Coverage" generates coverage report shown in a source file
70+
71+
72+
- [ ] For Current Line:
73+
1. Move to any statement line in the `file3.c`
74+
2. Right click → UTBot: Generate Tests... → for Current Line
75+
- `file3_test.cpp` is generated
76+
- "Run Tests with Coverage" generates coverage report shown in a source file
77+
78+
79+
- [ ] With Prompted Result:
80+
1. Move to any function in the `file4.c` code
81+
2. On statement/assert Right click → UTBot: Generate Tests... → with Prompted Result
82+
3. In appeared dialog select condition and enter some number → Press Enter
83+
84+
![1](pics/VSCode_withPrompted1.png "Prompted Input ")
85+
86+
- `file4_test.cpp` is generated with selected condition on prompted result
87+
- "Run Tests with Coverage" generates coverage report shown in a source file
88+
89+
90+
- [ ] For Folder:
91+
1. In project navigate to folder with several files
92+
2. Right click → UTBot: Generate Tests for Folder
93+
94+
![1](pics/VSCode_ForFolder1.png "Generating tests for folder example")
95+
96+
3. Select needed folder → OK
97+
- directory with test files created:
98+
99+
![2](pics/VSCode_ForFolder3.png "Generated folder")
100+
101+
- "Run Tests with Coverage" generates coverage report shown in a source file
102+
103+
104+
105+
106+
107+
108+
109+

pics/VSCode_CurrentFunction.png

23.2 KB
Loading

pics/VSCode_CurrentFunction2.png

16.3 KB
Loading

pics/VSCode_CurrentFunction3.png

7.74 KB
Loading

pics/VSCode_ForFolder1.png

28.6 KB
Loading

pics/VSCode_ForFolder3.png

6.26 KB
Loading

pics/VSCode_withPrompted1.png

8.51 KB
Loading

0 commit comments

Comments
 (0)