mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
Squish tests setup on CI
This commit is contained in:
parent
b9fe688f01
commit
63cbd1b788
23 changed files with 18523 additions and 3 deletions
|
|
@ -109,3 +109,29 @@ ubuntu2204-makefile-gcc-plugins-deploy:
|
|||
script:
|
||||
- rsync -rlv --ignore-existing build/OUTPUT/plugins/app/*.so $DEPLOY_SERVER:$UPLOAD_ROOT_PATH/$LINUX_PLATFORM/$APP_FOLDER/plugins/
|
||||
|
||||
.linux-squishrunner-script: &linux-squishrunner-script |
|
||||
echo "Starting Squish tests..."
|
||||
"$SQUISH_BIN_PATH_LINUX/squishserver" --config removeAUT $APPLICATION_NAME
|
||||
"$SQUISH_BIN_PATH_LINUX/squishserver" --config addAUT $APPLICATION_NAME build/OUTPUT/macos-arm64
|
||||
"$SQUISH_BIN_PATH_LINUX/squishserver" &
|
||||
"$SQUISH_BIN_PATH_LINUX/squishrunner" --testsuite tester/squish/suites/linux --reportgen html,build/output/squish-reports --exitCodeOnFail 1
|
||||
"$SQUISH_BIN_PATH_LINUX/squishrunner" --testsuite tester/squish/suites/cross-platform --reportgen html,build/output/squish-reports --exitCodeOnFail 1
|
||||
"$SQUISH_BIN_PATH_LINUX/squishserver" --stop
|
||||
echo "Squish tests finished."
|
||||
|
||||
linux-squish-tests:
|
||||
stage: test
|
||||
image: gitlab.linphone.org:4567/bc/private/docker-private/bc-dev-ubuntu-25-04-squish:20250925_170856_20250925_add_squish_for_qt
|
||||
tags: [ "docker" ]
|
||||
needs:
|
||||
- ubuntu2204-makefile-gcc-package
|
||||
rules:
|
||||
- if: $SQUISH_TESTS
|
||||
- if: $PACKAGE_LINUX
|
||||
script:
|
||||
- *linux-squishrunner-script
|
||||
artifacts:
|
||||
paths:
|
||||
- build/OUTPUT/squish-reports/*
|
||||
when: always
|
||||
expire_in: 1 week
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ macosx-ninja-package:
|
|||
extends: macosx-ninja
|
||||
script:
|
||||
- if [[ $MAKE_RELEASE_FILE_URL == "" ]]; then export RELEASE_FILE=""; fi
|
||||
- export CMAKE_OPTIONS="$CMAKE_OPTIONS -DSQUISH_TESTS=${SQUISH_TESTS:-OFF}"
|
||||
- *build_all_script
|
||||
artifacts:
|
||||
when: always
|
||||
|
|
@ -169,3 +170,37 @@ macosx-makefile-plugins-deploy:
|
|||
script:
|
||||
- rsync -rlv --ignore-existing build/OUTPUT/plugins/app/*.dylib $DEPLOY_SERVER:$UPLOAD_ROOT_PATH/$MACOSX_PLATFORM/$APP_FOLDER/plugins
|
||||
|
||||
#################################################
|
||||
# TEST
|
||||
#################################################
|
||||
|
||||
.macosx-squishrunner-script: &macosx-squishrunner-script |
|
||||
set -eo pipefail
|
||||
mkdir -p build/OUTPUT/squish/reports
|
||||
rm -f ~/Library/Preferences/linphone/linphonerc
|
||||
"$SQUISH_BIN_PATH_MACOS/squishserver" --config removeAUT "$APPLICATION_NAME"
|
||||
"$SQUISH_BIN_PATH_MACOS/squishserver" --config addAUT "$APPLICATION_NAME" build/OUTPUT/macos-arm64
|
||||
set +e
|
||||
"$SQUISH_BIN_PATH_MACOS/squishrunner" \
|
||||
--testsuite tester/squish/suites/mac \
|
||||
--reportgen html,build/OUTPUT/squish/reports \
|
||||
--exitCodeOnFail 1
|
||||
TEST_RESULT_SQUISHRUNNER=$?
|
||||
set -e
|
||||
exit $TEST_RESULT_SQUISHRUNNER
|
||||
|
||||
macosx-squish-tests:
|
||||
stage: test
|
||||
tags: [ "macos-min-xcode12.2" ]
|
||||
needs:
|
||||
- macosx-ninja-package
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $DOCKER_UPDATE == null && $PACKAGE_MACOSX && $SQUISH_TESTS
|
||||
script:
|
||||
- *macosx-squishrunner-script
|
||||
artifacts:
|
||||
paths:
|
||||
- build/OUTPUT/squish/reports/*
|
||||
when: always
|
||||
expire_in: 1 week
|
||||
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ win64-codesigning:
|
|||
- cd build-desktop/OUTPUT/Packages/
|
||||
- Invoke-Expression "& ${WINDOWS_SIGN_TOOL} sign /fd SHA256 /t ${WINDOWS_SIGN_TIMESTAMP_URL} /sha1 ${WINDOWS_SIGN_HASH} *.exe"
|
||||
- 'if (-not ($LastExitCode -eq 0)) {throw "Error: Signature failed"}'
|
||||
artifacts:
|
||||
artifacts:
|
||||
paths:
|
||||
- build-desktop\OUTPUT\Packages\*
|
||||
when: always
|
||||
|
|
@ -260,3 +260,35 @@ win64-ninja-vs2022-plugins-upload:
|
|||
extends: .win64-plugins-upload
|
||||
needs:
|
||||
- win64-ninja-vs2022-scheduled-windows
|
||||
|
||||
#################################################
|
||||
# TEST
|
||||
#################################################
|
||||
|
||||
win64-squish-tests:
|
||||
stage: test
|
||||
tags: [ "windows-powershell-vs-17-2022" ]
|
||||
needs:
|
||||
- win64-ninja-vs2022-package-windows
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $DOCKER_UPDATE == null && $PACKAGE_WINDOWS && $SQUISH_TESTS
|
||||
script:
|
||||
- |
|
||||
try {
|
||||
& "$env:SQUISH_BIN_PATH_WIN64\squishserver" --config removeAUT linphone.exe
|
||||
& "$env:SQUISH_BIN_PATH_WIN64\squishserver" --config addAUT linphone.exe build-desktop/OUTPUT/bin
|
||||
Start-Process -FilePath "$env:SQUISH_BIN_PATH_WIN64\squishserver" -PassThru
|
||||
mkdir "build-desktop/OUTPUT\squish\reports" -Force
|
||||
& "$env:SQUISH_BIN_PATH_WIN64\squishrunner.exe" --testsuite tester\squish\suites\windows --reportgen html,build-desktop\OUTPUT\squish\reports --exitCodeOnFail 1
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Squish test suite failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
} finally {
|
||||
& "$env:SQUISH_BIN_PATH_WIN64\squishserver" --stop
|
||||
}
|
||||
artifacts:
|
||||
paths:
|
||||
- build-desktop\OUTPUT\squish\reports
|
||||
when: always
|
||||
expire_in: 1 week
|
||||
|
||||
|
|
|
|||
|
|
@ -53,5 +53,6 @@ include:
|
|||
stages:
|
||||
- build
|
||||
- package
|
||||
- test
|
||||
- signing
|
||||
- deploy
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ add_option(OPTION_LIST ENABLE_UNIT_TESTS "Enable unit test of SDK." OFF)
|
|||
add_option(OPTION_LIST ENABLE_UPDATE_CHECK "Enable update check." ON)
|
||||
add_option(OPTION_LIST ENABLE_VIDEO "Enable Video support." YES)
|
||||
add_option(OPTION_LIST ENABLE_WINDOWS_TOOLS_CHECK "Enable tools checks on Windows for auto install." OFF)
|
||||
add_option(OPTION_LIST SQUISH_TESTS "Run squish tests." OFF)
|
||||
|
||||
add_cache(OPTION_LIST LINPHONE_SDK_MAKE_RELEASE_FILE_URL "Make a RELEASE file that work along check_version and use this URL" "")
|
||||
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ if(APPLE)
|
|||
if (NOT DEPLOYQT_PROGRAM)
|
||||
message(FATAL_ERROR "Could not find the macdeployqt program. Make sure it is in the PATH.")
|
||||
endif()
|
||||
#Packaging is done by CPack in the cleanCPack.cmake file. But on mac, we need Qt files in .app
|
||||
if(NOT ENABLE_APP_PACKAGING)
|
||||
#Packaging is done by CPack in the cleanCPack.cmake file. But on mac, we need Qt files in .app, used by Squish tests.
|
||||
if(NOT ENABLE_APP_PACKAGING OR SQUISH_TESTS)
|
||||
install(CODE "MESSAGE(\"MacDeploy install: execute_process(COMMAND ${DEPLOYQT_PROGRAM} ${APPLICATION_OUTPUT_DIR}/${APPLICATION_NAME}.app -qmldir=${LINPHONE_QML_DIR} -no-strip -verbose=0 -always-overwrite) \")")
|
||||
install(CODE "execute_process(COMMAND ${DEPLOYQT_PROGRAM} ${APPLICATION_OUTPUT_DIR}/${APPLICATION_NAME}.app -qmldir=${LINPHONE_QML_DIR} -no-strip -verbose=0 -always-overwrite)")
|
||||
endif()
|
||||
|
|
|
|||
5
tester/squish/suites/cross-platform/suite.conf
Normal file
5
tester/squish/suites/cross-platform/suite.conf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
AUT=
|
||||
LANGUAGE=JavaScript
|
||||
OBJECTMAPSTYLE=script
|
||||
VERSION=3
|
||||
WRAPPERS=Qt
|
||||
8
tester/squish/suites/mac/config.xml
Normal file
8
tester/squish/suites/mac/config.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<testconfig version="1.0">
|
||||
<information>
|
||||
<summary/>
|
||||
<description/>
|
||||
</information>
|
||||
<testsettings/>
|
||||
<passwords/>
|
||||
</testconfig>
|
||||
0
tester/squish/suites/mac/envvars
Normal file
0
tester/squish/suites/mac/envvars
Normal file
50
tester/squish/suites/mac/shared/models/TestMBT.mbtmodel
Normal file
50
tester/squish/suites/mac/shared/models/TestMBT.mbtmodel
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"schema_version": 0,
|
||||
"type": "squish_step_diagram",
|
||||
"steps": {
|
||||
"initial": {
|
||||
"initial": true,
|
||||
"geometry": {
|
||||
"x": 0,
|
||||
"width": 25,
|
||||
"y": 0,
|
||||
"height": 25
|
||||
}
|
||||
},
|
||||
"594c2781-e602-4858-8d61-f1375b1f2bd4": {
|
||||
"implementation": "",
|
||||
"name": "step_2",
|
||||
"description": "",
|
||||
"geometry": {
|
||||
"x": 262,
|
||||
"width": 150,
|
||||
"y": 94,
|
||||
"height": 100
|
||||
}
|
||||
},
|
||||
"5b002f22-003d-4220-96fa-48ca5f8f4d22": {
|
||||
"implementation": "",
|
||||
"name": "step_3",
|
||||
"description": "",
|
||||
"geometry": {
|
||||
"x": 368,
|
||||
"width": 150,
|
||||
"y": 114,
|
||||
"height": 100
|
||||
}
|
||||
},
|
||||
"fae13a2a-7436-4077-906c-cad8e9d74a23": {
|
||||
"implementation": "",
|
||||
"name": "step_1",
|
||||
"description": "",
|
||||
"geometry": {
|
||||
"x": 807,
|
||||
"width": 150,
|
||||
"y": 101,
|
||||
"height": 100
|
||||
}
|
||||
}
|
||||
},
|
||||
"connections": [],
|
||||
"implementation_file": "x-testsuite:/shared/scripts/TestMBT_0.js"
|
||||
}
|
||||
0
tester/squish/suites/mac/shared/scripts/TestMBT_0.js
Normal file
0
tester/squish/suites/mac/shared/scripts/TestMBT_0.js
Normal file
7
tester/squish/suites/mac/shared/scripts/names.js
Normal file
7
tester/squish/suites/mac/shared/scripts/names.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { RegularExpression, Wildcard } from 'objectmaphelper.js';
|
||||
|
||||
export var linphoneQQuickApplicationWindow = {"title": "Linphone", "type": "QQuickApplicationWindow", "unnamed": 1, "visible": true};
|
||||
export var linphoneLoginPageLoginPage = {"container": linphoneQQuickApplicationWindow, "objectName": "loginPage", "type": "LoginPage", "visible": true};
|
||||
export var loginPageUsernameEditTextField = {"backgroundcolor": "#ffffff", "container": linphoneLoginPageLoginPage, "echoMode": 0, "id": "usernameEdit", "type": "TextField", "unnamed": 1, "visible": true};
|
||||
export var loginPagePasswordEditTextField = {"backgroundcolor": "#ffffff", "container": linphoneLoginPageLoginPage, "echoMode": 2, "id": "passwordEdit", "passwordCharacter": "•", "type": "TextField", "unnamed": 1, "visible": true};
|
||||
export var loginPageConnectionText = {"container": linphoneLoginPageLoginPage, "occurrence": 2, "text": "Connection", "type": "Text", "unnamed": 1, "visible": true};
|
||||
9
tester/squish/suites/mac/suite.conf
Normal file
9
tester/squish/suites/mac/suite.conf
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
AUT=
|
||||
ENVVARS=envvars
|
||||
HOOK_SUB_PROCESSES=false
|
||||
IMPLICITAUTSTART=0
|
||||
LANGUAGE=JavaScript
|
||||
OBJECTMAPSTYLE=script
|
||||
TEST_CASES=tst_Login
|
||||
VERSION=3
|
||||
WRAPPERS=Qt
|
||||
10
tester/squish/suites/mac/tst_Login/test.js
Normal file
10
tester/squish/suites/mac/tst_Login/test.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import * as names from 'names.js';
|
||||
|
||||
function main()
|
||||
{
|
||||
var app = OS.getenv("APPLICATION_NAME");
|
||||
var user = OS.getenv("SQUISH_TEST_USER1");
|
||||
var pw = OS.getenv("SQUISH_TEST_PASS1");
|
||||
startApplication(app);
|
||||
test.vp("LoginPage"); // Welcome already passed, no configurations.
|
||||
}
|
||||
9126
tester/squish/suites/mac/tst_Login/verificationPoints/LoginPage
Normal file
9126
tester/squish/suites/mac/tst_Login/verificationPoints/LoginPage
Normal file
File diff suppressed because it is too large
Load diff
8
tester/squish/suites/windows/config.xml
Normal file
8
tester/squish/suites/windows/config.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<testconfig version="1.0">
|
||||
<information>
|
||||
<summary/>
|
||||
<description/>
|
||||
</information>
|
||||
<testsettings/>
|
||||
<passwords/>
|
||||
</testconfig>
|
||||
0
tester/squish/suites/windows/envvars
Normal file
0
tester/squish/suites/windows/envvars
Normal file
50
tester/squish/suites/windows/shared/models/TestMBT.mbtmodel
Normal file
50
tester/squish/suites/windows/shared/models/TestMBT.mbtmodel
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"schema_version": 0,
|
||||
"type": "squish_step_diagram",
|
||||
"steps": {
|
||||
"initial": {
|
||||
"initial": true,
|
||||
"geometry": {
|
||||
"x": 0,
|
||||
"width": 25,
|
||||
"y": 0,
|
||||
"height": 25
|
||||
}
|
||||
},
|
||||
"594c2781-e602-4858-8d61-f1375b1f2bd4": {
|
||||
"implementation": "",
|
||||
"name": "step_2",
|
||||
"description": "",
|
||||
"geometry": {
|
||||
"x": 262,
|
||||
"width": 150,
|
||||
"y": 94,
|
||||
"height": 100
|
||||
}
|
||||
},
|
||||
"5b002f22-003d-4220-96fa-48ca5f8f4d22": {
|
||||
"implementation": "",
|
||||
"name": "step_3",
|
||||
"description": "",
|
||||
"geometry": {
|
||||
"x": 368,
|
||||
"width": 150,
|
||||
"y": 114,
|
||||
"height": 100
|
||||
}
|
||||
},
|
||||
"fae13a2a-7436-4077-906c-cad8e9d74a23": {
|
||||
"implementation": "",
|
||||
"name": "step_1",
|
||||
"description": "",
|
||||
"geometry": {
|
||||
"x": 807,
|
||||
"width": 150,
|
||||
"y": 101,
|
||||
"height": 100
|
||||
}
|
||||
}
|
||||
},
|
||||
"connections": [],
|
||||
"implementation_file": "x-testsuite:/shared/scripts/TestMBT_0.js"
|
||||
}
|
||||
0
tester/squish/suites/windows/shared/scripts/TestMBT_0.js
Normal file
0
tester/squish/suites/windows/shared/scripts/TestMBT_0.js
Normal file
7
tester/squish/suites/windows/shared/scripts/names.js
Normal file
7
tester/squish/suites/windows/shared/scripts/names.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { RegularExpression, Wildcard } from 'objectmaphelper.js';
|
||||
|
||||
export var linphoneQQuickApplicationWindow = {"title": "Linphone", "type": "QQuickApplicationWindow", "unnamed": 1, "visible": true};
|
||||
export var linphoneLoginPageLoginPage = {"container": linphoneQQuickApplicationWindow, "objectName": "loginPage", "type": "LoginPage", "visible": true};
|
||||
export var loginPageUsernameEditTextField = {"backgroundcolor": "#ffffff", "container": linphoneLoginPageLoginPage, "echoMode": 0, "id": "usernameEdit", "type": "TextField", "unnamed": 1, "visible": true};
|
||||
export var loginPagePasswordEditTextField = {"backgroundcolor": "#ffffff", "container": linphoneLoginPageLoginPage, "echoMode": 2, "id": "passwordEdit", "passwordCharacter": "•", "type": "TextField", "unnamed": 1, "visible": true};
|
||||
export var loginPageConnectionText = {"container": linphoneLoginPageLoginPage, "occurrence": 2, "text": "Connection", "type": "Text", "unnamed": 1, "visible": true};
|
||||
9
tester/squish/suites/windows/suite.conf
Normal file
9
tester/squish/suites/windows/suite.conf
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
AUT=
|
||||
ENVVARS=envvars
|
||||
HOOK_SUB_PROCESSES=false
|
||||
IMPLICITAUTSTART=0
|
||||
LANGUAGE=JavaScript
|
||||
OBJECTMAPSTYLE=script
|
||||
TEST_CASES=tst_Login
|
||||
VERSION=3
|
||||
WRAPPERS=Qt
|
||||
10
tester/squish/suites/windows/tst_Login/test.js
Normal file
10
tester/squish/suites/windows/tst_Login/test.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import * as names from 'names.js';
|
||||
|
||||
function main()
|
||||
{
|
||||
var app = OS.getenv("APPLICATION_NAME");
|
||||
var user = OS.getenv("SQUISH_TEST_USER1");
|
||||
var pw = OS.getenv("SQUISH_TEST_PASS1");
|
||||
startApplication("linphone.exe");
|
||||
test.vp("LoginPage"); // Welcome already passed, no configurations.
|
||||
}
|
||||
9126
tester/squish/suites/windows/tst_Login/verificationPoints/LoginPage
Normal file
9126
tester/squish/suites/windows/tst_Login/verificationPoints/LoginPage
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue