change autoClose screport to windowed and fix xml report attachment

This commit is contained in:
Quentin Monnier 2023-01-08 12:37:37 -06:00 committed by Sylvain Berfini
parent 13ade48a87
commit 3f31c66380
5 changed files with 12 additions and 12 deletions

Binary file not shown.

View file

@ -3,7 +3,7 @@ import os
from bs4 import BeautifulSoup
from junit_xml import TestSuite, TestCase
parser = argparse.ArgumentParser('screport',description='screport - The comparison tool to check and manage the conform display of any app')
parser = argparse.ArgumentParser('html2xml',description='html2xml - Python script to convert html androidTest reports into jUnit xml reports')
parser.add_argument('-p', '--reports-path',
help='The path to search for reports files',
required=False,
@ -53,12 +53,12 @@ for file in classNames:
message = failure.find("pre")
images = []
for img in message.find_all("img"):
images.append(img["src"])
images.append(os.path.join(path,img["src"]))
img.decompose()
for div in message.find_all("div"):
div.decompose()
Tests[fileName][testName][2] = message.text
Tests[fileName][testName][3] = " ".join(images)
Tests[fileName][testName][3] = "[[ATTACHMENT|" + " ".join(images) + "]]"
except:
pass

View file

@ -9,7 +9,7 @@ variables:
android_api: "33" #android 13
emulator_type: "apis" #atd for api < 30 more efficient
system_architecture: "arm64-v8a" #x86_64 or x86 for Intels
android_system_image: "system-images;android-$android_api;google_$emulator_type;$system_architecture" #'sdkmanager --list | grep system-images' to have all existing configs
android_system_image: "system-images;android-$android_api;google_$emulator_type;$system_architecture" # 'sdkmanager --list | grep system-images' to have all existing configs
emulator_device: "pixel_6"
emulator_name: "$emulator_device-api_$android_api-google_$emulator_type-arch_$system_architecture"
@ -34,12 +34,12 @@ job-android-uitests:
script:
- set +e
- ./gradlew -Pandroid.testInstrumentationRunnerArguments.class=org.linphone.testsuites.CallTestSuite -PscreportAutoClose=true connectedAndroidTest --continue
- ./gradlew -Pandroid.testInstrumentationRunnerArguments.class=org.linphone.testsuites.CallTestSuite -PscreportWindowed=false connectedAndroidTest --continue
- export BUILD_RESULT=$?
- ${ANDROID_HOME}/platform-tools/adb -s emulator-5554 emu kill
- ${ANDROID_HOME}/platform-tools/adb -s emulator-5554 emu kill
- ${ANDROID_HOME}/platform-tools/adb -s emulator-5554 emu kill #in case a confirm dialog popup appears
- ${ANDROID_HOME}/platform-tools/adb kill-server
- if [$BUILD_RESULT -eq 0]; then exit 0; else exit 1; fi
- if [$BUILD_RESULT -eq 0] || [ ! -d app/build/reports/androidTests/connected/failures ]; then exit 0; else exit 1; fi
after_script:
- mv app/build/reports/androidTests/connected/* reports

View file

@ -420,11 +420,11 @@ def fetchScreenshotsTask = task('fetchScreenshots', type: Exec, group: 'reportin
def launchScreenshotsComparisonTask = task('launchScreenshotsComparison', type: Exec, group: 'reporting') {
workingDir "$rootDir/screport/"
def autoClose = "false"
if (project.hasProperty("screportAutoClose") ) {
autoClose = screportAutoClose
def windowed = "true"
if (project.hasProperty("screportWindowed") ) {
windowed = screportWindowed
}
commandLine "python3", "launch.py", "-rp", "$projectDir/src/androidTest/java/org/linphone/screenshots", "-sp", "$projectDir/build/reports/androidTests/connected/screenshots", "-ac", "$autoClose"
commandLine "python3", "launch.py", "-rp", "$projectDir/src/androidTest/java/org/linphone/screenshots", "-sp", "$projectDir/build/reports/androidTests/connected/screenshots", "-wd", "$windowed"
dependsOn() {
fetchScreenshotsTask

@ -1 +1 @@
Subproject commit 3cbfaf20a15d7944025156711b655e5b13e0f779
Subproject commit c43b608d346d1ee440e874a2c19e3802847c4916