From 72d555f6e07cf811e7439f70a8ca389364d0f969 Mon Sep 17 00:00:00 2001 From: Mohab Mohie Date: Mon, 25 Mar 2024 12:10:55 +0200 Subject: [PATCH] overriding test config instead of suite (#1559) * remove basicAuth tests from safari * force set thread count per pipeline job * adding javadoc deployment * optimizing threads per test scope * forgot to add -DsetParallel=METHODS --- .github/workflows/e2eTests.yml | 50 +++++++++---------- .github/workflows/mavenCentral_cd.yml | 10 +++- .../internal/TestNGListenerHelper.java | 22 +++----- .../resources/properties/TestNG.properties | 15 ------ 4 files changed, 40 insertions(+), 57 deletions(-) delete mode 100644 src/main/resources/properties/TestNG.properties diff --git a/.github/workflows/e2eTests.yml b/.github/workflows/e2eTests.yml index 9d8ee1e8a43..faeb7123f3c 100644 --- a/.github/workflows/e2eTests.yml +++ b/.github/workflows/e2eTests.yml @@ -27,7 +27,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DsetThreadCount=1" "-DretryMaximumNumberOfAttempts=3" "-DexecutionAddress=local" "-DtargetOperatingSystem=MAC" "-DtargetBrowserName=SAFARI" "-DgenerateAllureReportArchive=true" "-Dtest=${GLOBAL_TESTING_SCOPE}" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=3" "-DexecutionAddress=local" "-DtargetOperatingSystem=MAC" "-DtargetBrowserName=SAFARI" "-DgenerateAllureReportArchive=true" "-Dtest=${GLOBAL_TESTING_SCOPE}" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -68,7 +68,7 @@ jobs: run: (Get-Item (Get-Command msedge).Source).VersionInfo.ProductVersion - name: Run tests continue-on-error: true - run: mvn -e test "-DsetThreadCount=1" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=local" "-DtargetOperatingSystem=WINDOWS" "-DtargetBrowserName=MicrosoftEdge" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=!%regex[.*DatabaseActions.*], !%regex[.*DB.*], !%regex[.*Db.*], !%regex[.*db.*], !%regex[.*API.*], !%regex[.*Api.*], !%regex[.*uestBuilder.*], !%regex[.*Rest.*], !%regex[.*Json.*], !%regex[.*JSON.*], !%regex[.*json.*], !%regex[.*ndroid.*], !%regex[.*IOS.*], !%regex[.*obile.*], !%regex[.*CucumberTests.*], !%regex[.*LT.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=local" "-DtargetOperatingSystem=WINDOWS" "-DtargetBrowserName=MicrosoftEdge" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=!%regex[.*DatabaseActions.*], !%regex[.*DB.*], !%regex[.*Db.*], !%regex[.*db.*], !%regex[.*API.*], !%regex[.*Api.*], !%regex[.*uestBuilder.*], !%regex[.*Rest.*], !%regex[.*Json.*], !%regex[.*JSON.*], !%regex[.*json.*], !%regex[.*ndroid.*], !%regex[.*IOS.*], !%regex[.*obile.*], !%regex[.*CucumberTests.*], !%regex[.*LT.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -99,7 +99,7 @@ jobs: distribution: 'zulu' - name: Run tests continue-on-error: true - run: mvn -e test "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*DatabaseActions.*], %regex[.*DB.*], %regex[.*Db.*], %regex[.*db.*]" + run: mvn -e test "-DsetThreadCount=4" "-DsetParallel=METHODS" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*DatabaseActions.*], %regex[.*DB.*], %regex[.*Db.*], %regex[.*db.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -135,7 +135,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*API.*], %regex[.*Api.*], %regex[.*uestBuilder.*], %regex[.*Rest.*], %regex[.*Json.*], %regex[.*JSON.*], %regex[.*json.*]" + run: mvn -e test "-DsetThreadCount=4" "-DsetParallel=METHODS" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*API.*], %regex[.*Api.*], %regex[.*uestBuilder.*], %regex[.*Rest.*], %regex[.*Json.*], %regex[.*JSON.*], %regex[.*json.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -161,7 +161,7 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 - name: Set up Native Selenium Grid - run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=0 --scale edge=0 --scale firefox=4 -d + run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=0 --scale edge=0 --scale firefox=10 -d - name: Set up JDK 21 uses: actions/setup-java@v4 with: @@ -175,7 +175,7 @@ jobs: run: docker ps - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=localhost:4444" "-DtargetOperatingSystem=LINUX" "-DtargetBrowserName=firefox" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=${GLOBAL_TESTING_SCOPE}" + run: mvn -e test "-DsetThreadCount=10" "-DsetParallel=METHODS" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=localhost:4444" "-DtargetOperatingSystem=LINUX" "-DtargetBrowserName=firefox" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=${GLOBAL_TESTING_SCOPE}" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -201,7 +201,7 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 - name: Set up Native Selenium Grid - run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d + run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=10 --scale edge=0 --scale firefox=0 -d - name: Set up JDK 21 uses: actions/setup-java@v4 with: @@ -215,7 +215,7 @@ jobs: run: docker ps - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=localhost:4444" "-DtargetOperatingSystem=LINUX" "-DtargetBrowserName=chrome" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=${GLOBAL_TESTING_SCOPE}" + run: mvn -e test "-DsetThreadCount=10" "-DsetParallel=METHODS" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=localhost:4444" "-DtargetOperatingSystem=LINUX" "-DtargetBrowserName=chrome" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=${GLOBAL_TESTING_SCOPE}" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -241,7 +241,7 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 - name: Set up Native Selenium Grid - run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=0 --scale edge=4 --scale firefox=0 -d + run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=0 --scale edge=10 --scale firefox=0 -d - name: Set up JDK 21 uses: actions/setup-java@v4 with: @@ -255,7 +255,7 @@ jobs: run: docker ps - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=localhost:4444" "-DtargetOperatingSystem=LINUX" "-DtargetBrowserName=MicrosoftEdge" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=${GLOBAL_TESTING_SCOPE}" + run: mvn -e test "-DsetThreadCount=10" "-DsetParallel=METHODS" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=localhost:4444" "-DtargetOperatingSystem=LINUX" "-DtargetBrowserName=MicrosoftEdge" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=${GLOBAL_TESTING_SCOPE}" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -295,7 +295,7 @@ jobs: chrome-version: stable - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=local" "-DtargetOperatingSystem=WINDOWS" "-DtargetBrowserName=chrome" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=!%regex[.*DatabaseActions.*], !%regex[.*DB.*], !%regex[.*Db.*], !%regex[.*db.*], !%regex[.*API.*], !%regex[.*Api.*], !%regex[.*uestBuilder.*], !%regex[.*Rest.*], !%regex[.*Json.*], !%regex[.*JSON.*], !%regex[.*json.*], !%regex[.*ndroid.*], !%regex[.*IOS.*], !%regex[.*obile.*], !%regex[.*CucumberTests.*], !%regex[.*LT.*]" + run: mvn -e test "-DsetThreadCount=4" "-DsetParallel=METHODS" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=local" "-DtargetOperatingSystem=WINDOWS" "-DtargetBrowserName=chrome" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=!%regex[.*DatabaseActions.*], !%regex[.*DB.*], !%regex[.*Db.*], !%regex[.*db.*], !%regex[.*API.*], !%regex[.*Api.*], !%regex[.*uestBuilder.*], !%regex[.*Rest.*], !%regex[.*Json.*], !%regex[.*JSON.*], !%regex[.*json.*], !%regex[.*ndroid.*], !%regex[.*IOS.*], !%regex[.*obile.*], !%regex[.*CucumberTests.*], !%regex[.*LT.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -335,7 +335,7 @@ jobs: chrome-version: stable - name: Run tests continue-on-error: true - run: mvn -e test "-DsetThreadCount=1" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=local" "-DtargetOperatingSystem=MAC" "-DtargetBrowserName=chrome" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=${GLOBAL_TESTING_SCOPE}" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=local" "-DtargetOperatingSystem=MAC" "-DtargetBrowserName=chrome" "-DheadlessExecution=true" "-DgenerateAllureReportArchive=true" "-Dtest=${GLOBAL_TESTING_SCOPE}" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -371,7 +371,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=3" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=ANDROID" "-Dmobile_automationName=UIAutomator2" "-DbrowserStack.platformVersion=13.0" "-DbrowserStack.deviceName=Google Pixel 7" "-DbrowserStack.appName=ApiDemos-debug.apk" "-DbrowserStack.appRelativeFilePath=src/test/resources/testDataFiles/apps/ApiDemos-debug.apk" "-DbrowserStack.appUrl=" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*ndroidBasic.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=3" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=ANDROID" "-Dmobile_automationName=UIAutomator2" "-DbrowserStack.platformVersion=13.0" "-DbrowserStack.deviceName=Google Pixel 7" "-DbrowserStack.appName=ApiDemos-debug.apk" "-DbrowserStack.appRelativeFilePath=src/test/resources/testDataFiles/apps/ApiDemos-debug.apk" "-DbrowserStack.appUrl=" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*ndroidBasic.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -407,7 +407,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=IOS" "-Dmobile_automationName=XCuiTest" "-DbrowserStack.osVersion=16" "-DbrowserStack.deviceName=iPhone 14" "-Dmobile_browserName=SAFARI" "-DbrowserStack.appName=" "-DbrowserStack.appRelativeFilePath=" "-DbrowserStack.appUrl=" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*MobileWebTest.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=IOS" "-Dmobile_automationName=XCuiTest" "-DbrowserStack.osVersion=16" "-DbrowserStack.deviceName=iPhone 14" "-Dmobile_browserName=SAFARI" "-DbrowserStack.appName=" "-DbrowserStack.appRelativeFilePath=" "-DbrowserStack.appUrl=" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*MobileWebTest.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -443,7 +443,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=ANDROID" "-Dmobile_automationName=UIAutomator2" "-DbrowserStack.osVersion=13.0" "-DbrowserStack.deviceName=Samsung Galaxy S23" "-Dmobile_browserName=CHROME" "-DbrowserStack.appName=" "-DbrowserStack.appRelativeFilePath=" "-DbrowserStack.appUrl=" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*MobileWebTest.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=ANDROID" "-Dmobile_automationName=UIAutomator2" "-DbrowserStack.osVersion=13.0" "-DbrowserStack.deviceName=Samsung Galaxy S23" "-Dmobile_browserName=CHROME" "-DbrowserStack.appName=" "-DbrowserStack.appRelativeFilePath=" "-DbrowserStack.appUrl=" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*MobileWebTest.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -479,7 +479,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=ANDROID" "-Dmobile_automationName=UIAutomator2" "-DbrowserStack.osVersion=13.0" "-DbrowserStack.deviceName=Samsung Galaxy S23" "-Dmobile_browserName=samsung" "-DbrowserStack.appName=" "-DbrowserStack.appRelativeFilePath=" "-DbrowserStack.appUrl=" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*MobileWebTest.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=ANDROID" "-Dmobile_automationName=UIAutomator2" "-DbrowserStack.osVersion=13.0" "-DbrowserStack.deviceName=Samsung Galaxy S23" "-Dmobile_browserName=samsung" "-DbrowserStack.appName=" "-DbrowserStack.appRelativeFilePath=" "-DbrowserStack.appUrl=" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*MobileWebTest.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -515,7 +515,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DsetThreadCount=1" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=MAC" "-DtargetBrowserName=Safari" "-DbrowserStack.os=OS X" "-DbrowserStack.osVersion=Sonoma" "-DbrowserStack.browserVersion=17.0" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*BrowserActionsTests.*], %regex[.*BigPageActionsTest.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=MAC" "-DtargetBrowserName=Safari" "-DbrowserStack.os=OS X" "-DbrowserStack.osVersion=Sonoma" "-DbrowserStack.browserVersion=17.0" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*BrowserActionsTests.*], %regex[.*BigPageActionsTest.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -546,7 +546,7 @@ jobs: node-version: '16' - name: Set up Native Selenium Grid if: runner.os == 'Linux' - run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d + run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=10 --scale edge=0 --scale firefox=0 -d - name: Set up JDK 21 uses: actions/setup-java@v4 with: @@ -562,7 +562,7 @@ jobs: - name: Run tests on Linux/MacOS if: runner.os != 'Windows' continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=localhost:4444" "-DtargetOperatingSystem=LINUX" "-DtargetBrowserName=chrome" "-DmaximumPerformanceMode=2" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*CucumberTests.*]" + run: mvn -e test "-DsetThreadCount=10" "-DsetParallel=METHODS" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=localhost:4444" "-DtargetOperatingSystem=LINUX" "-DtargetBrowserName=chrome" "-DmaximumPerformanceMode=2" "-DgenerateAllureReportArchive=true" "-Dtest=%regex[.*CucumberTests.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -608,7 +608,7 @@ jobs: - name: Run tests on Windows if: runner.os == 'Windows' continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" -DexecutionAddress="local" -DtargetOperatingSystem="WINDOWS" -DmaximumPerformanceMode="2" -DtargetBrowserName="MicrosoftEdge" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*CucumberTests.*]" + run: mvn -e test "-DsetThreadCount=4" "-DsetParallel=METHODS" "-DretryMaximumNumberOfAttempts=1" -DexecutionAddress="local" -DtargetOperatingSystem="WINDOWS" -DmaximumPerformanceMode="2" -DtargetBrowserName="MicrosoftEdge" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*CucumberTests.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -648,7 +648,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DsetThreadCount=1" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=MAC" "-DtargetBrowserName=Safari" "-DmaximumPerformanceMode=1" "-DbrowserStack.os=OS X" "-DbrowserStack.osVersion=Sonoma" "-DbrowserStack.browserVersion=17.0" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*CucumberTests.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=browserstack" "-DtargetOperatingSystem=MAC" "-DtargetBrowserName=Safari" "-DmaximumPerformanceMode=1" "-DbrowserStack.os=OS X" "-DbrowserStack.osVersion=Sonoma" "-DbrowserStack.browserVersion=17.0" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*CucumberTests.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -688,7 +688,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=lambdatest" "-DtargetOperatingSystem=windows" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*Test_LTMobAPK*.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=lambdatest" "-DtargetOperatingSystem=windows" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*Test_LTMobAPK*.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -729,7 +729,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=lambdatest" "-DtargetOperatingSystem=windows" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*Test_LTMobIPA*.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=lambdatest" "-DtargetOperatingSystem=windows" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*Test_LTMobIPA*.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -770,7 +770,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=lambdatest" "-DtargetOperatingSystem=windows" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*Test_LTWebApp*.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=lambdatest" "-DtargetOperatingSystem=windows" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*Test_LTWebApp*.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -811,7 +811,7 @@ jobs: maven-version: 3.9.5 - name: Run tests continue-on-error: true - run: mvn -e test "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=lambdatest" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*Test_LTDesktopWeb*.*]" + run: mvn -e test "-DsetThreadCount=1" "-DsetParallel=NONE" "-DretryMaximumNumberOfAttempts=1" "-DexecutionAddress=lambdatest" -DgenerateAllureReportArchive="true" -Dtest="%regex[.*Test_LTDesktopWeb*.*]" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/mavenCentral_cd.yml b/.github/workflows/mavenCentral_cd.yml index 47bf6370107..5c44ad5b423 100644 --- a/.github/workflows/mavenCentral_cd.yml +++ b/.github/workflows/mavenCentral_cd.yml @@ -51,9 +51,15 @@ jobs: gpgconf --kill gpg-agent gpg -K --keyid-format SHORT export GPG_TTY=$(tty) - - name: Deploy SHAFT to maven central + - name: Deploy to maven central continue-on-error: true env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - run: mvn --batch-mode deploy "-DskipTests" "-Dgpg.keyname=${{secrets.GPG_KEYNAME}}" "-Dgpg.passphrase=${{secrets.GPG_PASSPHRASE}}" \ No newline at end of file + run: mvn --batch-mode deploy "-DskipTests" "-Dgpg.keyname=${{secrets.GPG_KEYNAME}}" "-Dgpg.passphrase=${{secrets.GPG_PASSPHRASE}}" + - name: Publish updated JavaDocs + continue-on-error: true + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + run: mvn resources:resources javadoc:javadoc scm-publish:publish-scm "-DskipTests" "-Dgpg.keyname=${{secrets.GPG_KEYNAME}}" "-Dgpg.passphrase=${{secrets.GPG_PASSPHRASE}}" \ No newline at end of file diff --git a/src/main/java/com/shaft/listeners/internal/TestNGListenerHelper.java b/src/main/java/com/shaft/listeners/internal/TestNGListenerHelper.java index bb9e5aa358b..578cab628fa 100644 --- a/src/main/java/com/shaft/listeners/internal/TestNGListenerHelper.java +++ b/src/main/java/com/shaft/listeners/internal/TestNGListenerHelper.java @@ -5,7 +5,6 @@ import com.shaft.enums.internal.Screenshots; import com.shaft.gui.internal.image.AnimatedGifManager; import com.shaft.gui.internal.video.RecordManager; -import com.shaft.tools.io.ReportManager; import com.shaft.tools.io.internal.ReportManagerHelper; import io.qameta.allure.Issue; import io.qameta.allure.Issues; @@ -138,21 +137,14 @@ private static void createTestSuite(XmlTest xmlTest, Browser browser) { public static void configureTestNGProperties(List suites) { suites.forEach(suite -> { - suite.setPreserveOrder(SHAFT.Properties.testNG.preserveOrder()); - suite.setGroupByInstances(SHAFT.Properties.testNG.groupByInstances()); - suite.setVerbose(SHAFT.Properties.testNG.verbose()); - suite.setParallel(XmlSuite.ParallelMode.valueOf(SHAFT.Properties.testNG.parallel())); - suite.setThreadCount(SHAFT.Properties.testNG.threadCount()); suite.setDataProviderThreadCount(SHAFT.Properties.testNG.dataProviderThreadCount()); - - if (SHAFT.Properties.reporting.debugMode()) { - ReportManager.log("getPreserveOrder: " + suite.getPreserveOrder()); - ReportManager.log("getDataProviderThreadCount: " + suite.getDataProviderThreadCount()); - ReportManager.log("getThreadCount: " + suite.getThreadCount()); - ReportManager.log("getVerbose: " + suite.getVerbose()); - ReportManager.log("getGroupByInstances: " + suite.getGroupByInstances()); - ReportManager.log("getParallel: " + suite.getParallel()); - } + suite.getTests().forEach(xmlTest -> { + xmlTest.setPreserveOrder(SHAFT.Properties.testNG.preserveOrder()); + xmlTest.setGroupByInstances(SHAFT.Properties.testNG.groupByInstances()); + xmlTest.setVerbose(SHAFT.Properties.testNG.verbose()); + xmlTest.setParallel(XmlSuite.ParallelMode.valueOf(SHAFT.Properties.testNG.parallel())); + xmlTest.setThreadCount(SHAFT.Properties.testNG.threadCount()); + }); }); } diff --git a/src/main/resources/properties/TestNG.properties b/src/main/resources/properties/TestNG.properties deleted file mode 100644 index 75cf47d9af8..00000000000 --- a/src/main/resources/properties/TestNG.properties +++ /dev/null @@ -1,15 +0,0 @@ -################################################### -##### SHAFT_Engine: TestNG.properties -################################################### -setParallel=METHODS -# METHODS, TESTS, CLASSES, INSTANCES, NONE -setThreadCount=4 -setVerbose=1 -setPreserveOrder=false -setGroupByInstances=false -setDataProviderThreadCount=1 -#Test Suite Timeout in minutes -testSuiteTimeout=1440 -################################################### -##### END of PropertiesHelper File -################################################### \ No newline at end of file