|
| 1 | +name: Windows webdriver TESTAR CI tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + pull_request: |
| 7 | + branches: [ master ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + windows: |
| 11 | + runs-on: windows-latest |
| 12 | + timeout-minutes: 10 |
| 13 | + |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + java: [ '11', '17', '21' ] |
| 18 | + |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + - name: Set up Java ${{ matrix.java }} |
| 22 | + uses: actions/setup-java@v4 |
| 23 | + with: |
| 24 | + distribution: 'corretto' |
| 25 | + java-version: ${{ matrix.java }} |
| 26 | + |
| 27 | + - name: Grant execute permission for gradlew |
| 28 | + run: chmod +x gradlew |
| 29 | + |
| 30 | + - name: Prepare TESTAR protocols |
| 31 | + run: ./gradlew init_workflow_test |
| 32 | + |
| 33 | + - name: Build TESTAR with Gradle |
| 34 | + run: ./gradlew build |
| 35 | + |
| 36 | + - name: Prepare installed distribution of TESTAR with Gradle |
| 37 | + run: ./gradlew installDist |
| 38 | + |
| 39 | + - name: Run webdriver protocol and detect SuspiciousTag while using the State Model |
| 40 | + run: ./gradlew runTestWebdriverSuspiciousTagStateModel |
| 41 | + - name: Save runTestWebdriverSuspiciousTagStateModel HTML report artifact |
| 42 | + uses: actions/upload-artifact@v4 |
| 43 | + # Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()') |
| 44 | + if: failure() |
| 45 | + with: |
| 46 | + name: Java${{ matrix.java }}-runTestWebdriverSuspiciousTagStateModel-artifact |
| 47 | + path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_and_suspicious |
| 48 | + |
| 49 | + - name: Run webdriver to login in parabank and detect browser console error |
| 50 | + run: ./gradlew runTestWebdriverParabankLoginAndConsoleError |
| 51 | + - name: Save runTestWebdriverParabankLoginAndConsoleError HTML report artifact |
| 52 | + uses: actions/upload-artifact@v4 |
| 53 | + # Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()') |
| 54 | + if: failure() |
| 55 | + with: |
| 56 | + name: Java${{ matrix.java }}-runTestWebdriverParabankLoginAndConsoleError-artifact |
| 57 | + path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_login_console_error |
| 58 | + |
| 59 | + - name: Run webdriver to login in parabank using form filling |
| 60 | + run: ./gradlew runTestWebdriverParabankFormFilling |
| 61 | + - name: Save runTestWebdriverParabankFormFilling HTML report artifact |
| 62 | + uses: actions/upload-artifact@v4 |
| 63 | + # Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()') |
| 64 | + if: failure() |
| 65 | + with: |
| 66 | + name: Java${{ matrix.java }}-runTestWebdriverParabankFormFilling-artifact |
| 67 | + path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_form_filling |
| 68 | + |
| 69 | + - name: Run webdriver to login in parabank and execute webdriver remote actions |
| 70 | + run: ./gradlew runTestWebdriverParabankRemoteActions |
| 71 | + - name: Save runTestWebdriverParabankRemoteActions HTML report artifact |
| 72 | + uses: actions/upload-artifact@v4 |
| 73 | + # Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()') |
| 74 | + if: failure() |
| 75 | + with: |
| 76 | + name: Java${{ matrix.java }}-runTestWebdriverParabankRemoteActions-artifact |
| 77 | + path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_remote_actions |
| 78 | + |
| 79 | + - name: Run TESTAR Replay mode with a web page to check that replayed correctly |
| 80 | + run: ./gradlew runTestWebdriverCorrectReplay |
| 81 | + - name: Save runTestWebdriverCorrectReplay HTML report artifact |
| 82 | + uses: actions/upload-artifact@v4 |
| 83 | + # Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()') |
| 84 | + if: failure() |
| 85 | + with: |
| 86 | + name: Java${{ matrix.java }}-runTestWebdriverCorrectReplay-artifact |
| 87 | + path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_replay |
| 88 | + |
| 89 | + - name: Run TESTAR Replay mode to detect a not replayable button |
| 90 | + run: ./gradlew runTestWebdriverUnreplayable |
| 91 | + - name: Save runTestWebdriverUnreplayable HTML report artifact |
| 92 | + uses: actions/upload-artifact@v4 |
| 93 | + # Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()') |
| 94 | + if: failure() |
| 95 | + with: |
| 96 | + name: Java${{ matrix.java }}-runTestWebdriverUnreplayable-artifact |
| 97 | + path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_unreplayable |
| 98 | + |
| 99 | + - name: Check Firefox and Edge browsers paths |
| 100 | + run: | |
| 101 | + if (Test-Path "C:\Program Files\Mozilla Firefox\firefox.exe") { |
| 102 | + Write-Output "Firefox browser found!" |
| 103 | + } else { |
| 104 | + Write-Output "Firefox browser not found..." |
| 105 | + } |
| 106 | + if (Test-Path "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe") { |
| 107 | + Write-Output "Edge browser found!" |
| 108 | + } else { |
| 109 | + Write-Output "Edge browser not found..." |
| 110 | + } |
| 111 | + shell: pwsh |
| 112 | + |
| 113 | + - name: Run firefox and webdriver to detect a suspicious message |
| 114 | + run: ./gradlew runTestFirefoxWebdriverSuspiciousTagStateModel |
| 115 | + - name: Save runTestFirefoxWebdriverSuspiciousTagStateModel HTML report artifact |
| 116 | + uses: actions/upload-artifact@v4 |
| 117 | + # Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()') |
| 118 | + if: failure() |
| 119 | + with: |
| 120 | + name: Java${{ matrix.java }}-runTestFirefoxWebdriverSuspiciousTagStateModel-artifact |
| 121 | + path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/firefox_webdriver_suspicious_state_model |
| 122 | + |
| 123 | + - name: Run edge and webdriver to detect a suspicious message |
| 124 | + run: ./gradlew runTestEdgeWebdriverSuspiciousTagStateModel |
| 125 | + - name: Save runTestEdgeWebdriverSuspiciousTagStateModel HTML report artifact |
| 126 | + uses: actions/upload-artifact@v4 |
| 127 | + # Only upload GitHub Actions results if this task fails (Can be replaced with 'if: always()') |
| 128 | + if: failure() |
| 129 | + with: |
| 130 | + name: Java${{ matrix.java }}-runTestEdgeWebdriverSuspiciousTagStateModel-artifact |
| 131 | + path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/edge_webdriver_suspicious_state_model |
0 commit comments