E2E Tests #496
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Tests | |
on: | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ main ] | |
schedule: | |
- cron: '00 1 * * *' | |
workflow_dispatch: | |
jobs: | |
GUI_Web: | |
name: Run GUI_Web Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04, windows-latest, macOS-12 ] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Set up Native Selenium Grid | |
if: runner.os == 'Linux' | |
run: docker-compose -f GUI_Web/src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: Check running containers | |
if: runner.os == 'Linux' | |
run: docker ps | |
- name: Run tests on Linux/MacOS | |
if: runner.os != 'Windows' | |
continue-on-error: true | |
run: | | |
cd GUI_Web/ | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
mvn test -DexecutionAddress="localhost:4444" -DtargetOperatingSystem="LINUX" -DmaximumPerformanceMode="2" -DtargetBrowserName="GoogleChrome" -DgenerateAllureReportArchive="true" | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
mvn test -DexecutionAddress="browserstack" -DtargetOperatingSystem="MAC" -DmaximumPerformanceMode="1" -DtargetBrowserName="Safari" "-DbrowserStack.os=OS X" "-DbrowserStack.osVersion=Monterey" "-DbrowserStack.browserVersion=15.3" -DgenerateAllureReportArchive="true" | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
- name: Run tests on Windows | |
if: runner.os == 'Windows' | |
continue-on-error: true | |
run: | | |
cd GUI_Web/ | |
mvn test -DexecutionAddress="local" -DtargetOperatingSystem="WINDOWS" -DmaximumPerformanceMode="2" -DtargetBrowserName="MicrosoftEdge" -DgenerateAllureReportArchive="true" | |
- name: Upload Allure Report as Pipeline Artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} - Desktop Browsers Tests Allure Report | |
path: "GUI_Web/generatedReport_*.zip" | |
- name: Upload Extent Report as Pipeline Artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} - Desktop Browsers Tests Extent Report | |
path: "GUI_Web/extent-reports/ExtentReports_*.html" | |
GUI_Web_Basic: | |
name: Run GUI_Web_Basic Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04, windows-latest, macOS-12 ] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Set up Native Selenium Grid | |
if: runner.os == 'Linux' | |
run: docker-compose -f GUI_Web_Basic/src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: Check running containers | |
if: runner.os == 'Linux' | |
run: docker ps | |
- name: Run tests on Linux/MacOS | |
if: runner.os != 'Windows' | |
continue-on-error: true | |
run: | | |
cd GUI_Web_Basic/ | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
mvn test -DexecutionAddress="localhost:4444" -DtargetOperatingSystem="Linux" -DmaximumPerformanceMode="2" -DtargetBrowserName="GoogleChrome" -DgenerateAllureReportArchive="true" | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
mvn test -DexecutionAddress="browserstack" -DtargetOperatingSystem="Mac" -DmaximumPerformanceMode="1" -DtargetBrowserName="Safari" "-DbrowserStack.os=OS X" "-DbrowserStack.osVersion=Monterey" "-DbrowserStack.browserVersion=15.3" -DgenerateAllureReportArchive="true" | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
- name: Run tests on Windows | |
if: runner.os == 'Windows' | |
continue-on-error: true | |
run: | | |
cd GUI_Web_Basic/ | |
mvn test -DexecutionAddress="local" -DtargetOperatingSystem="Windows" -DmaximumPerformanceMode="2" -DtargetBrowserName="MicrosoftEdge" -DgenerateAllureReportArchive="true" | |
- name: Upload Allure Report as Pipeline Artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} - Desktop Browsers Tests Allure Report | |
path: "GUI_Web_Basic/generatedReport_*.zip" | |
- name: Upload Extent Report as Pipeline Artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} - Desktop Browsers Tests Extent Report | |
path: "GUI_Web_Basic/extent-reports/ExtentReports_*.html" | |
GUI_Web_Cucumber: | |
name: Run GUI_Web_Cucumber Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04, windows-latest, macOS-12 ] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Set up Native Selenium Grid | |
if: runner.os == 'Linux' | |
run: docker-compose -f GUI_Web_Cucumber/src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: Check running containers | |
if: runner.os == 'Linux' | |
run: docker ps | |
- name: Run tests on Linux/MacOS | |
if: runner.os != 'Windows' | |
continue-on-error: true | |
run: | | |
cd GUI_Web_Cucumber/ | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
mvn test -DexecutionAddress="localhost:4444" -DtargetOperatingSystem="Linux" -DmaximumPerformanceMode="2" -DtargetBrowserName="GoogleChrome" -DgenerateAllureReportArchive="true" | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
mvn test -DexecutionAddress="browserstack" -DtargetOperatingSystem="Mac" -DmaximumPerformanceMode="1" -DtargetBrowserName="Safari" "-DbrowserStack.os=OS X" "-DbrowserStack.osVersion=Monterey" "-DbrowserStack.browserVersion=15.3" -DgenerateAllureReportArchive="true" | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
- name: Run tests on Windows | |
if: runner.os == 'Windows' | |
continue-on-error: true | |
run: | | |
cd GUI_Web_Cucumber/ | |
mvn test -DexecutionAddress="local" -DtargetOperatingSystem="Windows" -DmaximumPerformanceMode="2" -DtargetBrowserName="MicrosoftEdge" -DgenerateAllureReportArchive="true" | |
- name: Upload Allure Report as Pipeline Artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} - Desktop Browsers Tests Allure Report | |
path: "GUI_Web_Cucumber/generatedReport_*.zip" | |
- name: Upload Extent Report as Pipeline Artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} - Desktop Browsers Tests Extent Report | |
path: "GUI_Web_Cucumber/extent-reports/ExtentReports_*.html" |