Skip to content

Commit d2564e9

Browse files
committed
Merge branch 'main' into abdullin/constraint-model-synthesis
# Conflicts: # utbot-framework-api/src/main/kotlin/org/utbot/framework/UtSettings.kt # utbot-framework-test/src/test/kotlin/org/utbot/framework/assemble/AssembleModelGeneratorTests.kt # utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt # utbot-framework/src/main/kotlin/org/utbot/framework/plugin/api/TestCaseGenerator.kt
2 parents e585371 + 861b9aa commit d2564e9

478 files changed

Lines changed: 29251 additions & 3319 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/test_request.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
name: Manual testing checklist
33
about: Checklist of testing process
4-
title: ''
5-
labels: ''
4+
title: 'Manual testing of build#'
5+
labels: 'qa'
66
assignees: ''
77

88
---
@@ -28,31 +28,28 @@ assignees: ''
2828
- [ ] Open the utbot-sample/src/main/java/org/utbot/examples/algorithms/ArraysQuickSort.java file
2929
- [ ] Generate tests for the class
3030
- [ ] Remove results
31-
- [ ] Generate tests for the methods
31+
- [ ] Generate and Run test for a method
3232

33-
3433
**Manual scenario #2**
3534

3635
- [ ] Use default plugin settings
3736
- [ ] Open the utbot-sample/src/main/java/org/utbot/examples/mock/CommonMocksExample.java file
38-
- [ ] Generate tests with all available (mocking) options
37+
- [ ] Generate tests with different Mocking options combinations
3938

40-
4139
**Manual scenario #3**
4240

43-
- [ ] Create a new Gradle project
41+
- [ ] Create a new Gradle project with JDK 8
4442
- [ ] Add a simple java file to test
45-
- [ ] Generate a test with a new test root
43+
- [ ] Generate a test in the existing test root
4644

47-
4845
**Manual scenario #4**
4946

50-
- [ ] Create a new Maven project
47+
- [ ] Create a new Maven project with JDK 8
5148
- [ ] Add a simple java file to test
5249
- [ ] Generate a test with a new test root
5350

5451
**Manual scenario #5**
5552

56-
- [ ] Create a new Idea project
53+
- [ ] Create a new Idea project with JDK 11
5754
- [ ] Add a simple java file to test
5855
- [ ] Generate tests for several classes

.github/workflows/build-and-run-tests-from-branch.yml

Lines changed: 77 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
steps:
3131
- name: Print environment variables
3232
run: printenv
33-
33+
3434
- name: Checkout repository
3535
uses: actions/checkout@v3
36-
36+
3737
- name: Check out ${{ github.event.inputs.commit_sha }} commit
3838
if: github.event.inputs.commit_sha != ''
3939
run: |
@@ -45,101 +45,102 @@ jobs:
4545
TASKS=$(echo $(cat .github/workflows/framework-tests-matrix.json))
4646
echo "::set-output name=matrix::$TASKS"
4747
echo $TASKS
48-
framework:
48+
49+
framework-test:
4950
# This job does not need to wait for 'prepare-tests-matrix' result.
50-
# GitHub allocates runners portionally. Framework tests are time consuming. That's why we want to force them
51+
# GitHub allocates runners portionally. Framework tests are time consuming. That's why we want to force them
5152
# to start execution early.
5253
needs: prepare-tests-matrix
53-
# Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
54+
# Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
5455
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
5556
strategy:
56-
# The option forces to execute all jobs even though some of them have failed.
57+
# The option forces to execute all jobs even though some of them have failed.
5758
fail-fast: false
5859
matrix: ${{ fromJson(needs.prepare-tests-matrix.outputs.matrix) }}
5960
runs-on: ubuntu-20.04
60-
container: unittestbot/java-env:java11-zulu-jdk-fx-gradle7.4.2-kotlinc1.7.0
61+
container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
6162
steps:
62-
- name: Print environment variables
63-
run: printenv
64-
65-
- name: Checkout repository
66-
uses: actions/checkout@v3
63+
- name: Print environment variables
64+
run: printenv
6765

