From 50f68ea6692e2d9edbe09482032ae603e20eb87f Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Fri, 1 Mar 2024 12:25:42 +0100 Subject: [PATCH 01/75] github actions initial commit --- .github/workflows/github-actions.yml | 288 +++++++++++++++++++++++++++ 1 file changed, 288 insertions(+) create mode 100644 .github/workflows/github-actions.yml diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml new file mode 100644 index 000000000..8a735ce29 --- /dev/null +++ b/.github/workflows/github-actions.yml @@ -0,0 +1,288 @@ +on: + push: + branches: + - '*' + paths-ignore: + - README.md + tags: + - '*' + schedule: + - cron: '0 18 * * 0' +env: + solution: './Ocaramba.sln' + buildPlatform: Any CPU + buildConfiguration: Release + frameworkVersion: 4.0.0 + BuildVersion: ${{ env.frameworkVersion }}${{ github.run_number }} + seleniumGridVersion: selenium-server-4.8.0.jar + seleniumGridUrl: https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.8.0/selenium-server-4.8.0.jar + NUGET_PACKAGES: ${{ env.Pipeline.Workspace }}/.nuget/packages +jobs: + build_Stage_BuildTestsOnWindows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: microsoft/setup-msbuild@v1.0.2 + - shell: powershell + run: | + $tags = git tag --sort=-creatordate + $tag = $tags[0] + Write-Host "##vso[task.setvariable variable=frameworkVersion]$tag" + if: startsWith(github.ref, 'refs/tags/') + - shell: powershell + run: '(Get-Content ''Ocaramba.sln'' -raw) -replace [regex](''.*?'' + ''Documentation'' + (''.*?\r\n'' * (5 + 1))) | set-content ''Ocaramba.sln''' + - uses: nuget/setup-nuget@v1 + - name: Cache + uses: actions/cache@v3 + with: + key: nuget | "${{ runner.os }}" | **/packages.lock.json,!**/bin/**,!**/obj/** + restore-keys: + nuget | "${{ runner.os }}" + nuget + path: ${{ env.NUGET_PACKAGES }} + - name: NuGet restore + run: nuget restore ${{ env.solution }} + - name: Set project versions + id: update + uses: vers-one/dotnet-project-version-updater@v1.4 + with: + file: | + "**/*.csproj" + version: ${{ env.frameworkVersion }} + - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' /v:minimal + - uses: actions/upload-artifact@v2 + with: + path: ./Ocaramba/bin/Release/Ocaramba.${{ env.frameworkVersion }}.nupkg + - uses: actions/upload-artifact@v2 + with: + path: ./Ocaramba/bin/Release/Ocaramba.${{ env.frameworkVersion }}.snupkg + - uses: actions/upload-artifact@v2 + with: + path: ./OcarambaLite/bin/Release/OcarambaLite.${{ env.frameworkVersion }}.nupkg + - uses: actions/upload-artifact@v2 + with: + path: ./OcarambaLite/bin/Release/OcarambaLite.${{ env.frameworkVersion }}.snupkg + - uses: actions/upload-artifact@v2 + with: + path: ${{ env.Pipeline.Workspace }} + if: (${{ job.status }} != 'cancelled') + test_Stage_RunTestsOnDocker: + runs-on: ubuntu-latest + needs: + - build_Stage_BuildTestsOnWindows + steps: + - uses: actions/checkout@v2 + - run: | + docker build --file Dockerfile docker ocaramba/selenium --tags latest + docker push --file Dockerfile docker ocaramba/selenium --tags latest + docker-compose -f "./docker-compose.yml" up -d + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() + with: + report_paths: '**/Ocaramba.Tests.*.xml' + test_Stage_RunTestsOnLinux: + runs-on: ubuntu-latest + needs: + - build_Stage_BuildTestsOnWindows + steps: + - uses: actions/checkout@v2 + - run: | + ls + export ASPNETCORE_ENVIRONMENT=Linux + echo $ASPNETCORE_ENVIRONMENT + sudo apt-get install google-chrome-stable + sed -i '/Documentation/,+5 d' ./Ocaramba.sln + - run: dotnet build ./Ocaramba.sln --configuration ${{ env.buildConfiguration }} + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() + with: + report_paths: '**/Ocaramba.Tests.*.xml' + test_Stage_RunTestsOnLinuxBrowserStack: + runs-on: ubuntu-latest + timeout-minutes: 10 + needs: + - build_Stage_BuildTestsOnWindows + steps: + - uses: actions/checkout@v2 + - run: | + ls + export ASPNETCORE_ENVIRONMENT=Linux + echo $ASPNETCORE_ENVIRONMENT + sed -i '/Documentation/,+5 d' ./Ocaramba.sln + - shell: pwsh + run: dotnet build ./Ocaramba.sln --configuration ${{ env.buildConfiguration }} + env: + MAPPED_ENV_BROWSERSTACKKEY: ${{ env.browserstackkey }} + MAPPED_ENV_BROWSERSTACKUSER: ${{ env.browserstackuser }} + MAPPED_ENV_TESTINGBOTKEY: ${{ env.testingbotkey }} + MAPPED_ENV_TESTINGBOTSECRET: ${{ env.testingbotsecret }} + MAPPED_ENV_SAUCELABSACCESSKEY: ${{ env.saucelabsaccessKey }} + MAPPED_ENV_SAUCELABSUSERNAME: ${{ env.saucelabsusername }} + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() + with: + report_paths: '**/Ocaramba.Tests.*.xml' + test_Stage_RunTestsOnWindowsCore1: + runs-on: windows-latest + needs: + - build_Stage_BuildTestsOnWindows + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: none + run: dotnet add package Microsoft.TestPlatform + - uses: actions/download-artifact@v2 + - shell: powershell + run: Get-ChildItem .\ -Recurse + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() + with: + report_paths: '**/Ocaramba.Tests.*.trx' + - uses: actions/upload-artifact@v2 + with: + path: ${{ env.Pipeline.Workspace }}/TestResults + if: (${{ job.status }} != 'cancelled') + - uses: montudor/action-zip@v0.1.0 + with: + args: zip -r ${{ github.workspace }}/ExtentReports_${{ github.run_id }}.zip ${{ github.workspace }}/Ocaramba.Tests.NUnitExtentReports/bin/Release/net6.0/TestOutput + if: always() + - uses: actions/upload-artifact@v2 + with: + path: ${{ github.workspace }}/ExtentReports_${{ github.run_id }}.zip + name: ExtentTestReport + if: always() + test_Stage_RunTestsOnWindowsCore2: + runs-on: windows-latest + needs: + - build_Stage_BuildTestsOnWindows + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: none + - run: dotnet add package Microsoft.TestPlatform + - uses: actions/download-artifact@v2 + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() + with: + report_paths: '**/Ocaramba.Tests.*.xml' + test_Stage_RunTestsOnWindowsFramework: + runs-on: windows-latest + needs: + - build_Stage_BuildTestsOnWindows + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: none + - run: dotnet add package Microsoft.TestPlatform + - uses: actions/download-artifact@v2 + - shell: powershell + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() + with: + report_paths: '**/Ocaramba.Tests.*.xml' + test_Stage_RunTestsOnWindowsBrowserStack: + runs-on: windows-latest + needs: + - build_Stage_BuildTestsOnWindows + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: none + - shell: powershell + run: dotnet add package Microsoft.TestPlatform + env: + MAPPED_ENV_BROWSERSTACKKEY: ${{ env.browserstackkey }} + MAPPED_ENV_BROWSERSTACKUSER: ${{ env.browserstackuser }} + MAPPED_ENV_TESTINGBOTKEY: ${{ env.testingbotkey }} + MAPPED_ENV_TESTINGBOTSECRET: ${{ env.testingbotsecret }} + MAPPED_ENV_SAUCELABSACCESSKEY: ${{ env.saucelabsaccessKey }} + MAPPED_ENV_SAUCELABSUSERNAME: ${{ env.saucelabsusername }} + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() + with: + report_paths: '**/Ocaramba.Tests.*.xml' + test_Stage_RunTestsSeleniumGrid: + runs-on: windows-latest + needs: + - build_Stage_BuildTestsOnWindows + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: none + - run: dotnet add package Microsoft.TestPlatform + - uses: actions/download-artifact@v2 + - shell: powershell + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() + with: + report_paths: '**/Ocaramba.Tests.*.xml' + test_Stage_RunTestsOnWindowsSaucelabs: + runs-on: windows-latest + needs: + - build_Stage_BuildTestsOnWindows + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: none + - run: dotnet add package Microsoft.TestPlatform + - uses: actions/download-artifact@v2 + - shell: powershell + env: + MAPPED_ENV_BROWSERSTACKKEY: ${{ env.browserstackkey }} + MAPPED_ENV_BROWSERSTACKUSER: ${{ env.browserstackuser }} + MAPPED_ENV_TESTINGBOTKEY: ${{ env.testingbotkey }} + MAPPED_ENV_TESTINGBOTSECRET: ${{ env.testingbotsecret }} + MAPPED_ENV_SAUCELABSACCESSKEY: ${{ env.saucelabsaccessKey }} + MAPPED_ENV_SAUCELABSUSERNAME: ${{ env.saucelabsusername }} + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() + with: + report_paths: '**/Ocaramba.Tests.*.xml' + release_Stage_PublishNuget: + runs-on: windows-latest + needs: + - build_Stage_BuildTestsOnWindows + - test_Stage_RunTestsOnDocker + - test_Stage_RunTestsOnLinux + - test_Stage_RunTestsOnLinuxBrowserStack + - test_Stage_RunTestsOnWindowsCore1 + - test_Stage_RunTestsOnWindowsCore2 + - test_Stage_RunTestsOnWindowsFramework + - test_Stage_RunTestsOnWindowsBrowserStack + - test_Stage_RunTestsSeleniumGrid + - test_Stage_RunTestsOnWindowsSaucelabs + steps: + - uses: actions/checkout@v2 + - run: | + $tags = git tag --sort=-creatordate + $tag = $tags[0] + Write-Host "##vso[task.setvariable variable=frameworkVersion]$tag" + shell: powershell + if: startsWith(github.ref, 'refs/tags/') + - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v2 + - shell: powershell + run: Get-ChildItem -Path ${{ env.Agent.BuildDirectory }} -Recurse + - name: Push Nuget Package + run: dotnet custom push ${{ env.Agent.BuildDirectory }}\Ocaramba.${{ env.frameworkVersion }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ env.NuGetApiKey }} + if: (success() && startsWith(github.ref, 'refs/tags/')) + - name: Push Nuget Package + run: dotnet custom push ${{ env.Agent.BuildDirectory }}\OcarambaLite.${{ env.frameworkVersion }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ env.NuGetApiKey }} + if: (success() && startsWith(github.ref, 'refs/tags/')) \ No newline at end of file From 9ae79aabb2aab1accb804e5d153a0626266eb5be Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Fri, 1 Mar 2024 12:28:35 +0100 Subject: [PATCH 02/75] fixing typo in run --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 8a735ce29..437934d75 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -134,7 +134,7 @@ jobs: - uses: actions/checkout@v2 with: repository: none - run: dotnet add package Microsoft.TestPlatform + - run: dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 - shell: powershell run: Get-ChildItem .\ -Recurse From 677a1618ba88e5d4c286366cb4468730310bcd6e Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Fri, 1 Mar 2024 12:34:55 +0100 Subject: [PATCH 03/75] fixing typo in runs --- .github/workflows/github-actions.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 437934d75..d7c6ca9de 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -184,6 +184,7 @@ jobs: - run: dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 - shell: powershell + run: ./ExecutingTestsOnWindowsAzure3.ps1 - name: Publish Test Report uses: mikepenz/action-junit-report@v4 if: success() || failure() @@ -224,6 +225,7 @@ jobs: - run: dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 - shell: powershell + run: ./ExecutingTestsOnWindowsAzure5.ps1 - name: Publish Test Report uses: mikepenz/action-junit-report@v4 if: success() || failure() @@ -241,6 +243,7 @@ jobs: - run: dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 - shell: powershell + run: ./ExecutingTestsOnWindowsAzure6.ps1 env: MAPPED_ENV_BROWSERSTACKKEY: ${{ env.browserstackkey }} MAPPED_ENV_BROWSERSTACKUSER: ${{ env.browserstackuser }} @@ -268,11 +271,11 @@ jobs: - test_Stage_RunTestsOnWindowsSaucelabs steps: - uses: actions/checkout@v2 - - run: | + - shell: powershell + run: | $tags = git tag --sort=-creatordate $tag = $tags[0] Write-Host "##vso[task.setvariable variable=frameworkVersion]$tag" - shell: powershell if: startsWith(github.ref, 'refs/tags/') - uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2 From 7f6ca1334d47ca864b4c7a817f276a1bc670d812 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 19:23:44 +0100 Subject: [PATCH 04/75] fixing envs --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index d7c6ca9de..45108dbe4 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -13,10 +13,10 @@ env: buildPlatform: Any CPU buildConfiguration: Release frameworkVersion: 4.0.0 - BuildVersion: ${{ env.frameworkVersion }}${{ github.run_number }} + BuildVersion: 4.0.0${{ github.run_number }} seleniumGridVersion: selenium-server-4.8.0.jar seleniumGridUrl: https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.8.0/selenium-server-4.8.0.jar - NUGET_PACKAGES: ${{ env.Pipeline.Workspace }}/.nuget/packages + NUGET_PACKAGES: ./.nuget/packages jobs: build_Stage_BuildTestsOnWindows: runs-on: windows-latest From 64258c4eaec151c055d468fb781c2a9bd5641185 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 19:39:55 +0100 Subject: [PATCH 05/75] fixing nuget absolute path --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 45108dbe4..59bba28fa 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -16,7 +16,7 @@ env: BuildVersion: 4.0.0${{ github.run_number }} seleniumGridVersion: selenium-server-4.8.0.jar seleniumGridUrl: https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.8.0/selenium-server-4.8.0.jar - NUGET_PACKAGES: ./.nuget/packages + NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages jobs: build_Stage_BuildTestsOnWindows: runs-on: windows-latest From bd6d8e06fc6b99847d994d25db8d2f3914e9a9a3 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 19:53:22 +0100 Subject: [PATCH 06/75] fixing nuget absolute path --- .github/workflows/github-actions.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 59bba28fa..c462e97d9 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -35,11 +35,10 @@ jobs: - name: Cache uses: actions/cache@v3 with: - key: nuget | "${{ runner.os }}" | **/packages.lock.json,!**/bin/**,!**/obj/** - restore-keys: - nuget | "${{ runner.os }}" - nuget - path: ${{ env.NUGET_PACKAGES }} + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- - name: NuGet restore run: nuget restore ${{ env.solution }} - name: Set project versions From f235f4351aad6d78ce24c87ccb8925286fda9baf Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 20:17:43 +0100 Subject: [PATCH 07/75] fixing nuget absolute path --- .github/workflows/github-actions.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index c462e97d9..748903a61 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -35,10 +35,12 @@ jobs: - name: Cache uses: actions/cache@v3 with: - path: ~/.nuget/packages + path: | + ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} restore-keys: | - ${{ runner.os }}-nuget- + nuget | "${{ runner.os }}" + nuget - name: NuGet restore run: nuget restore ${{ env.solution }} - name: Set project versions From a9e1c05d8f49b153b1c92eb255db4e2c49c0d15f Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 20:30:42 +0100 Subject: [PATCH 08/75] fixing nuget absolute path --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 748903a61..ff58107de 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -9,7 +9,7 @@ on: schedule: - cron: '0 18 * * 0' env: - solution: './Ocaramba.sln' + solution: $(Pipeline.Workspace)/Ocaramba.sln buildPlatform: Any CPU buildConfiguration: Release frameworkVersion: 4.0.0 @@ -37,7 +37,7 @@ jobs: with: path: | ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + key: ${{ runner.os }}|nuget|${{ hashFiles('**/packages.lock.json') }} restore-keys: | nuget | "${{ runner.os }}" nuget From 897df889f3346c71702a37f8efe91a6dfa0de0cb Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 20:42:14 +0100 Subject: [PATCH 09/75] fixing nuget absolute path --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index ff58107de..cfb83fe21 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -9,14 +9,14 @@ on: schedule: - cron: '0 18 * * 0' env: - solution: $(Pipeline.Workspace)/Ocaramba.sln + solution: ${{ github.workspace }}/Ocaramba.sln buildPlatform: Any CPU buildConfiguration: Release frameworkVersion: 4.0.0 BuildVersion: 4.0.0${{ github.run_number }} seleniumGridVersion: selenium-server-4.8.0.jar seleniumGridUrl: https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.8.0/selenium-server-4.8.0.jar - NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages jobs: build_Stage_BuildTestsOnWindows: runs-on: windows-latest From 7fde1bccb9c27743134624209213cc48ae66c467 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 21:22:52 +0100 Subject: [PATCH 10/75] fixing nuget absolute path --- .github/workflows/github-actions.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index cfb83fe21..37586183d 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -35,9 +35,8 @@ jobs: - name: Cache uses: actions/cache@v3 with: - path: | - ~/.nuget/packages - key: ${{ runner.os }}|nuget|${{ hashFiles('**/packages.lock.json') }} + path: ${{ env.NUGET_PACKAGES }} + key: ${{ runner.os }}|nuget|../packages.lock.json' restore-keys: | nuget | "${{ runner.os }}" nuget From c3f40acc08593b50e38703f97009639db2ff0bb9 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 21:55:37 +0100 Subject: [PATCH 11/75] fixing nuget absolute path --- .github/workflows/github-actions.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 37586183d..7d7625fcc 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -31,12 +31,14 @@ jobs: if: startsWith(github.ref, 'refs/tags/') - shell: powershell run: '(Get-Content ''Ocaramba.sln'' -raw) -replace [regex](''.*?'' + ''Documentation'' + (''.*?\r\n'' * (5 + 1))) | set-content ''Ocaramba.sln''' - - uses: nuget/setup-nuget@v1 + - uses: nuget/setup-nuget@v2 + with: + nuget-version: latest - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: - path: ${{ env.NUGET_PACKAGES }} - key: ${{ runner.os }}|nuget|../packages.lock.json' + path: ~/.nuget/packages + key: ${{ runner.os }}|nuget|${{ hashFiles('**/packages.lock.json') }} restore-keys: | nuget | "${{ runner.os }}" nuget From 78f81caa2312677c491cc18e12306b02a8f76180 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 22:09:11 +0100 Subject: [PATCH 12/75] fixing nuget absolute path --- .github/workflows/github-actions.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 7d7625fcc..61d33998c 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -31,9 +31,10 @@ jobs: if: startsWith(github.ref, 'refs/tags/') - shell: powershell run: '(Get-Content ''Ocaramba.sln'' -raw) -replace [regex](''.*?'' + ''Documentation'' + (''.*?\r\n'' * (5 + 1))) | set-content ''Ocaramba.sln''' - - uses: nuget/setup-nuget@v2 - with: - nuget-version: latest + - name: Setup nuget + uses: nuget/setup-nuget@v2 + with: + nuget-version: latest - name: Cache uses: actions/cache@v4 with: From 9065b76530f6b2a14493c69832f28ce3cd97c40b Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 22:44:36 +0100 Subject: [PATCH 13/75] updating explicit csproj --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 61d33998c..782eaaaef 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -50,7 +50,7 @@ jobs: uses: vers-one/dotnet-project-version-updater@v1.4 with: file: | - "**/*.csproj" + "${{ github.workspace }}/Ocaramba/Ocaramba.csproj" version: ${{ env.frameworkVersion }} - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' /v:minimal - uses: actions/upload-artifact@v2 From d1dbbe40e13a444984da98dfc155e8166ab874c8 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 2 Mar 2024 22:47:36 +0100 Subject: [PATCH 14/75] updating explicit csproj --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 782eaaaef..a49478fcc 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -50,7 +50,7 @@ jobs: uses: vers-one/dotnet-project-version-updater@v1.4 with: file: | - "${{ github.workspace }}/Ocaramba/Ocaramba.csproj" + "**/Ocaramba.csproj" version: ${{ env.frameworkVersion }} - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' /v:minimal - uses: actions/upload-artifact@v2 From 0ef58fceebaf9bf5f686cfee940236c431d66004 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sun, 3 Mar 2024 18:25:22 +0100 Subject: [PATCH 15/75] fixing csprojs --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index a49478fcc..d169303ef 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -50,7 +50,7 @@ jobs: uses: vers-one/dotnet-project-version-updater@v1.4 with: file: | - "**/Ocaramba.csproj" + "**/Ocaramba.csproj", "**/Ocaramba.Tests.Features.csproj", "**/Ocaramba.Tests.MsTest.csproj", "**/Ocaramba.Tests.NUnitExtentReports.csproj", "**/Ocaramba.Tests.NUnit.csproj", "**/Ocaramba.Tests.PageObjects.csproj", "**/Ocaramba.Tests.Xunit.csproj", "**/Ocaramba.UnitTests.csproj", "**/OcarambaLite.csproj" version: ${{ env.frameworkVersion }} - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' /v:minimal - uses: actions/upload-artifact@v2 From a964f9322a4b484cd4538224b83cd00db754e2be Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sun, 3 Mar 2024 18:35:28 +0100 Subject: [PATCH 16/75] fixing csprojs --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index d169303ef..34004f739 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -50,7 +50,7 @@ jobs: uses: vers-one/dotnet-project-version-updater@v1.4 with: file: | - "**/Ocaramba.csproj", "**/Ocaramba.Tests.Features.csproj", "**/Ocaramba.Tests.MsTest.csproj", "**/Ocaramba.Tests.NUnitExtentReports.csproj", "**/Ocaramba.Tests.NUnit.csproj", "**/Ocaramba.Tests.PageObjects.csproj", "**/Ocaramba.Tests.Xunit.csproj", "**/Ocaramba.UnitTests.csproj", "**/OcarambaLite.csproj" + "**/Ocaramba.csproj", "**/Ocaramba.Tests.MsTest.csproj", "**/Ocaramba.Tests.NUnitExtentReports.csproj", "**/Ocaramba.Tests.NUnit.csproj", "**/Ocaramba.Tests.PageObjects.csproj", "**/Ocaramba.Tests.Xunit.csproj", "**/Ocaramba.UnitTests.csproj", "**/OcarambaLite.csproj" version: ${{ env.frameworkVersion }} - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' /v:minimal - uses: actions/upload-artifact@v2 From 8b24d5c77ce0d1d85bbcdec4c34fd1807decf1d3 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sun, 3 Mar 2024 18:40:33 +0100 Subject: [PATCH 17/75] fixing csprojs --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 34004f739..7a985d1a8 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -50,7 +50,7 @@ jobs: uses: vers-one/dotnet-project-version-updater@v1.4 with: file: | - "**/Ocaramba.csproj", "**/Ocaramba.Tests.MsTest.csproj", "**/Ocaramba.Tests.NUnitExtentReports.csproj", "**/Ocaramba.Tests.NUnit.csproj", "**/Ocaramba.Tests.PageObjects.csproj", "**/Ocaramba.Tests.Xunit.csproj", "**/Ocaramba.UnitTests.csproj", "**/OcarambaLite.csproj" + "**/Ocaramba.csproj", "**/Ocaramba.Tests.NUnitExtentReports.csproj", "**/Ocaramba.Tests.NUnit.csproj", "**/Ocaramba.Tests.PageObjects.csproj", "**/Ocaramba.Tests.Xunit.csproj", "**/Ocaramba.UnitTests.csproj", "**/OcarambaLite.csproj" version: ${{ env.frameworkVersion }} - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' /v:minimal - uses: actions/upload-artifact@v2 From 1e6703edbe81ef5391b04473c42532216a57f255 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sun, 3 Mar 2024 18:43:32 +0100 Subject: [PATCH 18/75] fixing csprojs --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 7a985d1a8..5b5e417c8 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -50,7 +50,7 @@ jobs: uses: vers-one/dotnet-project-version-updater@v1.4 with: file: | - "**/Ocaramba.csproj", "**/Ocaramba.Tests.NUnitExtentReports.csproj", "**/Ocaramba.Tests.NUnit.csproj", "**/Ocaramba.Tests.PageObjects.csproj", "**/Ocaramba.Tests.Xunit.csproj", "**/Ocaramba.UnitTests.csproj", "**/OcarambaLite.csproj" + "**/Ocaramba.csproj", "**/OcarambaLite.csproj" version: ${{ env.frameworkVersion }} - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' /v:minimal - uses: actions/upload-artifact@v2 From 5d34959b782427ef40f7be360a09892e66a92512 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sun, 3 Mar 2024 19:13:31 +0100 Subject: [PATCH 19/75] fixing uploading artifacts --- .github/workflows/github-actions.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5b5e417c8..e9a995d50 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -56,18 +56,23 @@ jobs: - uses: actions/upload-artifact@v2 with: path: ./Ocaramba/bin/Release/Ocaramba.${{ env.frameworkVersion }}.nupkg + name: Ocaramba${{ env.frameworkVersion }} - uses: actions/upload-artifact@v2 with: path: ./Ocaramba/bin/Release/Ocaramba.${{ env.frameworkVersion }}.snupkg + name: OcarambaS${{ env.frameworkVersion }} - uses: actions/upload-artifact@v2 with: path: ./OcarambaLite/bin/Release/OcarambaLite.${{ env.frameworkVersion }}.nupkg + name: OcarambaLite${{ env.frameworkVersion }} - uses: actions/upload-artifact@v2 with: path: ./OcarambaLite/bin/Release/OcarambaLite.${{ env.frameworkVersion }}.snupkg + name: OcarambaLiteS${{ env.frameworkVersion }} - uses: actions/upload-artifact@v2 with: - path: ${{ env.Pipeline.Workspace }} + path: ./ + name: OcarambaBuild if: (${{ job.status }} != 'cancelled') test_Stage_RunTestsOnDocker: runs-on: ubuntu-latest From 8fc3cf82247ac091054e669a752d1ae0f8e824ac Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sun, 3 Mar 2024 20:05:59 +0100 Subject: [PATCH 20/75] fixing duplicates --- .github/workflows/github-actions.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index e9a995d50..7ff76c58c 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -139,9 +139,6 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - uses: actions/checkout@v2 - with: - repository: none - run: dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 - shell: powershell @@ -170,9 +167,6 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - uses: actions/checkout@v2 - with: - repository: none - run: dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 - name: Publish Test Report @@ -186,9 +180,6 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - uses: actions/checkout@v2 - with: - repository: none - run: dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 - shell: powershell @@ -203,7 +194,6 @@ jobs: needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 - uses: actions/checkout@v2 with: repository: none @@ -227,9 +217,6 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - uses: actions/checkout@v2 - with: - repository: none - run: dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 - shell: powershell @@ -244,7 +231,6 @@ jobs: needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 - uses: actions/checkout@v2 with: repository: none From 33b0fb07ed1c90aa239e5e61898af169a84f71c6 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sun, 3 Mar 2024 22:08:31 +0100 Subject: [PATCH 21/75] removing uploading whole build --- .github/workflows/github-actions.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 7ff76c58c..bcb7131f1 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -69,11 +69,6 @@ jobs: with: path: ./OcarambaLite/bin/Release/OcarambaLite.${{ env.frameworkVersion }}.snupkg name: OcarambaLiteS${{ env.frameworkVersion }} - - uses: actions/upload-artifact@v2 - with: - path: ./ - name: OcarambaBuild - if: (${{ job.status }} != 'cancelled') test_Stage_RunTestsOnDocker: runs-on: ubuntu-latest needs: From 205fb093741c30c56a38a941adf86420151423c9 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 4 Mar 2024 09:22:52 +0100 Subject: [PATCH 22/75] reverting not uploading build, changes to running tests on core --- .github/workflows/github-actions.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index bcb7131f1..e5841e38a 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -69,6 +69,12 @@ jobs: with: path: ./OcarambaLite/bin/Release/OcarambaLite.${{ env.frameworkVersion }}.snupkg name: OcarambaLiteS${{ env.frameworkVersion }} + - uses: actions/upload-artifact@v2 + with: + path: ./ + name: OcarambaBuild + compression-level: 0 + if: (${{ job.status }} != 'cancelled') test_Stage_RunTestsOnDocker: runs-on: ubuntu-latest needs: @@ -134,10 +140,14 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: dotnet add package Microsoft.TestPlatform + - run: Get-Project Ocaramba.Tests.Angular,Ocaramba.Tests.NUnit,Ocaramba.Tests.NUnitExtentReports | dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 + with: + name: OcarambaBuild - shell: powershell - run: Get-ChildItem .\ -Recurse + run: | + Get-ChildItem .\ -Recurse + ./ExecutingTestsOnWindowsAzure1.ps1 - name: Publish Test Report uses: mikepenz/action-junit-report@v4 if: success() || failure() From 66a956dd927144dadf3e6ff453c0d0ca676050b2 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 4 Mar 2024 13:57:50 +0100 Subject: [PATCH 23/75] zipping build and extraction --- .github/workflows/github-actions.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index e5841e38a..11a0222bb 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -69,9 +69,11 @@ jobs: with: path: ./OcarambaLite/bin/Release/OcarambaLite.${{ env.frameworkVersion }}.snupkg name: OcarambaLiteS${{ env.frameworkVersion }} + - name: Zip artifact for deployment + run: Compress-Archive -Path folder/* -Destination OcarambaBuild.zip - uses: actions/upload-artifact@v2 with: - path: ./ + path: OcarambaBuild.zip name: OcarambaBuild compression-level: 0 if: (${{ job.status }} != 'cancelled') @@ -140,10 +142,19 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: Get-Project Ocaramba.Tests.Angular,Ocaramba.Tests.NUnit,Ocaramba.Tests.NUnitExtentReports | dotnet add package Microsoft.TestPlatform + - run: | + cd Ocaramba.Tests.Angular + dotnet add package Microsoft.TestPlatform + cd .. + cd Ocaramba.Tests.NUnit + dotnet add package Microsoft.TestPlatform + cd .. + cd Ocaramba.Tests.NUnitExtentReports + dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 with: name: OcarambaBuild + - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ - shell: powershell run: | Get-ChildItem .\ -Recurse From 7f3b8f0a7651e021be9ecf29db164eed0ace4e8f Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 4 Mar 2024 14:02:05 +0100 Subject: [PATCH 24/75] zip fix --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 11a0222bb..9485218e3 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -70,7 +70,7 @@ jobs: path: ./OcarambaLite/bin/Release/OcarambaLite.${{ env.frameworkVersion }}.snupkg name: OcarambaLiteS${{ env.frameworkVersion }} - name: Zip artifact for deployment - run: Compress-Archive -Path folder/* -Destination OcarambaBuild.zip + run: Compress-Archive -Path ./ -Destination OcarambaBuild.zip - uses: actions/upload-artifact@v2 with: path: OcarambaBuild.zip From 19b87a72027e0d508856008adb7285a563a9559c Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 4 Mar 2024 17:18:52 +0100 Subject: [PATCH 25/75] running tests fixes core 1 --- .github/workflows/github-actions.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 9485218e3..3092cf4bb 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -155,10 +155,8 @@ jobs: with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ - - shell: powershell - run: | - Get-ChildItem .\ -Recurse - ./ExecutingTestsOnWindowsAzure1.ps1 + - run: Get-ChildItem .\ -Recurse + - run: ./ExecutingTestsOnWindowsAzure1.ps1 - name: Publish Test Report uses: mikepenz/action-junit-report@v4 if: success() || failure() From 33f33f77dae612de0c67aab5151166f3ae614039 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 4 Mar 2024 17:54:38 +0100 Subject: [PATCH 26/75] ps modifications for github actions --- .github/workflows/github-actions.yml | 2 +- ExecutingTestsOnWindowsGithubActions1.ps1 | 26 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 ExecutingTestsOnWindowsGithubActions1.ps1 diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 3092cf4bb..31360aebb 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -156,7 +156,7 @@ jobs: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ - run: Get-ChildItem .\ -Recurse - - run: ./ExecutingTestsOnWindowsAzure1.ps1 + - run: ./ExecutingTestsOnWindowsGithubActions1.ps1 - name: Publish Test Report uses: mikepenz/action-junit-report@v4 if: success() || failure() diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 new file mode 100644 index 000000000..085e24a47 --- /dev/null +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -0,0 +1,26 @@ +echo '********************************************Executing tests********************************************' + +echo '********************************************net6.0 tests********************************************' + +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json + +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll ` + D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll ` + D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\Ocaramba.Tests.NUnitExtentReports.dll ` + /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel ` + --logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" + +echo '********************************************net472 tests********************************************' + +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues + +$vstest = (Resolve-Path "D:\a\_temp\VsTest\Microsoft.TestPlatform*\tools\net*\Common*\IDE\Extensions\TestPlatform\vstest.console.exe").ToString() +& $vstest .\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll --logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" +if($lastexitcode -ne 0) + { + echo 'lastexitcode' $lastexitcode + } + +exit 0 From 473e156cf014d1ff1460b68810cc0f796fb0af3b Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 4 Mar 2024 18:12:23 +0100 Subject: [PATCH 27/75] ps modifications for github actions --- .github/workflows/github-actions.yml | 3 +++ ExecutingTestsOnWindowsGithubActions1.ps1 | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 31360aebb..18afb80ec 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -151,6 +151,9 @@ jobs: cd .. cd Ocaramba.Tests.NUnitExtentReports dotnet add package Microsoft.TestPlatform + cd .. + cd Ocaramba.Tests.Features + dotnet add package Microsoft.TestPlatform - uses: actions/download-artifact@v2 with: name: OcarambaBuild diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 index 085e24a47..da0d1e621 100644 --- a/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -14,10 +14,10 @@ dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\n echo '********************************************net472 tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues $vstest = (Resolve-Path "D:\a\_temp\VsTest\Microsoft.TestPlatform*\tools\net*\Common*\IDE\Extensions\TestPlatform\vstest.console.exe").ToString() -& $vstest .\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll --logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" +& $vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll --logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" if($lastexitcode -ne 0) { echo 'lastexitcode' $lastexitcode From e3d1cf184501336c97236f053e33cce761196c3c Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 4 Mar 2024 21:41:53 +0100 Subject: [PATCH 28/75] ps modifications for github actions --- ExecutingTestsOnWindowsGithubActions1.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 index da0d1e621..b8c2bc1ac 100644 --- a/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -16,8 +16,7 @@ echo '********************************************net472 tests****************** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -$vstest = (Resolve-Path "D:\a\_temp\VsTest\Microsoft.TestPlatform*\tools\net*\Common*\IDE\Extensions\TestPlatform\vstest.console.exe").ToString() -& $vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll --logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll --logger "trx;LogFileName=Ocaramba.Tests.Features.trx" if($lastexitcode -ne 0) { echo 'lastexitcode' $lastexitcode From 947b7bcb3fa279813e39ee5341912e3d684ca578 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 4 Mar 2024 23:29:48 +0100 Subject: [PATCH 29/75] ps modifications for github actions --- .github/workflows/github-actions.yml | 14 +++++++++----- ExecutingTestsOnWindowsGithubActions1.ps1 | 8 ++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 18afb80ec..cce4bec83 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -145,26 +145,30 @@ jobs: - run: | cd Ocaramba.Tests.Angular dotnet add package Microsoft.TestPlatform + dotnet add package NUnit3TestAdapter --version 4.5.0 cd .. cd Ocaramba.Tests.NUnit dotnet add package Microsoft.TestPlatform + dotnet add package NUnit3TestAdapter --version 4.5.0 cd .. cd Ocaramba.Tests.NUnitExtentReports dotnet add package Microsoft.TestPlatform + dotnet add package NUnit3TestAdapter --version 4.5.0 cd .. cd Ocaramba.Tests.Features dotnet add package Microsoft.TestPlatform + dotnet add package NUnit3TestAdapter --version 4.5.0 - uses: actions/download-artifact@v2 with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ - - run: Get-ChildItem .\ -Recurse - run: ./ExecutingTestsOnWindowsGithubActions1.ps1 - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() + - run: Get-ChildItem .\ -Recurse + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/windows@v2 + if: always() with: - report_paths: '**/Ocaramba.Tests.*.trx' + files: Ocaramba.Tests.*.trx - uses: actions/upload-artifact@v2 with: path: ${{ env.Pipeline.Workspace }}/TestResults diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 index b8c2bc1ac..3397f27f9 100644 --- a/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -6,9 +6,9 @@ echo '********************************************net6.0 tests****************** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll ` - D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll ` - D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\Ocaramba.Tests.NUnitExtentReports.dll ` +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll ` + D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll ` + D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\Ocaramba.Tests.NUnitExtentReports.dll ` /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel ` --logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" @@ -22,4 +22,4 @@ if($lastexitcode -ne 0) echo 'lastexitcode' $lastexitcode } -exit 0 +exit 0 \ No newline at end of file From b8c6e67d3f88c6494dd5d056c8e15250ce60389f Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 4 Mar 2024 23:47:06 +0100 Subject: [PATCH 30/75] zip fix for core1 --- .github/workflows/github-actions.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index cce4bec83..86e1c4cb5 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -173,13 +173,12 @@ jobs: with: path: ${{ env.Pipeline.Workspace }}/TestResults if: (${{ job.status }} != 'cancelled') - - uses: montudor/action-zip@v0.1.0 - with: - args: zip -r ${{ github.workspace }}/ExtentReports_${{ github.run_id }}.zip ${{ github.workspace }}/Ocaramba.Tests.NUnitExtentReports/bin/Release/net6.0/TestOutput - if: always() + + - name: Zip artifact + run: Compress-Archive -Path ${{ github.workspace }}/Ocaramba.Tests.NUnitExtentReports/bin/Release/net6.0/TestOutput -Destination ExtentReports_${{ github.run_id }}.zip - uses: actions/upload-artifact@v2 with: - path: ${{ github.workspace }}/ExtentReports_${{ github.run_id }}.zip + path: ExtentReports_${{ github.run_id }}.zip name: ExtentTestReport if: always() test_Stage_RunTestsOnWindowsCore2: From 9b184199cbe52bb469eb3769662b6f9fa5e6c280 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 5 Mar 2024 09:55:29 +0100 Subject: [PATCH 31/75] testing vstest --- .github/workflows/github-actions.yml | 37 ++++++++++++---------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 86e1c4cb5..5d31e3852 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -142,38 +142,33 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: | - cd Ocaramba.Tests.Angular - dotnet add package Microsoft.TestPlatform - dotnet add package NUnit3TestAdapter --version 4.5.0 - cd .. - cd Ocaramba.Tests.NUnit - dotnet add package Microsoft.TestPlatform - dotnet add package NUnit3TestAdapter --version 4.5.0 - cd .. - cd Ocaramba.Tests.NUnitExtentReports - dotnet add package Microsoft.TestPlatform - dotnet add package NUnit3TestAdapter --version 4.5.0 - cd .. - cd Ocaramba.Tests.Features - dotnet add package Microsoft.TestPlatform - dotnet add package NUnit3TestAdapter --version 4.5.0 + - name: Setup MSBuild Path + uses: warrenbuckley/Setup-MSBuild@v1 + + - name: Setup VSTest Path + uses: darenm/Setup-VSTest@v1.2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v1.0.2 - uses: actions/download-artifact@v2 with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ + - name: VSTest + run: vstest.console.exe /Platform:x64 D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll - run: ./ExecutingTestsOnWindowsGithubActions1.ps1 + - name: Run tests + uses: microsoft-approved-actions/vstest@master + with: + testAssembly: Ocaramba.Tests.Angular.dll + searchFolder: D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0 + runInParallel: true - run: Get-ChildItem .\ -Recurse - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: files: Ocaramba.Tests.*.trx - - uses: actions/upload-artifact@v2 - with: - path: ${{ env.Pipeline.Workspace }}/TestResults - if: (${{ job.status }} != 'cancelled') - - name: Zip artifact run: Compress-Archive -Path ${{ github.workspace }}/Ocaramba.Tests.NUnitExtentReports/bin/Release/net6.0/TestOutput -Destination ExtentReports_${{ github.run_id }}.zip - uses: actions/upload-artifact@v2 From 59f481fd9ce37385491953010f36d0fb43caaa6f Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 5 Mar 2024 10:11:35 +0100 Subject: [PATCH 32/75] testing vstest --- .github/workflows/github-actions.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5d31e3852..f0e2ddc81 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -157,12 +157,6 @@ jobs: - name: VSTest run: vstest.console.exe /Platform:x64 D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll - run: ./ExecutingTestsOnWindowsGithubActions1.ps1 - - name: Run tests - uses: microsoft-approved-actions/vstest@master - with: - testAssembly: Ocaramba.Tests.Angular.dll - searchFolder: D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0 - runInParallel: true - run: Get-ChildItem .\ -Recurse - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action/windows@v2 From bac8ee227eefd485ed35b225bb7e3f02fb8361c4 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 5 Mar 2024 10:22:34 +0100 Subject: [PATCH 33/75] testing vstest --- .github/workflows/github-actions.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index f0e2ddc81..7d4e194f9 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -142,12 +142,8 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - name: Setup MSBuild Path - uses: warrenbuckley/Setup-MSBuild@v1 - - name: Setup VSTest Path uses: darenm/Setup-VSTest@v1.2 - - name: Setup NuGet uses: NuGet/setup-nuget@v1.0.2 - uses: actions/download-artifact@v2 From 5fa7e927917dce2dbaab80fbeec656e0d315751f Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 5 Mar 2024 11:14:08 +0100 Subject: [PATCH 34/75] testing vstest --- .github/workflows/github-actions.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 7d4e194f9..aeec075c5 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -144,8 +144,9 @@ jobs: - uses: actions/checkout@v2 - name: Setup VSTest Path uses: darenm/Setup-VSTest@v1.2 - - name: Setup NuGet - uses: NuGet/setup-nuget@v1.0.2 + - uses: nuget/setup-nuget@v2 + with: + nuget-version: latest - uses: actions/download-artifact@v2 with: name: OcarambaBuild From d11e73bf2f7448bf7fd11143f2dca5469dd30e55 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 5 Mar 2024 12:51:45 +0100 Subject: [PATCH 35/75] testing vstest --- .github/workflows/github-actions.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index aeec075c5..c6f7acd00 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -31,6 +31,14 @@ jobs: if: startsWith(github.ref, 'refs/tags/') - shell: powershell run: '(Get-Content ''Ocaramba.sln'' -raw) -replace [regex](''.*?'' + ''Documentation'' + (''.*?\r\n'' * (5 + 1))) | set-content ''Ocaramba.sln''' + - name: Update ChromeDriver in csproj + run: | + Get-ChildItem ./ *.csproj -recurse | + Foreach-Object { + $c = ($_ | Get-Content) + $c = $c -replace '109.0.5414.7400','122.0.6261.9400' + [IO.File]::WriteAllText($_.FullName, ($c -join "`r`n")) + } - name: Setup nuget uses: nuget/setup-nuget@v2 with: From ba24129275c6e175f57a46a9a0d13320da3894dd Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 5 Mar 2024 13:19:35 +0100 Subject: [PATCH 36/75] testing vstest --- ExecutingTestsOnWindowsGithubActions1.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 index 3397f27f9..cee4c76bd 100644 --- a/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -6,7 +6,7 @@ echo '********************************************net6.0 tests****************** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll ` +vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll ` D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll ` D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\Ocaramba.Tests.NUnitExtentReports.dll ` /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel ` @@ -16,7 +16,7 @@ echo '********************************************net472 tests****************** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll --logger "trx;LogFileName=Ocaramba.Tests.Features.trx" +vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll --logger "trx;LogFileName=Ocaramba.Tests.Features.trx" if($lastexitcode -ne 0) { echo 'lastexitcode' $lastexitcode From 45981e579516efa31b7fe07c8fcdc973a0d0cbd4 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 5 Mar 2024 13:48:51 +0100 Subject: [PATCH 37/75] testing vstest --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index c6f7acd00..ab2f745d9 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -160,7 +160,7 @@ jobs: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ - name: VSTest - run: vstest.console.exe /Platform:x64 D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll + run: vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\Ocaramba.Tests.NUnitExtentReports.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" - run: ./ExecutingTestsOnWindowsGithubActions1.ps1 - run: Get-ChildItem .\ -Recurse - name: Publish Test Results From b3882796acc8df17ad65a77b6d1f2847acb89321 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 5 Mar 2024 14:13:18 +0100 Subject: [PATCH 38/75] testing vstest --- .github/workflows/github-actions.yml | 1 + ExecutingTestsOnWindowsGithubActions1.ps1 | 6 +++--- .../Ocaramba.Tests.NUnitExtentReports.csproj | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index ab2f745d9..54ea9d697 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -13,6 +13,7 @@ env: buildPlatform: Any CPU buildConfiguration: Release frameworkVersion: 4.0.0 + CHROMEWEBDRIVER: C:\SeleniumWebDrivers\ChromeDriver BuildVersion: 4.0.0${{ github.run_number }} seleniumGridVersion: selenium-server-4.8.0.jar seleniumGridUrl: https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.8.0/selenium-server-4.8.0.jar diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 index cee4c76bd..29a0a5d89 100644 --- a/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -2,9 +2,9 @@ echo '********************************************Executing tests*************** echo '********************************************net6.0 tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|${{ env.CHROMEWEBDRIVER }}" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|${{ env.CHROMEWEBDRIVER }}" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|${{ env.CHROMEWEBDRIVER }}" -logValues -json vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll ` D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll ` diff --git a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj index 05a79b814..9472d5a23 100644 --- a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj +++ b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj @@ -3,6 +3,7 @@ net6.0 net6.0 + true From bc38147e4cedfb8133e0c467d546ae69f5bb8881 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 6 Mar 2024 08:57:32 +0100 Subject: [PATCH 39/75] testing vstest --- .github/workflows/github-actions.yml | 2 -- ExecutingTestsOnWindowsGithubActions1.ps1 | 10 +++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 54ea9d697..c9b48e413 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -160,8 +160,6 @@ jobs: with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ - - name: VSTest - run: vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\Ocaramba.Tests.NUnitExtentReports.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" - run: ./ExecutingTestsOnWindowsGithubActions1.ps1 - run: Get-ChildItem .\ -Recurse - name: Publish Test Results diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 index 29a0a5d89..39d551cc4 100644 --- a/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -6,17 +6,13 @@ echo '********************************************net6.0 tests****************** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|${{ env.CHROMEWEBDRIVER }}" -logValues -json .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|${{ env.CHROMEWEBDRIVER }}" -logValues -json -vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll ` - D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll ` - D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\Ocaramba.Tests.NUnitExtentReports.dll ` - /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel ` - --logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" +vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" echo '********************************************net472 tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "appsettings.json" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll --logger "trx;LogFileName=Ocaramba.Tests.Features.trx" +vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll /Logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" if($lastexitcode -ne 0) { echo 'lastexitcode' $lastexitcode From a0604d4245d49013485a9e30e1bae5d52d26b664 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 6 Mar 2024 09:16:30 +0100 Subject: [PATCH 40/75] testing vstest --- ExecutingTestsOnWindowsGithubActions1.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 index 39d551cc4..fe892de4c 100644 --- a/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -2,9 +2,9 @@ echo '********************************************Executing tests*************** echo '********************************************net6.0 tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|${{ env.CHROMEWEBDRIVER }}" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|${{ env.CHROMEWEBDRIVER }}" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|${{ env.CHROMEWEBDRIVER }}" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" From 9c159751cf8a47944d3b574714e03a7de3a28cd2 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 6 Mar 2024 09:35:52 +0100 Subject: [PATCH 41/75] testing vstest --- ExecutingTestsOnWindowsGithubActions1.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 index fe892de4c..bb6c38b53 100644 --- a/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -10,9 +10,9 @@ vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Re echo '********************************************net472 tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "appsettings.json" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues +#.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "appsettings.json" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll /Logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" +#vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll /Logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" if($lastexitcode -ne 0) { echo 'lastexitcode' $lastexitcode From 8c246c789789091cdf5a30b3c852dbd9a9bb0aca Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 6 Mar 2024 12:38:34 +0100 Subject: [PATCH 42/75] fixing zipping artifacts --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index c9b48e413..18ccc6ddd 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -166,9 +166,9 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: Ocaramba.Tests.*.trx + files: D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.trx - name: Zip artifact - run: Compress-Archive -Path ${{ github.workspace }}/Ocaramba.Tests.NUnitExtentReports/bin/Release/net6.0/TestOutput -Destination ExtentReports_${{ github.run_id }}.zip + run: Compress-Archive -Path D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\TestOutput -Destination ExtentReports_${{ github.run_id }}.zip - uses: actions/upload-artifact@v2 with: path: ExtentReports_${{ github.run_id }}.zip From 2dd2bdfb138d0c7c6fef97397b0500e6639b04e8 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 6 Mar 2024 14:02:10 +0100 Subject: [PATCH 43/75] fixing test_Stage_RunTestsOnWindowsCore2 --- .github/workflows/github-actions.yml | 19 ++++++++++++----- ExecutingTestsOnWindowsGithubActions2.ps1 | 25 +++++++++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 ExecutingTestsOnWindowsGithubActions2.ps1 diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 18ccc6ddd..c6d21be9d 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -180,13 +180,22 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: dotnet add package Microsoft.TestPlatform + - name: Setup VSTest Path + uses: darenm/Setup-VSTest@v1.2 + - uses: nuget/setup-nuget@v2 + with: + nuget-version: latest - uses: actions/download-artifact@v2 - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() with: - report_paths: '**/Ocaramba.Tests.*.xml' + name: OcarambaBuild + - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ + - run: ./ExecutingTestsOnWindowsGithubActions2.ps1 + - run: Get-ChildItem .\ -Recurse + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/windows@v2 + if: always() + with: + files: D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.trx test_Stage_RunTestsOnWindowsFramework: runs-on: windows-latest needs: diff --git a/ExecutingTestsOnWindowsGithubActions2.ps1 b/ExecutingTestsOnWindowsGithubActions2.ps1 new file mode 100644 index 000000000..85a68ad54 --- /dev/null +++ b/ExecutingTestsOnWindowsGithubActions2.ps1 @@ -0,0 +1,25 @@ +echo '********************************************Executing tests********************************************' + +echo '********************************************net6.0 tests********************************************' + +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json + +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0\Ocaramba.Tests.Features.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0\Ocaramba.Tests.Xunit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0\Ocaramba.Tests.MsTest.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0\Ocaramba.UnitTests.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" + + +echo '********************************************EdgeChrominum tests********************************************' + +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|C:\SeleniumWebDrivers\EdgeDriver" "EdgeChromium|$($env:EDGEWEBDRIVER)" -logValues -json + + +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory=Grid)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.EdgeChrominum.xml" + +if($lastexitcode -ne 0) + { + echo 'lastexitcode' $lastexitcode + } + +exit 0 \ No newline at end of file From 77cdf73ec6013959c257a3baeeaa201c39edf4b3 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 6 Mar 2024 15:03:10 +0100 Subject: [PATCH 44/75] fixing test_Stage_RunTestsOnWindowsCore2 --- .github/workflows/github-actions.yml | 2 +- ExecutingTestsOnWindowsGithubActions2.ps1 | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index c6d21be9d..cbea0188e 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -195,7 +195,7 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.trx + files: D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.xml test_Stage_RunTestsOnWindowsFramework: runs-on: windows-latest needs: diff --git a/ExecutingTestsOnWindowsGithubActions2.ps1 b/ExecutingTestsOnWindowsGithubActions2.ps1 index 85a68ad54..b4cdd5e3f 100644 --- a/ExecutingTestsOnWindowsGithubActions2.ps1 +++ b/ExecutingTestsOnWindowsGithubActions2.ps1 @@ -2,17 +2,17 @@ echo '********************************************Executing tests*************** echo '********************************************net6.0 tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0\Ocaramba.Tests.Features.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0\Ocaramba.Tests.Xunit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0\Ocaramba.Tests.MsTest.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0\Ocaramba.UnitTests.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" echo '********************************************EdgeChrominum tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|C:\SeleniumWebDrivers\EdgeDriver" "EdgeChromium|$($env:EDGEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory=Grid)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.EdgeChrominum.xml" From 26dbc46b50cc9c3a01ccc9536e1265f76eb77678 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 6 Mar 2024 15:39:43 +0100 Subject: [PATCH 45/75] fixing test_Stage_RunTestsOnWindowsCore2 --- ExecutingTestsOnWindowsGithubActions2.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ExecutingTestsOnWindowsGithubActions2.ps1 b/ExecutingTestsOnWindowsGithubActions2.ps1 index b4cdd5e3f..1eb779913 100644 --- a/ExecutingTestsOnWindowsGithubActions2.ps1 +++ b/ExecutingTestsOnWindowsGithubActions2.ps1 @@ -7,7 +7,7 @@ echo '********************************************net6.0 tests****************** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json -dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0\Ocaramba.Tests.Features.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0\Ocaramba.Tests.Xunit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0\Ocaramba.Tests.MsTest.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0\Ocaramba.UnitTests.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" +vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0\Ocaramba.Tests.Features.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0\Ocaramba.Tests.Xunit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0\Ocaramba.Tests.MsTest.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0\Ocaramba.UnitTests.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" echo '********************************************EdgeChrominum tests********************************************' @@ -15,7 +15,7 @@ echo '********************************************EdgeChrominum tests*********** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json -dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory=Grid)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.EdgeChrominum.xml" +vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory=Grid)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.EdgeChrominum.xml" if($lastexitcode -ne 0) { From 3e4d5f2293a90e22e2ac96b4554b66f6bf60032f Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 6 Mar 2024 17:56:53 +0100 Subject: [PATCH 46/75] fixing test_Stage_RunTestsOnWindowsCore2 --- ExecutingTestsOnWindowsGithubActions2.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ExecutingTestsOnWindowsGithubActions2.ps1 b/ExecutingTestsOnWindowsGithubActions2.ps1 index 1eb779913..2e001f8e4 100644 --- a/ExecutingTestsOnWindowsGithubActions2.ps1 +++ b/ExecutingTestsOnWindowsGithubActions2.ps1 @@ -2,10 +2,10 @@ echo '********************************************Executing tests*************** echo '********************************************net6.0 tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0\Ocaramba.Tests.Features.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0\Ocaramba.Tests.Xunit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0\Ocaramba.Tests.MsTest.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0\Ocaramba.UnitTests.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" From 56a198ea38045f398b5948b67fbf1736356154b0 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 6 Mar 2024 18:27:26 +0100 Subject: [PATCH 47/75] fixing test_Stage_RunTestsOnWindowsCore2 and linux --- .github/workflows/github-actions.yml | 45 ++++++++++++++++------- ExecutingTestsOnWindowsGithubActions3.ps1 | 18 +++++++++ 2 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 ExecutingTestsOnWindowsGithubActions3.ps1 diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index cbea0188e..73896dc4e 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -108,17 +108,24 @@ jobs: steps: - uses: actions/checkout@v2 - run: | - ls + ls + export ASPNETCORE_ENVIRONMENT=Linux + echo $ASPNETCORE_ENVIRONMENT + sudo apt-get install google-chrome-stable + sed -i '/Documentation/,+5 d' ./Ocaramba.sln - run: dotnet build ./Ocaramba.sln --configuration ${{ env.buildConfiguration }} - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() + - shell: pwsh + run: ./ExecutingTestsOnLinuxAzure.ps1 + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/linux@v2 + if: always() with: - report_paths: '**/Ocaramba.Tests.*.xml' + files: | + test-results/**/*.xml test_Stage_RunTestsOnLinuxBrowserStack: runs-on: ubuntu-latest timeout-minutes: 10 @@ -128,9 +135,13 @@ jobs: - uses: actions/checkout@v2 - run: | ls + export ASPNETCORE_ENVIRONMENT=Linux + echo $ASPNETCORE_ENVIRONMENT + sed -i '/Documentation/,+5 d' ./Ocaramba.sln + - shell: pwsh run: dotnet build ./Ocaramba.sln --configuration ${{ env.buildConfiguration }} env: @@ -195,22 +206,30 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.xml + files: | + D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.xml + D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.EdgeChrominum.xml test_Stage_RunTestsOnWindowsFramework: runs-on: windows-latest needs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: dotnet add package Microsoft.TestPlatform + - name: Setup VSTest Path + uses: darenm/Setup-VSTest@v1.2 + - uses: nuget/setup-nuget@v2 + with: + nuget-version: latest - uses: actions/download-artifact@v2 - - shell: powershell - run: ./ExecutingTestsOnWindowsAzure3.ps1 - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() with: - report_paths: '**/Ocaramba.Tests.*.xml' + name: OcarambaBuild + - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ + - run: ./ExecutingTestsOnWindowsAzure3.ps1 + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/windows@v2 + if: always() + with: + files: D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.net4.xml test_Stage_RunTestsOnWindowsBrowserStack: runs-on: windows-latest needs: diff --git a/ExecutingTestsOnWindowsGithubActions3.ps1 b/ExecutingTestsOnWindowsGithubActions3.ps1 new file mode 100644 index 000000000..2cedeb077 --- /dev/null +++ b/ExecutingTestsOnWindowsGithubActions3.ps1 @@ -0,0 +1,18 @@ +echo '********************************************Executing tests********************************************' + +echo '********************************************net472 tests*********************************************' + +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net472" "Ocaramba.Tests.Angular.dll.config" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472" "Ocaramba.Tests.NUnit.dll.config" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net472" "Ocaramba.UnitTests.dll.config" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues + + +vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net472\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\Ocaramba.Tests.NUnit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net472\Ocaramba.UnitTests.dll /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.net4.xml" + + +if($lastexitcode -ne 0) + { + echo 'lastexitcode' $lastexitcode + } + +exit 0 From 758fe0b7e599251083ac5a3ba6c19e2f35d87e30 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 6 Mar 2024 21:12:32 +0100 Subject: [PATCH 48/75] fixing linux 1 --- ExecutingTestsOnLinuxAzure.ps1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ExecutingTestsOnLinuxAzure.ps1 b/ExecutingTestsOnLinuxAzure.ps1 index 07f17fb56..8cba7c6be 100644 --- a/ExecutingTestsOnLinuxAzure.ps1 +++ b/ExecutingTestsOnLinuxAzure.ps1 @@ -5,11 +5,9 @@ echo '********************************************net6.0 tests****************** $Env:ASPNETCORE_ENVIRONMENT="Linux" echo $Env:ASPNETCORE_ENVIRONMENT -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +#.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -dotnet vstest ./Ocaramba.Tests.NUnit/bin/Release/net6.0/Ocaramba.Tests.NUnit.dll ` - /TestCaseFilter:"(TestCategory!=NotImplementedInCoreOrUploadDownload)" /Parallel ` - --logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" +dotnet vstest ./Ocaramba.Tests.NUnit/bin/Release/net6.0/Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory!=NotImplementedInCoreOrUploadDownload)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" if($lastexitcode -ne 0) { From 1eab9108971e50a46d18a2403e14ad9bbe3501d0 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 09:58:37 +0100 Subject: [PATCH 49/75] fixing linux 1 --- .github/workflows/github-actions.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 73896dc4e..2600ad306 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -46,12 +46,11 @@ jobs: nuget-version: latest - name: Cache uses: actions/cache@v4 + env: + cache-name: nuget-package-cache with: path: ~/.nuget/packages - key: ${{ runner.os }}|nuget|${{ hashFiles('**/packages.lock.json') }} - restore-keys: | - nuget | "${{ runner.os }}" - nuget + key: ${{ runner.os }}-${{ env.cache-name }} - name: NuGet restore run: nuget restore ${{ env.solution }} - name: Set project versions @@ -107,6 +106,7 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 + - run: find . -name '*.csproj' -exec sed -i -e 's/109.0.5414.7400/122.0.6261.9400/g' {} \; - run: | ls From 42a6ae88e34cab77063d52223912a358a1fab45a Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 10:19:04 +0100 Subject: [PATCH 50/75] fixing linux 1 and windows framework --- .github/workflows/github-actions.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 2600ad306..ea9637b2b 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -45,12 +45,12 @@ jobs: with: nuget-version: latest - name: Cache - uses: actions/cache@v4 - env: - cache-name: nuget-package-cache + uses: actions/cache@v3 with: - path: ~/.nuget/packages - key: ${{ runner.os }}-${{ env.cache-name }} + path: ${{ github.workspace }}\.nuget\packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} #hash of project files + restore-keys: | + ${{ runner.os }}-nuget- - name: NuGet restore run: nuget restore ${{ env.solution }} - name: Set project versions @@ -125,7 +125,7 @@ jobs: if: always() with: files: | - test-results/**/*.xml + /home/runner/work/Ocaramba/Ocaramba/TestResults/Ocaramba.Tests.netcoreapp.xml test_Stage_RunTestsOnLinuxBrowserStack: runs-on: ubuntu-latest timeout-minutes: 10 @@ -224,7 +224,7 @@ jobs: with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ - - run: ./ExecutingTestsOnWindowsAzure3.ps1 + - run: ./ExecutingTestsOnWindowsGithubActions3.ps1 - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() From 79d6b7e4f1b6f550404513ce6bef04fee8dd902b Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 11:06:45 +0100 Subject: [PATCH 51/75] fixing windows framework --- .github/workflows/github-actions.yml | 3 +- ...gTestsOnLinuxBrowserStackGithubActions.ps1 | 28 +++++++++++++++++++ ExecutingTestsOnWindowsGithubActions3.ps1 | 6 ++-- 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index ea9637b2b..f5e1b6a57 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -140,8 +140,7 @@ jobs: echo $ASPNETCORE_ENVIRONMENT - sed -i '/Documentation/,+5 d' ./Ocaramba.sln - + sed -i '/Documentation/,+5 d' ./Ocaramba.sln - shell: pwsh run: dotnet build ./Ocaramba.sln --configuration ${{ env.buildConfiguration }} env: diff --git a/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 b/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 new file mode 100644 index 000000000..708b3c53e --- /dev/null +++ b/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 @@ -0,0 +1,28 @@ +echo '********************************************CloudProviderCrossBrowser tests********************************************' + +echo '********************************************BrowserStack tests********************************************' +$Env:ASPNETCORE_ENVIRONMENT="Linux" + +echo $Env:ASPNETCORE_ENVIRONMENT +echo $env:MAPPED_ENV_BROWSERSTACKUSER +echo $env:MAPPED_ENV_BROWSERSTACKKEY +echo $Env:MAPPED_ENV_BROWSERSTACKUSER +echo $Env:MAPPED_ENV_BROWSERSTACKKEY +echo $Env:MAPPED_ENV_TESTINGBOTKEY +echo $Env:MAPPED_ENV_TESTINGBOTSECRET +echo $Env:MAPPED_ENV_SAUCELABSACCESSKEY +echo $Env:MAPPED_ENV_SAUCELABSUSERNAME + +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json + +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "RemoteWebDriverHub" "https://$($env:MAPPED_ENV_BROWSERSTACKUSER):$($env:MAPPED_ENV_BROWSERSTACKKEY)@hub-cloud.browserstack.com/wd/hub" -json + +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net6.0" "appsettings.Linux.json" "DriverCapabilities" "buildName" "Ocaramba.Tests.BrowserStackCrossBrowser$($env:BuildVersion)" -logValues -json + +dotnet vstest ./Ocaramba.Tests.CloudProviderCrossBrowser/bin/Release/net6.0/Ocaramba.Tests.CloudProviderCrossBrowser.dll /Logger:"trx;LogFileName=Ocaramba.Tests.BrowserStacknetcoreapp.xml" + +if($lastexitcode -ne 0) + { + echo 'lastexitcode' $lastexitcode + } +exit 0 diff --git a/ExecutingTestsOnWindowsGithubActions3.ps1 b/ExecutingTestsOnWindowsGithubActions3.ps1 index 2cedeb077..a03ae2418 100644 --- a/ExecutingTestsOnWindowsGithubActions3.ps1 +++ b/ExecutingTestsOnWindowsGithubActions3.ps1 @@ -2,9 +2,9 @@ echo '********************************************Executing tests*************** echo '********************************************net472 tests*********************************************' -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net472" "Ocaramba.Tests.Angular.dll.config" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472" "Ocaramba.Tests.NUnit.dll.config" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net472" "Ocaramba.UnitTests.dll.config" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net472" "Ocaramba.Tests.Angular.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472" "Ocaramba.Tests.NUnit.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net472" "Ocaramba.UnitTests.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net472\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\Ocaramba.Tests.NUnit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net472\Ocaramba.UnitTests.dll /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.net4.xml" From 135f4073680cc16f346218d802e414359bf98608 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 11:13:15 +0100 Subject: [PATCH 52/75] fixing windows framework --- ExecutingTestsOnLinuxBrowserStackAzure.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ExecutingTestsOnLinuxBrowserStackAzure.ps1 b/ExecutingTestsOnLinuxBrowserStackAzure.ps1 index 1939002ba..dcf8c5ed6 100644 --- a/ExecutingTestsOnLinuxBrowserStackAzure.ps1 +++ b/ExecutingTestsOnLinuxBrowserStackAzure.ps1 @@ -4,6 +4,14 @@ echo '********************************************BrowserStack tests************ $Env:ASPNETCORE_ENVIRONMENT="Linux" echo $Env:ASPNETCORE_ENVIRONMENT +echo $env:MAPPED_ENV_BROWSERSTACKUSER +echo $env:MAPPED_ENV_BROWSERSTACKKEY +echo $Env:MAPPED_ENV_BROWSERSTACKUSER +echo $Env:MAPPED_ENV_BROWSERSTACKKEY +echo $Env:MAPPED_ENV_TESTINGBOTKEY +echo $Env:MAPPED_ENV_TESTINGBOTSECRET +echo $Env:MAPPED_ENV_SAUCELABSACCESSKEY +echo $Env:MAPPED_ENV_SAUCELABSUSERNAME .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json From 7b4d99e997e890138137e93adadeb2dbb5056ec1 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 12:04:44 +0100 Subject: [PATCH 53/75] reverting changes in ps1 scripts, fixing linux browserstack --- .github/workflows/github-actions.yml | 13 ++++++++----- ExecutingTestsOnLinuxBrowserStackAzure.ps1 | 8 -------- ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 | 10 +--------- azure-pipelines.yml | 2 +- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index f5e1b6a57..bcadfd38c 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -141,8 +141,9 @@ jobs: echo $ASPNETCORE_ENVIRONMENT sed -i '/Documentation/,+5 d' ./Ocaramba.sln + - run: dotnet build ./Ocaramba.sln --configuration ${{ env.buildConfiguration }} - shell: pwsh - run: dotnet build ./Ocaramba.sln --configuration ${{ env.buildConfiguration }} + if: false env: MAPPED_ENV_BROWSERSTACKKEY: ${{ env.browserstackkey }} MAPPED_ENV_BROWSERSTACKUSER: ${{ env.browserstackuser }} @@ -150,11 +151,13 @@ jobs: MAPPED_ENV_TESTINGBOTSECRET: ${{ env.testingbotsecret }} MAPPED_ENV_SAUCELABSACCESSKEY: ${{ env.saucelabsaccessKey }} MAPPED_ENV_SAUCELABSUSERNAME: ${{ env.saucelabsusername }} - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() + run: ./ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/linux@v2 + if: always() with: - report_paths: '**/Ocaramba.Tests.*.xml' + files: | + /home/runner/work/Ocaramba/Ocaramba/TestResults/BrowserStacknetcoreapp.xml test_Stage_RunTestsOnWindowsCore1: runs-on: windows-latest needs: diff --git a/ExecutingTestsOnLinuxBrowserStackAzure.ps1 b/ExecutingTestsOnLinuxBrowserStackAzure.ps1 index dcf8c5ed6..1939002ba 100644 --- a/ExecutingTestsOnLinuxBrowserStackAzure.ps1 +++ b/ExecutingTestsOnLinuxBrowserStackAzure.ps1 @@ -4,14 +4,6 @@ echo '********************************************BrowserStack tests************ $Env:ASPNETCORE_ENVIRONMENT="Linux" echo $Env:ASPNETCORE_ENVIRONMENT -echo $env:MAPPED_ENV_BROWSERSTACKUSER -echo $env:MAPPED_ENV_BROWSERSTACKKEY -echo $Env:MAPPED_ENV_BROWSERSTACKUSER -echo $Env:MAPPED_ENV_BROWSERSTACKKEY -echo $Env:MAPPED_ENV_TESTINGBOTKEY -echo $Env:MAPPED_ENV_TESTINGBOTSECRET -echo $Env:MAPPED_ENV_SAUCELABSACCESSKEY -echo $Env:MAPPED_ENV_SAUCELABSUSERNAME .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json diff --git a/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 b/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 index 708b3c53e..2c5448ab8 100644 --- a/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 +++ b/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 @@ -4,14 +4,6 @@ echo '********************************************BrowserStack tests************ $Env:ASPNETCORE_ENVIRONMENT="Linux" echo $Env:ASPNETCORE_ENVIRONMENT -echo $env:MAPPED_ENV_BROWSERSTACKUSER -echo $env:MAPPED_ENV_BROWSERSTACKKEY -echo $Env:MAPPED_ENV_BROWSERSTACKUSER -echo $Env:MAPPED_ENV_BROWSERSTACKKEY -echo $Env:MAPPED_ENV_TESTINGBOTKEY -echo $Env:MAPPED_ENV_TESTINGBOTSECRET -echo $Env:MAPPED_ENV_SAUCELABSACCESSKEY -echo $Env:MAPPED_ENV_SAUCELABSUSERNAME .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json @@ -20,7 +12,7 @@ echo $Env:MAPPED_ENV_SAUCELABSUSERNAME .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net6.0" "appsettings.Linux.json" "DriverCapabilities" "buildName" "Ocaramba.Tests.BrowserStackCrossBrowser$($env:BuildVersion)" -logValues -json dotnet vstest ./Ocaramba.Tests.CloudProviderCrossBrowser/bin/Release/net6.0/Ocaramba.Tests.CloudProviderCrossBrowser.dll /Logger:"trx;LogFileName=Ocaramba.Tests.BrowserStacknetcoreapp.xml" - + if($lastexitcode -ne 0) { echo 'lastexitcode' $lastexitcode diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 00687310f..fdfda0c58 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -204,7 +204,7 @@ stages: - script: dotnet build ./Ocaramba.sln --configuration $(buildConfiguration) - task: PowerShell@2 - enabled: false + enabled: true inputs: filePath: './ExecutingTestsOnLinuxBrowserStackAzure.ps1' env: From 314c495fbd557607797bc02247bb9c43c1854dc8 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 12:46:59 +0100 Subject: [PATCH 54/75] reverting changes in ps1 scripts, fixing linux browserstack --- .github/workflows/github-actions.yml | 9 ++++++++- ExecutingTestsOnWindowsAzure4.ps1 | 7 ++++++- ExecutingTestsOnWindowsGithubActions4.ps1 | 19 +++++++++++++++++++ azure-pipelines.yml | 2 +- 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 ExecutingTestsOnWindowsGithubActions4.ps1 diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index bcadfd38c..824aadf61 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -238,8 +238,15 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 + - name: Setup VSTest Path + uses: darenm/Setup-VSTest@v1.2 + - uses: nuget/setup-nuget@v2 with: - repository: none + nuget-version: latest + - uses: actions/download-artifact@v2 + with: + name: OcarambaBuild + - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ - shell: powershell run: dotnet add package Microsoft.TestPlatform env: diff --git a/ExecutingTestsOnWindowsAzure4.ps1 b/ExecutingTestsOnWindowsAzure4.ps1 index 3b3463dc8..30eaa4a65 100644 --- a/ExecutingTestsOnWindowsAzure4.ps1 +++ b/ExecutingTestsOnWindowsAzure4.ps1 @@ -1,7 +1,12 @@ echo '********************************************CloudProviderCrossBrowser tests********************************************' echo '********************************************BrowserStack tests********************************************' - +echo $($env:MAPPED_ENV_BROWSERSTACKUSER) +echo $($env:MAPPED_ENV_BROWSERSTACKKEY) +echo $env:MAPPED_ENV_BROWSERSTACKUSER +echo $env:MAPPED_ENV_BROWSERSTACKKEY + + $vstest = (Resolve-Path "D:\a\_temp\VsTest\Microsoft.TestPlatform*\tools\net*\Common*\IDE\Extensions\TestPlatform\vstest.console.exe").ToString() .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "https://$($env:MAPPED_ENV_BROWSERSTACKUSER):$($env:MAPPED_ENV_BROWSERSTACKKEY)@hub-cloud.browserstack.com/wd/hub" diff --git a/ExecutingTestsOnWindowsGithubActions4.ps1 b/ExecutingTestsOnWindowsGithubActions4.ps1 new file mode 100644 index 000000000..3b3463dc8 --- /dev/null +++ b/ExecutingTestsOnWindowsGithubActions4.ps1 @@ -0,0 +1,19 @@ +echo '********************************************CloudProviderCrossBrowser tests********************************************' + +echo '********************************************BrowserStack tests********************************************' + +$vstest = (Resolve-Path "D:\a\_temp\VsTest\Microsoft.TestPlatform*\tools\net*\Common*\IDE\Extensions\TestPlatform\vstest.console.exe").ToString() + +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "https://$($env:MAPPED_ENV_BROWSERSTACKUSER):$($env:MAPPED_ENV_BROWSERSTACKKEY)@hub-cloud.browserstack.com/wd/hub" + +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "buildName" "Ocaramba.Tests.BrowserStackCrossBrowser$($env:BuildVersion)" -logValues + +& $vstest .\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll ` + --logger:"trx;LogFileName=Ocaramba.Tests.BrowserStack.xml" + +if($lastexitcode -ne 0) + { + echo 'lastexitcode' $lastexitcode + } + +exit 0 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fdfda0c58..00687310f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -204,7 +204,7 @@ stages: - script: dotnet build ./Ocaramba.sln --configuration $(buildConfiguration) - task: PowerShell@2 - enabled: true + enabled: false inputs: filePath: './ExecutingTestsOnLinuxBrowserStackAzure.ps1' env: From d1e31175a979edeb9af8dc416e0b9d58883cba2d Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 13:32:20 +0100 Subject: [PATCH 55/75] fixes windows browserstack --- .github/workflows/github-actions.yml | 11 +++++------ ExecutingTestsOnWindowsAzure4.ps1 | 7 +------ ExecutingTestsOnWindowsGithubActions4.ps1 | 9 +++------ 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 824aadf61..435b923e2 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -247,8 +247,7 @@ jobs: with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ - - shell: powershell - run: dotnet add package Microsoft.TestPlatform + - run: ./ExecutingTestsOnWindowsGithubActions4.ps1 env: MAPPED_ENV_BROWSERSTACKKEY: ${{ env.browserstackkey }} MAPPED_ENV_BROWSERSTACKUSER: ${{ env.browserstackuser }} @@ -256,11 +255,11 @@ jobs: MAPPED_ENV_TESTINGBOTSECRET: ${{ env.testingbotsecret }} MAPPED_ENV_SAUCELABSACCESSKEY: ${{ env.saucelabsaccessKey }} MAPPED_ENV_SAUCELABSUSERNAME: ${{ env.saucelabsusername }} - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/windows@v2 + if: always() with: - report_paths: '**/Ocaramba.Tests.*.xml' + files: D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.BrowserStack.xml test_Stage_RunTestsSeleniumGrid: runs-on: windows-latest needs: diff --git a/ExecutingTestsOnWindowsAzure4.ps1 b/ExecutingTestsOnWindowsAzure4.ps1 index 30eaa4a65..3b3463dc8 100644 --- a/ExecutingTestsOnWindowsAzure4.ps1 +++ b/ExecutingTestsOnWindowsAzure4.ps1 @@ -1,12 +1,7 @@ echo '********************************************CloudProviderCrossBrowser tests********************************************' echo '********************************************BrowserStack tests********************************************' -echo $($env:MAPPED_ENV_BROWSERSTACKUSER) -echo $($env:MAPPED_ENV_BROWSERSTACKKEY) -echo $env:MAPPED_ENV_BROWSERSTACKUSER -echo $env:MAPPED_ENV_BROWSERSTACKKEY - - + $vstest = (Resolve-Path "D:\a\_temp\VsTest\Microsoft.TestPlatform*\tools\net*\Common*\IDE\Extensions\TestPlatform\vstest.console.exe").ToString() .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "https://$($env:MAPPED_ENV_BROWSERSTACKUSER):$($env:MAPPED_ENV_BROWSERSTACKKEY)@hub-cloud.browserstack.com/wd/hub" diff --git a/ExecutingTestsOnWindowsGithubActions4.ps1 b/ExecutingTestsOnWindowsGithubActions4.ps1 index 3b3463dc8..29ca18d3b 100644 --- a/ExecutingTestsOnWindowsGithubActions4.ps1 +++ b/ExecutingTestsOnWindowsGithubActions4.ps1 @@ -1,15 +1,12 @@ echo '********************************************CloudProviderCrossBrowser tests********************************************' echo '********************************************BrowserStack tests********************************************' - -$vstest = (Resolve-Path "D:\a\_temp\VsTest\Microsoft.TestPlatform*\tools\net*\Common*\IDE\Extensions\TestPlatform\vstest.console.exe").ToString() -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "https://$($env:MAPPED_ENV_BROWSERSTACKUSER):$($env:MAPPED_ENV_BROWSERSTACKKEY)@hub-cloud.browserstack.com/wd/hub" +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "https://$($env:MAPPED_ENV_BROWSERSTACKUSER):$($env:MAPPED_ENV_BROWSERSTACKKEY)@hub-cloud.browserstack.com/wd/hub" -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "buildName" "Ocaramba.Tests.BrowserStackCrossBrowser$($env:BuildVersion)" -logValues +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "buildName" "Ocaramba.Tests.BrowserStackCrossBrowser$($env:BuildVersion)" -logValues -& $vstest .\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll ` - --logger:"trx;LogFileName=Ocaramba.Tests.BrowserStack.xml" +vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll \Logger:"trx;LogFileName=Ocaramba.Tests.BrowserStack.xml" if($lastexitcode -ne 0) { From 9d6bbdb66a00b694796980bb41085ad3b8ca5633 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 14:00:25 +0100 Subject: [PATCH 56/75] fixes windows browsestack and grid --- .github/workflows/github-actions.yml | 22 ++++--- ExecutingTestsOnWindowsGithubActions4.ps1 | 2 +- ExecutingTestsOnWindowsGithubActions5.ps1 | 71 +++++++++++++++++++++++ 3 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 ExecutingTestsOnWindowsGithubActions5.ps1 diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 435b923e2..a99b58df2 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -266,15 +266,23 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: dotnet add package Microsoft.TestPlatform + - name: Setup VSTest Path + uses: darenm/Setup-VSTest@v1.2 + - uses: nuget/setup-nuget@v2 + with: + nuget-version: latest - uses: actions/download-artifact@v2 - - shell: powershell - run: ./ExecutingTestsOnWindowsAzure5.ps1 - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() with: - report_paths: '**/Ocaramba.Tests.*.xml' + name: OcarambaBuild + - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ + - run: ./ExecutingTestsOnWindowsGithubActions5.ps1 + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/windows@v2 + if: always() + with: + files: | + D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.NUnitGrid.xml + D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.CloudProviderCrossBrowserGrid.xml test_Stage_RunTestsOnWindowsSaucelabs: runs-on: windows-latest needs: diff --git a/ExecutingTestsOnWindowsGithubActions4.ps1 b/ExecutingTestsOnWindowsGithubActions4.ps1 index 29ca18d3b..0f7712155 100644 --- a/ExecutingTestsOnWindowsGithubActions4.ps1 +++ b/ExecutingTestsOnWindowsGithubActions4.ps1 @@ -6,7 +6,7 @@ echo '********************************************BrowserStack tests************ .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "buildName" "Ocaramba.Tests.BrowserStackCrossBrowser$($env:BuildVersion)" -logValues -vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll \Logger:"trx;LogFileName=Ocaramba.Tests.BrowserStack.xml" +vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll /Logger:"trx;LogFileName=Ocaramba.Tests.BrowserStack.xml" if($lastexitcode -ne 0) { diff --git a/ExecutingTestsOnWindowsGithubActions5.ps1 b/ExecutingTestsOnWindowsGithubActions5.ps1 new file mode 100644 index 000000000..6e2d0ed4d --- /dev/null +++ b/ExecutingTestsOnWindowsGithubActions5.ps1 @@ -0,0 +1,71 @@ +echo '********************************************Downloading Selenium Grid********************************************' + +$url = ${{ env.seleniumGridUrl }} + +$grid = ${{ env.seleniumGridVersion }} + +$output = $PSScriptRoot + ".\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\$grid" + +$outputLogs = $PSScriptRoot + ".\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\" + +$start_time = Get-Date + +echo url: $url +echo grid: $grid +echo output: $output +echo outputLogs: $outputLogs + +echo "Downloading Selenium Grid from: $($url) to $($output)" +Invoke-WebRequest -Uri "$($url)" -Out "$($output)" + +echo "Selenium Grid downloaded to:" $output + +echo "Time taken to download $($grid): $((Get-Date).Subtract($start_time).Seconds) second(s)" + +echo '******************************************Start Selenium Grid in background****************************************' + +$appHub=Start-Process java -ArgumentList '-jar', $output' hub' -RedirectStandardOutput $outputLogs'console_hub.out' -RedirectStandardError $outputLogs'console_hub.err' -passthru + +Start-Sleep -s 5 + +echo "Selenium Grid hub started" + +$appNode=Start-Process java -ArgumentList '-jar', $output' node --detect-drivers true' -RedirectStandardOutput $outputLogs'console_node.out' -RedirectStandardError $outputLogs'console_node.err' -passthru + +Start-Sleep -s 5 + +echo "Selenium Grid node started" + +echo '********************************************Run tests with Selenium Grid ****************************************' + +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\" "Ocaramba.Tests.NUnit.dll.config" "//appSettings" "browser|RemoteWebDriverHub" "RemoteWebDriver|http://localhost:4444/wd/hub" -logValues + +vstest.console.exe .\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"TestCategory=Grid" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.NUnitGrid.xml" + +echo '*****************************Run CloudProviderCrossBrowser tests with Selenium Grid****************************' + +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://localhost:4444/wd/hub" -logValues + +vstest.console.exe .\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll /TestCaseFilter:"FullyQualifiedName~Chrome" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.CloudProviderCrossBrowserGrid.xml" + +if($lastexitcode -ne 0) + { + echo 'lastexitcode' $lastexitcode + } + +echo '*****************************Stop Selenium Grid****************************' + +echo "Stop Selenium Grid node" + +Stop-Process -Id $appNode.Id + +echo "Stop Selenium Grid hub" + +Stop-Process -Id $appHub.Id + +if($lastexitcode -ne 0) + { + echo 'lastexitcode' $lastexitcode + } + +exit 0 From b0161d19e522611cd0304f547f1ccad71ca1366d Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 14:16:59 +0100 Subject: [PATCH 57/75] fixes windows grid --- ExecutingTestsOnWindowsGithubActions5.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ExecutingTestsOnWindowsGithubActions5.ps1 b/ExecutingTestsOnWindowsGithubActions5.ps1 index 6e2d0ed4d..475f72fa5 100644 --- a/ExecutingTestsOnWindowsGithubActions5.ps1 +++ b/ExecutingTestsOnWindowsGithubActions5.ps1 @@ -1,8 +1,8 @@ echo '********************************************Downloading Selenium Grid********************************************' -$url = ${{ env.seleniumGridUrl }} +$url = '${{ env.seleniumGridUrl }}' -$grid = ${{ env.seleniumGridVersion }} +$grid = '${{ env.seleniumGridVersion }}' $output = $PSScriptRoot + ".\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\$grid" From b334fc816ae7d19c76451685df122af3673cb68d Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 14:47:19 +0100 Subject: [PATCH 58/75] fixes windows grid --- ExecutingTestsOnWindowsGithubActions5.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ExecutingTestsOnWindowsGithubActions5.ps1 b/ExecutingTestsOnWindowsGithubActions5.ps1 index 475f72fa5..5845f87b0 100644 --- a/ExecutingTestsOnWindowsGithubActions5.ps1 +++ b/ExecutingTestsOnWindowsGithubActions5.ps1 @@ -1,8 +1,8 @@ echo '********************************************Downloading Selenium Grid********************************************' -$url = '${{ env.seleniumGridUrl }}' +$url = $env:seleniumGridUrl -$grid = '${{ env.seleniumGridVersion }}' +$grid = $env:seleniumGridVersion $output = $PSScriptRoot + ".\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\$grid" From aab2a69bb0095c792e688a81c438760ffca57f21 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 15:13:09 +0100 Subject: [PATCH 59/75] refactor --- .github/workflows/github-actions.yml | 37 +++++++++++++---------- ExecutingTestsOnWindowsGithubActions6.ps1 | 16 ++++++++++ 2 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 ExecutingTestsOnWindowsGithubActions6.ps1 diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index a99b58df2..06aa47004 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -179,9 +179,9 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.trx + files: .\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.trx - name: Zip artifact - run: Compress-Archive -Path D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\TestOutput -Destination ExtentReports_${{ github.run_id }}.zip + run: Compress-Archive -Path .\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\TestOutput -Destination ExtentReports_${{ github.run_id }}.zip - uses: actions/upload-artifact@v2 with: path: ExtentReports_${{ github.run_id }}.zip @@ -209,8 +209,8 @@ jobs: if: always() with: files: | - D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.xml - D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.EdgeChrominum.xml + .\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.xml + .\Ocaramba\TestResults\Ocaramba.Tests.EdgeChrominum.xml test_Stage_RunTestsOnWindowsFramework: runs-on: windows-latest needs: @@ -231,7 +231,7 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.net4.xml + files: .\Ocaramba\TestResults\Ocaramba.Tests.net4.xml test_Stage_RunTestsOnWindowsBrowserStack: runs-on: windows-latest needs: @@ -259,7 +259,7 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.BrowserStack.xml + files: .\Ocaramba\TestResults\Ocaramba.Tests.BrowserStack.xml test_Stage_RunTestsSeleniumGrid: runs-on: windows-latest needs: @@ -281,20 +281,24 @@ jobs: if: always() with: files: | - D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.NUnitGrid.xml - D:\a\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.CloudProviderCrossBrowserGrid.xml + .\Ocaramba\TestResults\Ocaramba.Tests.NUnitGrid.xml + .\Ocaramba\TestResults\Ocaramba.Tests.CloudProviderCrossBrowserGrid.xml test_Stage_RunTestsOnWindowsSaucelabs: runs-on: windows-latest needs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 + - name: Setup VSTest Path + uses: darenm/Setup-VSTest@v1.2 + - uses: nuget/setup-nuget@v2 with: - repository: none - - run: dotnet add package Microsoft.TestPlatform + nuget-version: latest - uses: actions/download-artifact@v2 - - shell: powershell - run: ./ExecutingTestsOnWindowsAzure6.ps1 + with: + name: OcarambaBuild + - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ + - run: ./ExecutingTestsOnWindowsGithubActions6.ps1 env: MAPPED_ENV_BROWSERSTACKKEY: ${{ env.browserstackkey }} MAPPED_ENV_BROWSERSTACKUSER: ${{ env.browserstackuser }} @@ -302,11 +306,12 @@ jobs: MAPPED_ENV_TESTINGBOTSECRET: ${{ env.testingbotsecret }} MAPPED_ENV_SAUCELABSACCESSKEY: ${{ env.saucelabsaccessKey }} MAPPED_ENV_SAUCELABSUSERNAME: ${{ env.saucelabsusername }} - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/windows@v2 + if: always() with: - report_paths: '**/Ocaramba.Tests.*.xml' + files: | + .\Ocaramba\TestResults\Ocaramba.Tests.saucelabsnet472.xml release_Stage_PublishNuget: runs-on: windows-latest needs: diff --git a/ExecutingTestsOnWindowsGithubActions6.ps1 b/ExecutingTestsOnWindowsGithubActions6.ps1 new file mode 100644 index 000000000..b10d76f4d --- /dev/null +++ b/ExecutingTestsOnWindowsGithubActions6.ps1 @@ -0,0 +1,16 @@ +echo '********************************************CloudProviderCrossBrowser tests********************************************' + +echo '********************************************saucelabs tests********************************************' + +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "https://$($env:MAPPED_ENV_SAUCELABSUSERNAME):$($env:MAPPED_ENV_SAUCELABSACCESSKEY)@ondemand.us-west-1.saucelabs.com:443/wd/hub" + +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "buildName" "Ocaramba.Tests.SauceLabsCrossBrowser$($env:BuildVersion)" -logValues + +vstest.console.exe .\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll /TestCaseFilter:"(FullyQualifiedName!~Iphone)&(FullyQualifiedName!~Android)&(FullyQualifiedName!~Samsung)" /Logger:"trx;LogFileName=Ocaramba.Tests.saucelabsnet472.xml" + +if($lastexitcode -ne 0) + { + echo 'lastexitcode' $lastexitcode + } + +exit 0 From 3804690723cb4df4157c658c32bd2e07992f6246 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Thu, 7 Mar 2024 15:41:11 +0100 Subject: [PATCH 60/75] docker fixes --- .github/workflows/github-actions.yml | 25 ++++++++++++++----------- ExecutingTestsOnDockerGithubActions.ps1 | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 ExecutingTestsOnDockerGithubActions.ps1 diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 06aa47004..37e495bce 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -15,6 +15,7 @@ env: frameworkVersion: 4.0.0 CHROMEWEBDRIVER: C:\SeleniumWebDrivers\ChromeDriver BuildVersion: 4.0.0${{ github.run_number }} + ChromeDriverVersion: 122.0.6261.9400 seleniumGridVersion: selenium-server-4.8.0.jar seleniumGridUrl: https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.8.0/selenium-server-4.8.0.jar NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages @@ -37,7 +38,7 @@ jobs: Get-ChildItem ./ *.csproj -recurse | Foreach-Object { $c = ($_ | Get-Content) - $c = $c -replace '109.0.5414.7400','122.0.6261.9400' + $c = $c -replace '109.0.5414.7400','${{ env.ChromeDriverVersion }}' [IO.File]::WriteAllText($_.FullName, ($c -join "`r`n")) } - name: Setup nuget @@ -91,22 +92,24 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: | - docker build --file Dockerfile docker ocaramba/selenium --tags latest - docker push --file Dockerfile docker ocaramba/selenium --tags latest - docker-compose -f "./docker-compose.yml" up -d - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() + - run: docker build --file Dockerfile docker ocaramba/selenium + - run: docker push --file Dockerfile docker ocaramba/selenium + - run: docker-compose -f "./docker-compose.yml" up -d + - shell: pwsh + run: ./ExecutingTestsOnDockerGithubActions.ps1 + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/linux@v2 + if: always() with: - report_paths: '**/Ocaramba.Tests.*.xml' + files: | + /home/runner/work/Ocaramba/Ocaramba/TestResults/Ocaramba.Tests.Docker.xml test_Stage_RunTestsOnLinux: runs-on: ubuntu-latest needs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: find . -name '*.csproj' -exec sed -i -e 's/109.0.5414.7400/122.0.6261.9400/g' {} \; + - run: find . -name '*.csproj' -exec sed -i -e 's/109.0.5414.7400/${{ env.ChromeDriverVersion }}/g' {} \; - run: | ls @@ -181,7 +184,7 @@ jobs: with: files: .\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.trx - name: Zip artifact - run: Compress-Archive -Path .\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\TestOutput -Destination ExtentReports_${{ github.run_id }}.zip + run: Compress-Archive -Path D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\TestOutput -Destination ExtentReports_${{ github.run_id }}.zip - uses: actions/upload-artifact@v2 with: path: ExtentReports_${{ github.run_id }}.zip diff --git a/ExecutingTestsOnDockerGithubActions.ps1 b/ExecutingTestsOnDockerGithubActions.ps1 new file mode 100644 index 000000000..e7e55c474 --- /dev/null +++ b/ExecutingTestsOnDockerGithubActions.ps1 @@ -0,0 +1,18 @@ +docker info + +docker ps -a +docker exec ocaramba_selenium bash -c "ls ; sed -i '/Documentation/,+5 d' ./Ocaramba.sln ; dotnet build ./Ocaramba.sln" +docker exec ocaramba_selenium bash -c 'pwsh ./scripts/set_AppConfig_for_tests.ps1 \"./Ocaramba.Tests.NUnit/bin/Debug/net6.0\" \"appsettings.Linux.json\" \"appSettings\" \"browser|PathToChromeDriverDirectory\" \"Chrome|/chromedriver\" -logValues -json' +docker exec ocaramba_selenium bash -c 'dotnet vstest ./Ocaramba.Tests.NUnit/bin/Debug/net6.0/Ocaramba.Tests.NUnit.dll /TestCaseFilter:\"(TestCategory!=NotImplementedInCoreOrUploadDownload)\" /Parallel --logger:\"trx;LogFileName=Ocaramba.Tests.Docker.xml\"' + +docker cp ocaramba_selenium:/Ocaramba/TestResults/Ocaramba.Tests.Docker.xml . + + +docker rm ocaramba_selenium --force + +if($lastexitcode -ne 0) + { + echo 'lastexitcode' $lastexitcode + } + +exit 0 \ No newline at end of file From 78a4ca3ad5ecaf939cc89ecee98c72cafe1eeee6 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Fri, 8 Mar 2024 12:38:48 +0100 Subject: [PATCH 61/75] docker fixes --- .github/workflows/github-actions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 37e495bce..b7709035d 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -92,9 +92,9 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: docker build --file Dockerfile docker ocaramba/selenium - - run: docker push --file Dockerfile docker ocaramba/selenium - - run: docker-compose -f "./docker-compose.yml" up -d + - run: docker build -t Dockerfile + - run: docker push -t Dockerfile + - run: docker-compose -f docker-compose.yml up -d - shell: pwsh run: ./ExecutingTestsOnDockerGithubActions.ps1 - name: Publish Test Results From 98c04a573c9dcd43236d351b43f30181f23b56bc Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 9 Mar 2024 11:12:53 +0100 Subject: [PATCH 62/75] docker fixes --- .github/workflows/github-actions.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index b7709035d..9a9d73835 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -92,8 +92,12 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: docker build -t Dockerfile - - run: docker push -t Dockerfile + - uses: mr-smithers-excellent/docker-build-push@v6 + name: Build & push Docker image + with: + image: Dockerfile + tags: latest + registry: docker - run: docker-compose -f docker-compose.yml up -d - shell: pwsh run: ./ExecutingTestsOnDockerGithubActions.ps1 From 86d8b7e745fbd4f0e1434189a5289fb42bce74f5 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 9 Mar 2024 11:33:34 +0100 Subject: [PATCH 63/75] docker fixes --- .github/workflows/github-actions.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 9a9d73835..396b8961d 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -92,12 +92,8 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - uses: mr-smithers-excellent/docker-build-push@v6 - name: Build & push Docker image - with: - image: Dockerfile - tags: latest - registry: docker + - run: docker build -f Dockerfile -t ***/selenium:latest + - run: docker push -t Dockerfile - run: docker-compose -f docker-compose.yml up -d - shell: pwsh run: ./ExecutingTestsOnDockerGithubActions.ps1 From 39959580833ddb586cd2a81faceed13da2d57afe Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Sat, 9 Mar 2024 11:48:06 +0100 Subject: [PATCH 64/75] docker fixes --- .github/workflows/github-actions.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 396b8961d..ba60974c7 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -92,7 +92,7 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v2 - - run: docker build -f Dockerfile -t ***/selenium:latest + - run: docker buildx build -f Dockerfile -t ***/selenium:latest - run: docker push -t Dockerfile - run: docker-compose -f docker-compose.yml up -d - shell: pwsh @@ -337,11 +337,18 @@ jobs: Write-Host "##vso[task.setvariable variable=frameworkVersion]$tag" if: startsWith(github.ref, 'refs/tags/') - uses: actions/download-artifact@v2 + with: + name: Ocaramba${{ env.frameworkVersion }} - uses: actions/download-artifact@v2 + with: + name: OcarambaS${{ env.frameworkVersion }} - uses: actions/download-artifact@v2 + with: + name: OcarambaLite${{ env.frameworkVersion }} - uses: actions/download-artifact@v2 - - shell: powershell - run: Get-ChildItem -Path ${{ env.Agent.BuildDirectory }} -Recurse + with: + name: OcarambaLiteS${{ env.frameworkVersion }} + - run: Get-ChildItem -Path ${{ env.Agent.BuildDirectory }} -Recurse - name: Push Nuget Package run: dotnet custom push ${{ env.Agent.BuildDirectory }}\Ocaramba.${{ env.frameworkVersion }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ env.NuGetApiKey }} if: (success() && startsWith(github.ref, 'refs/tags/')) From 767ae09ad86e9d0fecc4fd5426ccd85d3cab5407 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 11 Mar 2024 10:13:00 +0100 Subject: [PATCH 65/75] docker ignore --- .github/workflows/github-actions.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index ba60974c7..e774df42e 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -93,10 +93,12 @@ jobs: steps: - uses: actions/checkout@v2 - run: docker buildx build -f Dockerfile -t ***/selenium:latest + if: false - run: docker push -t Dockerfile + if: false - run: docker-compose -f docker-compose.yml up -d - - shell: pwsh - run: ./ExecutingTestsOnDockerGithubActions.ps1 + - run: ./ExecutingTestsOnDockerGithubActions.ps1 + if: false - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action/linux@v2 if: always() From ebb5a056d07404a3e2e85deb398191d1740c0966 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 11 Mar 2024 13:38:04 +0100 Subject: [PATCH 66/75] docker ignore --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index e774df42e..51c8f7999 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -350,7 +350,7 @@ jobs: - uses: actions/download-artifact@v2 with: name: OcarambaLiteS${{ env.frameworkVersion }} - - run: Get-ChildItem -Path ${{ env.Agent.BuildDirectory }} -Recurse + - run: Get-ChildItem ./ -Recurse - name: Push Nuget Package run: dotnet custom push ${{ env.Agent.BuildDirectory }}\Ocaramba.${{ env.frameworkVersion }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ env.NuGetApiKey }} if: (success() && startsWith(github.ref, 'refs/tags/')) From 7829a226c4741e9e7a230b63aa7cdcf11e575ff0 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 12 Mar 2024 09:03:42 +0100 Subject: [PATCH 67/75] fixing test paths --- .github/workflows/github-actions.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 51c8f7999..952f46868 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -184,7 +184,7 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: .\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.trx + files: .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.trx - name: Zip artifact run: Compress-Archive -Path D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\TestOutput -Destination ExtentReports_${{ github.run_id }}.zip - uses: actions/upload-artifact@v2 @@ -214,8 +214,8 @@ jobs: if: always() with: files: | - .\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.xml - .\Ocaramba\TestResults\Ocaramba.Tests.EdgeChrominum.xml + .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.xml + .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.EdgeChrominum.xml test_Stage_RunTestsOnWindowsFramework: runs-on: windows-latest needs: @@ -236,7 +236,7 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: .\Ocaramba\TestResults\Ocaramba.Tests.net4.xml + files: .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.net4.xml test_Stage_RunTestsOnWindowsBrowserStack: runs-on: windows-latest needs: @@ -264,7 +264,7 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: .\Ocaramba\TestResults\Ocaramba.Tests.BrowserStack.xml + files: .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.BrowserStack.xml test_Stage_RunTestsSeleniumGrid: runs-on: windows-latest needs: @@ -286,8 +286,8 @@ jobs: if: always() with: files: | - .\Ocaramba\TestResults\Ocaramba.Tests.NUnitGrid.xml - .\Ocaramba\TestResults\Ocaramba.Tests.CloudProviderCrossBrowserGrid.xml + .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.NUnitGrid.xml + .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.CloudProviderCrossBrowserGrid.xml test_Stage_RunTestsOnWindowsSaucelabs: runs-on: windows-latest needs: @@ -316,7 +316,7 @@ jobs: if: always() with: files: | - .\Ocaramba\TestResults\Ocaramba.Tests.saucelabsnet472.xml + .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.saucelabsnet472.xml release_Stage_PublishNuget: runs-on: windows-latest needs: From beb1359dda960231eb3c37ec7520e4faea21cf19 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 12 Mar 2024 09:39:01 +0100 Subject: [PATCH 68/75] fixing test paths --- .github/workflows/github-actions.yml | 39 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 952f46868..0d7f57051 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -13,6 +13,7 @@ env: buildPlatform: Any CPU buildConfiguration: Release frameworkVersion: 4.0.0 + TestResultsDirWindows: D:\a\Ocaramba\Ocaramba\TestResults CHROMEWEBDRIVER: C:\SeleniumWebDrivers\ChromeDriver BuildVersion: 4.0.0${{ github.run_number }} ChromeDriverVersion: 122.0.6261.9400 @@ -23,7 +24,7 @@ jobs: build_Stage_BuildTestsOnWindows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: microsoft/setup-msbuild@v1.0.2 - shell: powershell run: | @@ -91,7 +92,7 @@ jobs: needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: docker buildx build -f Dockerfile -t ***/selenium:latest if: false - run: docker push -t Dockerfile @@ -110,7 +111,7 @@ jobs: needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: find . -name '*.csproj' -exec sed -i -e 's/109.0.5414.7400/${{ env.ChromeDriverVersion }}/g' {} \; - run: | ls @@ -137,7 +138,7 @@ jobs: needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: | ls @@ -168,7 +169,7 @@ jobs: needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup VSTest Path uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 @@ -184,7 +185,7 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.trx + files: ${{ env.TestResultsDirWindows }}\Ocaramba.Tests.netcoreapp.trx - name: Zip artifact run: Compress-Archive -Path D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\TestOutput -Destination ExtentReports_${{ github.run_id }}.zip - uses: actions/upload-artifact@v2 @@ -197,7 +198,7 @@ jobs: needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup VSTest Path uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 @@ -214,14 +215,14 @@ jobs: if: always() with: files: | - .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.netcoreapp.xml - .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.EdgeChrominum.xml + ${{ env.TestResultsDirWindows }}\Ocaramba.Tests.netcoreapp.xml + ${{ env.TestResultsDirWindows }}\Ocaramba.Tests.EdgeChrominum.xml test_Stage_RunTestsOnWindowsFramework: runs-on: windows-latest needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup VSTest Path uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 @@ -236,13 +237,13 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.net4.xml + files: ${{ env.TestResultsDirWindows }}\Ocaramba.Tests.net4.xml test_Stage_RunTestsOnWindowsBrowserStack: runs-on: windows-latest needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup VSTest Path uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 @@ -264,13 +265,13 @@ jobs: uses: EnricoMi/publish-unit-test-result-action/windows@v2 if: always() with: - files: .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.BrowserStack.xml + files: ${{ env.TestResultsDirWindows }}\Ocaramba.Tests.BrowserStack.xml test_Stage_RunTestsSeleniumGrid: runs-on: windows-latest needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup VSTest Path uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 @@ -286,14 +287,14 @@ jobs: if: always() with: files: | - .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.NUnitGrid.xml - .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.CloudProviderCrossBrowserGrid.xml + ${{ env.TestResultsDirWindows }}\Ocaramba.Tests.NUnitGrid.xml + ${{ env.TestResultsDirWindows }}\Ocaramba.Tests.CloudProviderCrossBrowserGrid.xml test_Stage_RunTestsOnWindowsSaucelabs: runs-on: windows-latest needs: - build_Stage_BuildTestsOnWindows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup VSTest Path uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 @@ -316,7 +317,7 @@ jobs: if: always() with: files: | - .\Ocaramba\Ocaramba\TestResults\Ocaramba.Tests.saucelabsnet472.xml + ${{ env.TestResultsDirWindows }}\Ocaramba.Tests.saucelabsnet472.xml release_Stage_PublishNuget: runs-on: windows-latest needs: @@ -331,7 +332,7 @@ jobs: - test_Stage_RunTestsSeleniumGrid - test_Stage_RunTestsOnWindowsSaucelabs steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - shell: powershell run: | $tags = git tag --sort=-creatordate From 03405330662b7eb6c3a0c1e5aece052fa1a1fb70 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 12 Mar 2024 10:00:13 +0100 Subject: [PATCH 69/75] updating actions --- .github/workflows/github-actions.yml | 36 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 0d7f57051..1f66bceb8 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -25,7 +25,7 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 - - uses: microsoft/setup-msbuild@v1.0.2 + - uses: microsoft/setup-msbuild@v2 - shell: powershell run: | $tags = git tag --sort=-creatordate @@ -47,7 +47,7 @@ jobs: with: nuget-version: latest - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ github.workspace }}\.nuget\packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} #hash of project files @@ -63,25 +63,25 @@ jobs: "**/Ocaramba.csproj", "**/OcarambaLite.csproj" version: ${{ env.frameworkVersion }} - run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' /v:minimal - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: ./Ocaramba/bin/Release/Ocaramba.${{ env.frameworkVersion }}.nupkg name: Ocaramba${{ env.frameworkVersion }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: ./Ocaramba/bin/Release/Ocaramba.${{ env.frameworkVersion }}.snupkg name: OcarambaS${{ env.frameworkVersion }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: ./OcarambaLite/bin/Release/OcarambaLite.${{ env.frameworkVersion }}.nupkg name: OcarambaLite${{ env.frameworkVersion }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: ./OcarambaLite/bin/Release/OcarambaLite.${{ env.frameworkVersion }}.snupkg name: OcarambaLiteS${{ env.frameworkVersion }} - name: Zip artifact for deployment run: Compress-Archive -Path ./ -Destination OcarambaBuild.zip - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: OcarambaBuild.zip name: OcarambaBuild @@ -175,7 +175,7 @@ jobs: - uses: nuget/setup-nuget@v2 with: nuget-version: latest - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ @@ -188,7 +188,7 @@ jobs: files: ${{ env.TestResultsDirWindows }}\Ocaramba.Tests.netcoreapp.trx - name: Zip artifact run: Compress-Archive -Path D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\TestOutput -Destination ExtentReports_${{ github.run_id }}.zip - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: ExtentReports_${{ github.run_id }}.zip name: ExtentTestReport @@ -204,7 +204,7 @@ jobs: - uses: nuget/setup-nuget@v2 with: nuget-version: latest - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ @@ -228,7 +228,7 @@ jobs: - uses: nuget/setup-nuget@v2 with: nuget-version: latest - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ @@ -249,7 +249,7 @@ jobs: - uses: nuget/setup-nuget@v2 with: nuget-version: latest - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ @@ -277,7 +277,7 @@ jobs: - uses: nuget/setup-nuget@v2 with: nuget-version: latest - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ @@ -300,7 +300,7 @@ jobs: - uses: nuget/setup-nuget@v2 with: nuget-version: latest - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: OcarambaBuild - run: Expand-Archive -Path OcarambaBuild.zip -DestinationPath ./ @@ -339,16 +339,16 @@ jobs: $tag = $tags[0] Write-Host "##vso[task.setvariable variable=frameworkVersion]$tag" if: startsWith(github.ref, 'refs/tags/') - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: Ocaramba${{ env.frameworkVersion }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: OcarambaS${{ env.frameworkVersion }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: OcarambaLite${{ env.frameworkVersion }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: OcarambaLiteS${{ env.frameworkVersion }} - run: Get-ChildItem ./ -Recurse From 55163951b5e0e4a5a9634882df9948ea37b4af12 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 12 Mar 2024 10:18:39 +0100 Subject: [PATCH 70/75] rolling back to dotnet vstest --- ExecutingTestsOnWindowsGithubActions1.ps1 | 6 +++--- ExecutingTestsOnWindowsGithubActions2.ps1 | 4 ++-- ExecutingTestsOnWindowsGithubActions3.ps1 | 2 +- ExecutingTestsOnWindowsGithubActions4.ps1 | 2 +- ExecutingTestsOnWindowsGithubActions5.ps1 | 4 ++-- ExecutingTestsOnWindowsGithubActions6.ps1 | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 index bb6c38b53..5d4161201 100644 --- a/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -6,13 +6,13 @@ echo '********************************************net6.0 tests****************** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json -vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" echo '********************************************net472 tests********************************************' -#.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "appsettings.json" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues +.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "appsettings.json" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -#vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll /Logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll /Logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" if($lastexitcode -ne 0) { echo 'lastexitcode' $lastexitcode diff --git a/ExecutingTestsOnWindowsGithubActions2.ps1 b/ExecutingTestsOnWindowsGithubActions2.ps1 index 2e001f8e4..47b1e1d0d 100644 --- a/ExecutingTestsOnWindowsGithubActions2.ps1 +++ b/ExecutingTestsOnWindowsGithubActions2.ps1 @@ -7,7 +7,7 @@ echo '********************************************net6.0 tests****************** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -json -vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0\Ocaramba.Tests.Features.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0\Ocaramba.Tests.Xunit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0\Ocaramba.Tests.MsTest.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0\Ocaramba.UnitTests.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net6.0\Ocaramba.Tests.Features.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Xunit\bin\Release\net6.0\Ocaramba.Tests.Xunit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.MsTest\bin\Release\net6.0\Ocaramba.Tests.MsTest.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net6.0\Ocaramba.UnitTests.dll /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" echo '********************************************EdgeChrominum tests********************************************' @@ -15,7 +15,7 @@ echo '********************************************EdgeChrominum tests*********** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|C:\SeleniumWebDrivers\EdgeDriver" -logValues -json -vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory=Grid)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.EdgeChrominum.xml" +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory=Grid)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.EdgeChrominum.xml" if($lastexitcode -ne 0) { diff --git a/ExecutingTestsOnWindowsGithubActions3.ps1 b/ExecutingTestsOnWindowsGithubActions3.ps1 index a03ae2418..24e1eb2c1 100644 --- a/ExecutingTestsOnWindowsGithubActions3.ps1 +++ b/ExecutingTestsOnWindowsGithubActions3.ps1 @@ -7,7 +7,7 @@ echo '********************************************net472 tests****************** .\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net472" "Ocaramba.UnitTests.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net472\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\Ocaramba.Tests.NUnit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net472\Ocaramba.UnitTests.dll /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.net4.xml" +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release\net472\Ocaramba.Tests.Angular.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\Ocaramba.Tests.NUnit.dll D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.UnitTests\bin\Release\net472\Ocaramba.UnitTests.dll /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.net4.xml" if($lastexitcode -ne 0) diff --git a/ExecutingTestsOnWindowsGithubActions4.ps1 b/ExecutingTestsOnWindowsGithubActions4.ps1 index 0f7712155..da149ef78 100644 --- a/ExecutingTestsOnWindowsGithubActions4.ps1 +++ b/ExecutingTestsOnWindowsGithubActions4.ps1 @@ -6,7 +6,7 @@ echo '********************************************BrowserStack tests************ .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "buildName" "Ocaramba.Tests.BrowserStackCrossBrowser$($env:BuildVersion)" -logValues -vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll /Logger:"trx;LogFileName=Ocaramba.Tests.BrowserStack.xml" +dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll /Logger:"trx;LogFileName=Ocaramba.Tests.BrowserStack.xml" if($lastexitcode -ne 0) { diff --git a/ExecutingTestsOnWindowsGithubActions5.ps1 b/ExecutingTestsOnWindowsGithubActions5.ps1 index 5845f87b0..3e7b54aa1 100644 --- a/ExecutingTestsOnWindowsGithubActions5.ps1 +++ b/ExecutingTestsOnWindowsGithubActions5.ps1 @@ -40,13 +40,13 @@ echo '********************************************Run tests with Selenium Grid * .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\" "Ocaramba.Tests.NUnit.dll.config" "//appSettings" "browser|RemoteWebDriverHub" "RemoteWebDriver|http://localhost:4444/wd/hub" -logValues -vstest.console.exe .\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"TestCategory=Grid" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.NUnitGrid.xml" +dotnet vstest .\Ocaramba\Ocaramba.Tests.NUnit\bin\Release\net472\Ocaramba.Tests.NUnit.dll /TestCaseFilter:"TestCategory=Grid" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.NUnitGrid.xml" echo '*****************************Run CloudProviderCrossBrowser tests with Selenium Grid****************************' .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://localhost:4444/wd/hub" -logValues -vstest.console.exe .\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll /TestCaseFilter:"FullyQualifiedName~Chrome" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.CloudProviderCrossBrowserGrid.xml" +dotnet vstest .\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll /TestCaseFilter:"FullyQualifiedName~Chrome" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.CloudProviderCrossBrowserGrid.xml" if($lastexitcode -ne 0) { diff --git a/ExecutingTestsOnWindowsGithubActions6.ps1 b/ExecutingTestsOnWindowsGithubActions6.ps1 index b10d76f4d..c726c37a0 100644 --- a/ExecutingTestsOnWindowsGithubActions6.ps1 +++ b/ExecutingTestsOnWindowsGithubActions6.ps1 @@ -6,7 +6,7 @@ echo '********************************************saucelabs tests*************** .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472" "Ocaramba.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "buildName" "Ocaramba.Tests.SauceLabsCrossBrowser$($env:BuildVersion)" -logValues -vstest.console.exe .\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll /TestCaseFilter:"(FullyQualifiedName!~Iphone)&(FullyQualifiedName!~Android)&(FullyQualifiedName!~Samsung)" /Logger:"trx;LogFileName=Ocaramba.Tests.saucelabsnet472.xml" +dotnet vstest .\Ocaramba\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll /TestCaseFilter:"(FullyQualifiedName!~Iphone)&(FullyQualifiedName!~Android)&(FullyQualifiedName!~Samsung)" /Logger:"trx;LogFileName=Ocaramba.Tests.saucelabsnet472.xml" if($lastexitcode -ne 0) { From ba059ce4c8cd9625da2c90d6893c7c883b2b4cde Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 12 Mar 2024 10:50:07 +0100 Subject: [PATCH 71/75] rolling back to dotnet vstest --- ExecutingTestsOnWindowsGithubActions1.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ExecutingTestsOnWindowsGithubActions1.ps1 b/ExecutingTestsOnWindowsGithubActions1.ps1 index 5d4161201..757632b7d 100644 --- a/ExecutingTestsOnWindowsGithubActions1.ps1 +++ b/ExecutingTestsOnWindowsGithubActions1.ps1 @@ -10,9 +10,9 @@ dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Angular\bin\Release echo '********************************************net472 tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "appsettings.json" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues +#.\scripts\set_AppConfig_for_tests.ps1 "D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472" "Ocaramba.Tests.Features.dll.config" "appsettings.json" "browser|PathToChromeDriverDirectory" "Chrome|C:\SeleniumWebDrivers\ChromeDriver" -logValues -dotnet vstest D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll /Logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" +#vstest.console.exe D:\a\Ocaramba\Ocaramba\Ocaramba\Ocaramba.Tests.Features\bin\Release\net472\Ocaramba.Tests.Features.dll /Logger:"trx;LogFileName=Ocaramba.Tests.Features.trx" if($lastexitcode -ne 0) { echo 'lastexitcode' $lastexitcode From 1a46a2153c8c218348cce362306f688659d70a47 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 12 Mar 2024 12:26:26 +0100 Subject: [PATCH 72/75] rolling back to dotnet vstest --- .github/workflows/github-actions.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 1f66bceb8..e2723d9e7 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -102,7 +102,7 @@ jobs: if: false - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action/linux@v2 - if: always() + if: false with: files: | /home/runner/work/Ocaramba/Ocaramba/TestResults/Ocaramba.Tests.Docker.xml @@ -128,7 +128,7 @@ jobs: run: ./ExecutingTestsOnLinuxAzure.ps1 - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action/linux@v2 - if: always() + if: false with: files: | /home/runner/work/Ocaramba/Ocaramba/TestResults/Ocaramba.Tests.netcoreapp.xml @@ -170,8 +170,6 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v4 - - name: Setup VSTest Path - uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 with: nuget-version: latest @@ -199,8 +197,6 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v4 - - name: Setup VSTest Path - uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 with: nuget-version: latest @@ -223,8 +219,6 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v4 - - name: Setup VSTest Path - uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 with: nuget-version: latest @@ -244,8 +238,6 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v4 - - name: Setup VSTest Path - uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 with: nuget-version: latest @@ -272,8 +264,6 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v4 - - name: Setup VSTest Path - uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 with: nuget-version: latest @@ -295,8 +285,6 @@ jobs: - build_Stage_BuildTestsOnWindows steps: - uses: actions/checkout@v4 - - name: Setup VSTest Path - uses: darenm/Setup-VSTest@v1.2 - uses: nuget/setup-nuget@v2 with: nuget-version: latest From c9a02e7efdd8c14ca543da435c260861ccb9ac97 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 12 Mar 2024 13:34:34 +0100 Subject: [PATCH 73/75] updating readme --- .github/workflows/github-actions.yml | 2 +- README.md | 51 ++++++++++++++-------------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index e2723d9e7..70f2492d5 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -160,7 +160,7 @@ jobs: run: ./ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action/linux@v2 - if: always() + if: false with: files: | /home/runner/work/Ocaramba/Ocaramba/TestResults/BrowserStacknetcoreapp.xml diff --git a/README.md b/README.md index fa41f75bd..640aa833f 100644 --- a/README.md +++ b/README.md @@ -5,49 +5,48 @@ [![Ocaramba Templates](https://img.shields.io/badge/get-Ocaramba_Templates-green.svg?color=4BC21F)](https://marketplace.visualstudio.com/items?itemName=Ocaramba.Ocaramba1) [![Build status](https://ci.appveyor.com/api/projects/status/p8p3bndotyknv7rk?svg=true)](https://ci.appveyor.com/project/ObjectivityAdminsTeam/ocaramba) -[![Build Status](https://dev.azure.com/ocaramba/Ocaramba/_apis/build/status/ObjectivityLtd.Ocaramba)](https://dev.azure.com/ocaramba/Ocaramba/_build/latest?definitionId=2) -[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/ocaramba/Ocaramba/2)](https://dev.azure.com/ocaramba/Ocaramba/_build?definitionId=2) +[![Build status](https://github.com/Accenture/Ocaramba/actions/workflows/github-actions.yml/badge.svg) [![BrowserStack Status](https://automate.browserstack.com/badge.svg?badge_key=LzcxRG9pYjdqMWF0SG5OTzVYcHJmdkVDVzdzVEZvSnUwNHB6MDJjRkFtZz0tLVQ5NHNtQkllOFQzOXl6T3BiOHFzZFE9PQ==--be558d9ee42bf47757e26a14b2848c8eccecf751)](https://automate.browserstack.com/public-build/LzcxRG9pYjdqMWF0SG5OTzVYcHJmdkVDVzdzVEZvSnUwNHB6MDJjRkFtZz0tLVQ5NHNtQkllOFQzOXl6T3BiOHFzZFE9PQ==--be558d9ee42bf47757e26a14b2848c8eccecf751) [![Build Status](https://saucelabs.com/buildstatus/jraczek)](https://saucelabs.com/beta/builds/8de234710c7c46f1b5d0e9c9438e5d06) Test Framework was designed in Objectivity to propose a common way how people should create Selenium WebDriver tests. -Project API documentation can be found here: http://objectivityltd.github.io/Ocaramba

