-
Notifications
You must be signed in to change notification settings - Fork 24
280 lines (237 loc) · 12 KB
/
gradle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Gradle CI tests
on:
push:
branches: [ master, master_workflow ]
pull_request:
branches: [ master ]
jobs:
windows:
runs-on: windows-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
java: [ '11', '17', '21' ]
steps:
- uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: ${{ matrix.java }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Prepare TESTAR protocols
run: ./gradlew init_workflow_test
- name: Build TESTAR with Gradle
run: ./gradlew build
- name: Save JUnit test results
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-saveJunitTests-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/reports/tests
- name: Prepare installed distribution of TESTAR with Gradle
run: ./gradlew installDist
- name: Run TESTAR dialog
run: ./gradlew runTestRunGUI
- name: Run desktop_generic protocol with TESTAR using COMMAND_LINE
run: ./gradlew runTestDesktopGenericCommandLineOk
- name: Save runTestDesktopGenericCommandLineOk HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestDesktopGenericCommandLineOk-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_ok
- name: Run desktop_generic protocol with TESTAR to test waitAndLeftClickWidgetWithMatchingTags feature
run: ./gradlew runTestDesktopGenericMultiTags
- name: Save runTestDesktopGenericMultiTags HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestDesktopGenericMultiTags-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_multitags
- name: Run desktop_generic protocol that contains SuspiciousTag with TESTAR
run: ./gradlew runTestDesktopGenericCommandLineSuspiciousTag
- name: Save runTestDesktopGenericCommandLineSuspiciousTag HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestDesktopGenericCommandLineSuspiciousTag-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_command_and_suspicious
- name: Run desktop_generic protocol using specific filtering and detect a SuspiciousTag with TESTAR
run: ./gradlew runTestDesktopGenericCommandLineSettingsFilterSuspiciousTag
- name: Save runTestDesktopGenericCommandLineSettingsFilterSuspiciousTag HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestDesktopGenericCommandLineSettingsFilterSuspiciousTag-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_command_settings_filter_and_suspicious
- name: Run desktop_generic protocol but connect using SUT_PROCESS_NAME and detect SuspiciousTag
run: ./gradlew runTestDesktopGenericProcessNameSuspiciousTag
- name: Save runTestDesktopGenericProcessNameSuspiciousTag HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestDesktopGenericProcessNameSuspiciousTag-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_process_and_suspicious
- name: Run desktop_generic protocol but connect using SUT_WINDOW_TITLE and detect SuspiciousTag
run: ./gradlew runTestDesktopGenericTitleNameSuspiciousTag
- name: Save runTestDesktopGenericTitleNameSuspiciousTag HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestDesktopGenericTitleNameSuspiciousTag-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_title_and_suspicious
# Enable Java Access Bridge
- name: Enable Java Access Bridge
shell: cmd
run: jabswitch /enable
# Run the Java Swing Test
- name: Run desktop_java_swing protocol which uses Java Access Bridge for Java Swing apps
run: ./gradlew runTestDesktopJavaSwing
- name: Save runTestDesktopJavaSwing HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestDesktopJavaSwing-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/java_swing_ok
# Always Disable Java Access Bridge to revert environment changes
- name: Disable Java Access Bridge
if: always()
shell: cmd
run: jabswitch /disable
- name: Run desktop_generic with OrientDB to infer a TESTAR State Model
run: ./gradlew runTestDesktopGenericStateModel
- name: Save runTestDesktopGenericStateModel HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestDesktopGenericStateModel-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_state_model
- name: Run desktop_generic doing a customization in the AbstractID identifer
run: ./gradlew runTestDesktopGenericStateModelCustomAbstraction
- name: Save runTestDesktopGenericStateModelCustomAbstraction HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestDesktopGenericStateModelCustomAbstraction-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_state_model_custom
- name: Run webdriver protocol and detect SuspiciousTag
run: ./gradlew runTestWebdriverSuspiciousTag
- name: Save runTestWebdriverSuspiciousTag HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestWebdriverSuspiciousTag-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_and_suspicious
- name: Run webdriver to login in parabank and detect browser console error
run: ./gradlew runTestWebdriverParabankLoginAndConsoleError
- name: Save runTestWebdriverParabankLoginAndConsoleError HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestWebdriverParabankLoginAndConsoleError-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_login_console_error
- name: Run webdriver to login in parabank using form filling
run: ./gradlew runTestWebdriverParabankFormFilling
- name: Save runTestWebdriverParabankFormFilling HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestWebdriverParabankFormFilling-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_form_filling
- name: Run webdriver to login in parabank and execute webdriver remote actions
run: ./gradlew runTestWebdriverParabankRemoteActions
- name: Save runTestWebdriverParabankRemoteActions HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestWebdriverParabankRemoteActions-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_remote_actions
- name: Run TESTAR Replay mode with a web page to check that replayed correctly
run: ./gradlew runTestWebdriverCorrectReplay
- name: Save runTestWebdriverCorrectReplay HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestWebdriverCorrectReplay-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_replay
- name: Run TESTAR Replay mode to detect a not replayable button
run: ./gradlew runTestWebdriverUnreplayable
- name: Save runTestWebdriverUnreplayable HTML report artifact
uses: actions/upload-artifact@v4
# Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()')
if: failure()
with:
name: Java${{ matrix.java }}-runTestWebdriverUnreplayable-artifact
path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_unreplayable
linux:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
java: [ '11', '17', '21' ]
steps:
- uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: ${{ matrix.java }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Prepare TESTAR protocols
run: ./gradlew init_workflow_test
- name: Build TESTAR with Gradle
run: ./gradlew build
- name: Prepare installed distribution of TESTAR with Gradle
run: ./gradlew installDist
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y xvfb x11-utils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 xdotool
- name: Run webdriver protocol and detect SuspiciousTag
run: xvfb-run ./gradlew runTestWebdriverSuspiciousTagUbuntu
macos:
runs-on: macos-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
java: [ '11', '17', '21' ]
steps:
- uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: ${{ matrix.java }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Prepare TESTAR protocols
run: ./gradlew init_workflow_test
- name: Build TESTAR with Gradle
run: ./gradlew build
- name: Prepare installed distribution of TESTAR with Gradle
run: ./gradlew installDist
- name: Run webdriver protocol and detect SuspiciousTag
run: ./gradlew runTestWebdriverSuspiciousTagMacOS