68-
- name: Check out ${{ github.event.inputs.commit_sha }} commit
69-
if: github.event.inputs.commit_sha != ''
70-
run: |
71-
git fetch
72-
git checkout ${{ github.event.inputs.commit_sha }}
73-
- name: Run monitoring
74-
run: |
75-
echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
76-
chmod +x ./scripts/monitoring.sh
77-
./scripts/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
78-
- name: Run tests
79-
run: |
80-
gradle --no-daemon :utbot-framework:test ${{ matrix.project.TESTS_TO_RUN }}
81-
- name: Upload logs
82-
if: ${{ always() }}
83-
uses: actions/upload-artifact@v3
84-
with:
85-
name: logs ${{ matrix.project.PART_NAME }}
86-
path: utbot-framework/logs/*
66+
- name: Checkout repository
67+
uses: actions/checkout@v3
68+
69+
- name: Check out ${{ github.event.inputs.commit_sha }} commit
70+
if: github.event.inputs.commit_sha != ''
71+
run: |
72+
git fetch
73+
git checkout ${{ github.event.inputs.commit_sha }}
74+
- name: Run monitoring
75+
run: |
76+
echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
77+
chmod +x ./scripts/project/monitoring.sh
78+
./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
79+
- name: Run tests
80+
run: |
81+
gradle --no-daemon :utbot-framework-test:test ${{ matrix.project.TESTS_TO_RUN }}
82+
- name: Upload logs
83+
if: ${{ always() }}
84+
uses: actions/upload-artifact@v3
85+
with:
86+
name: logs ${{ matrix.project.PART_NAME }}
87+
path: utbot-framework-test/logs/*
8788

88-
- name: Upload UTBot temp directory content
89-
if: ${{ always() }}
90-
uses: actions/upload-artifact@v3
91-
with:
92-
name: utbot_temp ${{ matrix.project.PART_NAME }}
93-
path: |
94-
/tmp/UTBot/generated*/*
95-
/tmp/UTBot/utbot-childprocess-errors/*
96-
- name: Upload test report if tests have failed
97-
if: ${{ failure() }}
98-
uses: actions/upload-artifact@v3
99-
with:
100-
name: test_report ${{ matrix.project.PART_NAME }}
101-
path: utbot-framework/build/reports/tests/test/*
89+
- name: Upload UTBot temp directory content
90+
if: ${{ always() }}
91+
uses: actions/upload-artifact@v3
92+
with:
93+
name: utbot_temp ${{ matrix.project.PART_NAME }}
94+
path: |
95+
/tmp/UTBot/generated*/*
96+
/tmp/UTBot/utbot-childprocess-errors/*
97+
- name: Upload test report if tests have failed
98+
if: ${{ failure() }}
99+
uses: actions/upload-artifact@v3
100+
with:
101+
name: test_report ${{ matrix.project.PART_NAME }}
102+
path: utbot-framework-test/build/reports/tests/test/*
102103

103104

104105
project:
105106
needs: prepare-tests-matrix
106-
# Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
107+
# Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
107108
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
108109
strategy:
109-
# The option forces to execute all jobs even though some of them have failed.
110+
# The option forces to execute all jobs even though some of them have failed.
110111
fail-fast: false
111112
matrix:
112-
project: [utbot-api, utbot-cli, utbot-core, utbot-framework-api, utbot-fuzzers, utbot-gradle, utbot-instrumentation, utbot-instrumentation-tests, utbot-intellij, utbot-junit-contest, utbot-sample, utbot-summary, utbot-summary-tests]
113+
project: [utbot-api, utbot-cli, utbot-core, utbot-framework, utbot-framework-api, utbot-fuzzers, utbot-gradle, utbot-instrumentation, utbot-instrumentation-tests, utbot-intellij, utbot-junit-contest, utbot-rd, utbot-sample, utbot-summary, utbot-summary-tests]
113114
runs-on: ubuntu-20.04
114-
container: unittestbot/java-env:java11-zulu-jdk-fx-gradle7.4.2-kotlinc1.7.0
115+
container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
115116
steps:
116-
- name: Print environment variables
117-
run: printenv
117+
- name: Print environment variables
118+
run: printenv
118119

119-
- name: Checkout repository
120-
uses: actions/checkout@v3
120+
- name: Checkout repository
121+
uses: actions/checkout@v3
121122

122-
- name: Check out ${{ github.event.inputs.commit_sha }} commit
123-
if: github.event.inputs.commit_sha != ''
124-
run: |
125-
git fetch
126-
git checkout ${{ github.event.inputs.commit_sha }}
127-
- uses: actions/checkout@v3
128-
with:
129-
ref: ${{ env.COMMIT_SHA }}
123+
- name: Check out ${{ github.event.inputs.commit_sha }} commit
124+
if: github.event.inputs.commit_sha != ''
125+
run: |
126+
git fetch
127+
git checkout ${{ github.event.inputs.commit_sha }}
128+
- uses: actions/checkout@v3
129+
with:
130+
ref: ${{ env.COMMIT_SHA }}
130131

131-
- name: Run monitoring
132-
run: |
133-
echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
134-
chmod +x ./scripts/monitoring.sh
135-
./scripts/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
136-
- name: Run tests
137-
run: |
138-
cd ${{ matrix.project }}
139-
gradle build --no-daemon
140-
- name: Upload test report if tests have failed
141-
if: ${{ failure() }}
142-
uses: actions/upload-artifact@v3
143-
with:
144-
name: test_report ${{ matrix.project }}
145-
path: ${{ matrix.project }}/build/reports/tests/test/*
132+
- name: Run monitoring
133+
run: |
134+
echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
135+
chmod +x ./scripts/project/monitoring.sh
136+
./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
137+
- name: Run tests
138+
run: |
139+
cd ${{ matrix.project }}
140+
gradle build --no-daemon
141+
- name: Upload test report if tests have failed
142+
if: ${{ failure() }}
143+
uses: actions/upload-artifact@v3
144+
with:
145+
name: test_report ${{ matrix.project }}
146+
path: ${{ matrix.project }}/build/reports/tests/test/*

.github/workflows/build-and-run-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ env:
1616
jobs:
1717
build-and-run-tests:
1818
uses: ./.github/workflows/build-and-run-tests-from-branch.yml
19+
secrets: inherit
1920

2021

2122
publish-cli-image:
2223
needs: build-and-run-tests
2324
if: ${{ github.event_name == 'push' }}
2425
runs-on: ubuntu-20.04
25-
container: unittestbot/java-env:java11-zulu-jdk-fx-gradle7.4.2-kotlinc1.7.0
26+
container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
2627
steps:
2728
- name: Print environment variables
2829
run: printenv

0 commit comments

Comments
 (0)