+Project API documentation can be found here: http://Accenture.github.io/Ocaramba

- + **It provides the following features:** - .NET Frameworks 4.7.2 and .NET 6.0 supported - Cross-Platform Windows, Linux and macOS systems supported - Supports continuous integration tools like Azure DevOps, Teamcity, Jenkins and others. -- Ready for parallel tests execution, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Selenium%20Parallel%20tests%20execution) +- Ready for parallel tests execution, more details [here](https://github.com/Accenture/Ocaramba/wiki/Selenium%20Parallel%20tests%20execution) - Possibility to use MSTest, NUnit or xUNIT framework - Specflow ready - Written entirely in C# - Contains example projects how to use it - Allows using Chrome, Firefox, Edge Chromium, Safari or Internet Explorer -- Overrides browser profile preferences, pass arguments to browsers, installs browser extensions, loading default firefox profile, Headless mode, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Override-browser-profile-preferences,-install-browser-extensions,-Headless-mode) -- Extends Webdriver by additional methods like JavaScriptClick, WaitForAjax, WaitForAngular, etc., more details [here](http://objectivityltd.github.io/Ocaramba/html/d51aa97e-08b5-c0b6-6987-c10545a64ebd.htm) -- Automatically waits when locating element for specified time and conditions, GetElement method instead of Selenium FindElement, more details [here](http://objectivityltd.github.io/Ocaramba/html/3c09ca99-f931-c6c9-98fc-194eff6500ff.htm) +- Overrides browser profile preferences, pass arguments to browsers, installs browser extensions, loading default firefox profile, Headless mode, more details [here](https://github.com/Accenture/Ocaramba/wiki/Override-browser-profile-preferences,-install-browser-extensions,-Headless-mode) +- Extends Webdriver by additional methods like JavaScriptClick, WaitForAjax, WaitForAngular, etc., more details [here](http://Accenture.github.io/Ocaramba/html/d51aa97e-08b5-c0b6-6987-c10545a64ebd.htm) +- Automatically waits when locating element for specified time and conditions, GetElement method instead of Selenium FindElement, more details [here](http://Accenture.github.io/Ocaramba/html/3c09ca99-f931-c6c9-98fc-194eff6500ff.htm) - Page Object Pattern -- Support for [SeleniumGrid](https://github.com/SeleniumHQ/selenium/wiki/Grid2), [Cross browser parallel test execution](https://github.com/ObjectivityLtd/Ocaramba/wiki/Cross-browser-parallel-test-execution-with-SeleniumGrid-or-testing-Cloud-Providers) with [SauceLab](https://saucelabs.com/), [TestingBot](https://testingbot.com) and [Browserstack](https://www.browserstack.com/) more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Selenium-Grid-support), Advanced Browser Capabilities and Options more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Advanced-Browser-Capabilities-and-options) -- More common locators, e.g: ```"//*[@title='{0}' and @ms.title='{1}']"```, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/More%20common%20locators) -- Verify - asserts without stop tests, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Verify-asserts-without-stop-tests) -- Measures average and 90 Percentile action times, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Performance%20measures) -- DataDriven tests from Xml, Csv and Excel files for NUnit and Xml, Csv for MSTest with examples, more details [NUnit](https://github.com/ObjectivityLtd/Ocaramba/wiki/NUnit-DataDriven-tests-from-Xml,-CSV-and-Excel-files), [MsTest](https://github.com/ObjectivityLtd/Ocaramba/wiki/MsTest-DataDriven-tests-from-Xml-and-CSV-files) -- Possibility to take full desktop (only .NET Framework), save page source, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Screen-shots---full-desktop---selenium---PageSource-saving) -- Visual Testing - browser screenshot of the element, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Visual-Testing) -- Logging with NLog, EventFiringWebDriver logs, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Logging) -- Files downloading (Firefox, Chrome), more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Downloading%20files) -- Possibility to send [SQL](http://objectivityltd.github.io/Ocaramba/html/730c92c7-831a-4449-3938-16540cf259b8.htm) or [MDX](http://objectivityltd.github.io/Ocaramba/html/7de319df-06eb-1c79-8c2d-9c60aaf3ab85.htm) queries (only .NET Framework) -- Possibility of debugging framework installed from nuget package with [sourcelink](https://github.com/dotnet/sourcelink), more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Debugging-Test.Automation-framework). -- AngularJS support, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Angular-support). -- Possibility to check for JavaScript errors from the browser, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Verifying-Javascript-Errors-from-browser). -- Instruction on how to run Ocaramba tests with Docker container, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Run-Ocaramba-tests-with-Docker-container). -- ExtentReports support, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/ExtentReports-Support). - -For all documentation, visit the [Ocaramba Wiki](https://github.com/ObjectivityLtd/Ocaramba/wiki). +- Support for [SeleniumGrid](https://github.com/SeleniumHQ/selenium/wiki/Grid2), [Cross browser parallel test execution](https://github.com/Accenture/Ocaramba/wiki/Cross-browser-parallel-test-execution-with-SeleniumGrid-or-testing-Cloud-Providers) with [SauceLab](https://saucelabs.com/), [TestingBot](https://testingbot.com) and [Browserstack](https://www.browserstack.com/) more details [here](https://github.com/Accenture/Ocaramba/wiki/Selenium-Grid-support), Advanced Browser Capabilities and Options more details [here](https://github.com/Accenture/Ocaramba/wiki/Advanced-Browser-Capabilities-and-options) +- More common locators, e.g: ```"//*[@title='{0}' and @ms.title='{1}']"```, more details [here](https://github.com/Accenture/Ocaramba/wiki/More%20common%20locators) +- Verify - asserts without stop tests, more details [here](https://github.com/Accenture/Ocaramba/wiki/Verify-asserts-without-stop-tests) +- Measures average and 90 Percentile action times, more details [here](https://github.com/Accenture/Ocaramba/wiki/Performance%20measures) +- DataDriven tests from Xml, Csv and Excel files for NUnit and Xml, Csv for MSTest with examples, more details [NUnit](https://github.com/Accenture/Ocaramba/wiki/NUnit-DataDriven-tests-from-Xml,-CSV-and-Excel-files), [MsTest](https://github.com/Accenture/Ocaramba/wiki/MsTest-DataDriven-tests-from-Xml-and-CSV-files) +- Possibility to take full desktop (only .NET Framework), save page source, more details [here](https://github.com/Accenture/Ocaramba/wiki/Screen-shots---full-desktop---selenium---PageSource-saving) +- Visual Testing - browser screenshot of the element, more details [here](https://github.com/Accenture/Ocaramba/wiki/Visual-Testing) +- Logging with NLog, EventFiringWebDriver logs, more details [here](https://github.com/Accenture/Ocaramba/wiki/Logging) +- Files downloading (Firefox, Chrome), more details [here](https://github.com/Accenture/Ocaramba/wiki/Downloading%20files) +- Possibility to send [SQL](http://Accenture.github.io/Ocaramba/html/730c92c7-831a-4449-3938-16540cf259b8.htm) or [MDX](http://Accenture.github.io/Ocaramba/html/7de319df-06eb-1c79-8c2d-9c60aaf3ab85.htm) queries (only .NET Framework) +- Possibility of debugging framework installed from nuget package with [sourcelink](https://github.com/dotnet/sourcelink), more details [here](https://github.com/Accenture/Ocaramba/wiki/Debugging-Test.Automation-framework). +- AngularJS support, more details [here](https://github.com/Accenture/Ocaramba/wiki/Angular-support). +- Possibility to check for JavaScript errors from the browser, more details [here](https://github.com/Accenture/Ocaramba/wiki/Verifying-Javascript-Errors-from-browser). +- Instruction on how to run Ocaramba tests with Docker container, more details [here](https://github.com/Accenture/Ocaramba/wiki/Run-Ocaramba-tests-with-Docker-container). +- ExtentReports support, more details [here](https://github.com/Accenture/Ocaramba/wiki/ExtentReports-Support). + +For all documentation, visit the [Ocaramba Wiki](https://github.com/Accenture/Ocaramba/wiki). Projects examples of using Test Framework : - Ocaramba.Tests.Angular for AngularJS @@ -127,7 +126,7 @@ namespace Ocaramba.Tests.PageObjects.PageObjects.TheInternet #### Where to start? ------------- -- See [Getting started](https://github.com/ObjectivityLtd/Ocaramba/wiki/Getting%20started). +- See [Getting started](https://github.com/Accenture/Ocaramba/wiki/Getting%20started). Checkout the code or get it from [nuget.org](https://www.nuget.org/packages?q=Ocaramba) - Ocaramba [![NuGet Badge](https://buildstats.info/nuget/Ocaramba)](https://www.nuget.org/packages/Ocaramba/) From 6552a15eb8d15359ad66718efc04dc8f65f1a7d9 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 12 Mar 2024 14:00:54 +0100 Subject: [PATCH 74/75] rolling back linux azure changes --- ExecutingTestsOnLinuxAzure.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ExecutingTestsOnLinuxAzure.ps1 b/ExecutingTestsOnLinuxAzure.ps1 index 8cba7c6be..f43711584 100644 --- a/ExecutingTestsOnLinuxAzure.ps1 +++ b/ExecutingTestsOnLinuxAzure.ps1 @@ -5,13 +5,15 @@ echo '********************************************net6.0 tests****************** $Env:ASPNETCORE_ENVIRONMENT="Linux" echo $Env:ASPNETCORE_ENVIRONMENT -#.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -dotnet vstest ./Ocaramba.Tests.NUnit/bin/Release/net6.0/Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory!=NotImplementedInCoreOrUploadDownload)" /Parallel /Logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" +dotnet vstest ./Ocaramba.Tests.NUnit/bin/Release/net6.0/Ocaramba.Tests.NUnit.dll ` + /TestCaseFilter:"(TestCategory!=NotImplementedInCoreOrUploadDownload)" /Parallel ` + --logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" if($lastexitcode -ne 0) { echo 'lastexitcode' $lastexitcode } -exit 0 +exit 0 \ No newline at end of file From b57e667d7ab50d2955cafed6870488737d92069d Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 12 Mar 2024 14:03:48 +0100 Subject: [PATCH 75/75] reverting changes from nunitextentreports --- .../Ocaramba.Tests.NUnitExtentReports.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj index 9472d5a23..05a79b814 100644 --- a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj +++ b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj @@ -3,7 +3,6 @@ net6.0 net6.0 - true