Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ jobs:
shell: pwsh
command: |
dotnet test `
$env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll `
--logger "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"
--test-modules $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll `
--results-directory $env:AUTOMATED_TESTS_ASSEMBLY_DIR `
Comment on lines +240 to +241
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The test command in the CI workflow uses a glob pattern that looks for a .dll, but the build now produces an .exe, which will cause tests to fail.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The CI workflow command dotnet test --test-modules $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll will fail. The project Files.InteractionTests.csproj has been changed to produce an executable (<OutputType>Exe</OutputType>), resulting in a Files.InteractionTests.exe file. The glob pattern in the test command explicitly searches for a .dll file, which will not match the .exe output. Consequently, the test runner will not find any test modules to execute, causing the test job to fail.

💡 Suggested Fix

Update the glob pattern in the dotnet test command to search for the .exe file instead of the .dll. Change --test-modules $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll to --test-modules $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.exe.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/ci.yml#L240-L241

Potential issue: The CI workflow command `dotnet test --test-modules
$env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll` will fail. The project
`Files.InteractionTests.csproj` has been changed to produce an executable
(`<OutputType>Exe</OutputType>`), resulting in a `Files.InteractionTests.exe` file. The
glob pattern in the test command explicitly searches for a `.dll` file, which will not
match the `.exe` output. Consequently, the test runner will not find any test modules to
execute, causing the test job to fail.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8199804

--report-trx `
--report-trx-filename testResults.trx

- if: github.event_name == 'pull_request'
uses: geekyeggo/delete-artifact@v5
Expand Down
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<MinimalWindowsVersion>10.0.19041.0</MinimalWindowsVersion>
<WindowsSdkPackageVersion>10.0.26100.67-preview</WindowsSdkPackageVersion>
<WindowsTargetFramework>$(TargetFrameworkVersion)-windows$(TargetWindowsVersion)</WindowsTargetFramework>
<EnableMSTestRunner>true</EnableMSTestRunner>
<LangVersion>preview</LangVersion>
</PropertyGroup>
</Project>
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="9.0.9" />
<PackageVersion Include="Appium.WebDriver" Version="4.4.5" />
<PackageVersion Include="Axe.Windows" Version="2.4.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageVersion Include="MSTest.TestAdapter" Version="4.0.2" />
<PackageVersion Include="MSTest.TestFramework" Version="4.0.2" />
<PackageVersion Include="Dongle.GuidRVAGen" Version="1.0.5" />
Expand Down
5 changes: 4 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"sdk": {
"version": "9.0.200",
"version": "10.0.101",
"rollForward": "latestMajor"
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
2 changes: 1 addition & 1 deletion tests/Files.InteractionTests/Files.InteractionTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<Configurations>Debug;Release</Configurations>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Appium.WebDriver" />
<PackageReference Include="Axe.Windows" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest.TestAdapter" />
<PackageReference Include="MSTest.TestFramework" />
</ItemGroup>
Expand Down
Loading