I have two solutions: asp.net core app and mstest selenium tests. In github actions I've created a workflow, that firstly runs asp.net project and then runs mstest selenium tests. On ubuntu-latest all's going well, but on windows-latest I getting a "OpenQA.Selenium.WebDriverException: unknown error: net::ERR_CONNECTION_REFUSED".
How I can fix that?
I've added a step that runs "netstat -anb" and netstat doesn't show ports that are specified in lauchSettings.json.
workflow-file:
name: selenium functional tests
on:
pull_request:
branches: [ master ]
jobs:
build-and-test-selenium:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
- name: Install main solution dependencies
run: dotnet restore
working-directory: ./src
- name: Build main solution
run: dotnet build --configuration Release --no-restore
working-directory: ./src
- name: Run main solution
run: |
dotnet run --project Tests --launch-profile https --configuration Release --no-build --no-restore &
netstat -anb
working-directory: ./src
- name: Install test solution dependencies
run: dotnet restore
working-directory: ./tests/
- name: Build test solution
run: dotnet build --configuration Release --no-restore
working-directory: ./tests/
- name: Netstat
run: |
netstat -anb
- name: Test
run: dotnet test --configuration Release --no-build --no-restore
working-directory: ./tests/