Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UITestMethods fail in GitHub Actions CI #4581

Open
1 of 3 tasks
mikebattista opened this issue Jul 26, 2022 · 0 comments
Open
1 of 3 tasks

UITestMethods fail in GitHub Actions CI #4581

mikebattista opened this issue Jul 26, 2022 · 0 comments
Assignees
Labels
bug The issue relates to the wizard not working or a problem with the generated code.

Comments

@mikebattista
Copy link
Collaborator

mikebattista commented Jul 26, 2022

Describe the bug

UITestMethods fail in GitHub Actions CI (and possibly others). Commenting out UITestMethods allows the test pass to run and succeed. The same project with UITestMethods works fine when run locally in VS and from the CLI with the same commands used in the pipeline.

See additional context below for the exception. Working with the MSTest team on this as it may be a platform issue.

To Reproduce

https://github.com/mikebattista/TemplateStudio-MSTest-CI-RC

Fail with UITestMethod: https://github.com/mikebattista/TemplateStudio-MSTest-CI-RC/actions/runs/2735417690
Pass without UITestMethod: https://github.com/mikebattista/TemplateStudio-MSTest-CI-RC/actions/runs/2735455045

The pipeline is using the windows-latest Microsoft-hosted agent.

Additional context

& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" ${env:Test_Project_Name}\bin\x64\Debug\**\${env:Test_Project_Name}.dll
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    Solution_Name: App1.sln
    Project_Name: App1
    Test_Project_Name: App1.Tests.MSTest
    DOTNET_ROOT: C:\Users\runneradmin\AppData\Local\Microsoft\dotnet
Microsoft (R) Test Execution Command Line Tool Version 17.2.0-preview-20220401-07 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
The active test run was aborted. Reason: Test host process crashed

Test Run Aborted with error System.AggregateException: One or more errors occurred. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int[3](https://github.com/mikebattista/TemplateStudio-MSTest-CI-RC/runs/7510971867?check_suite_focus=true#step:7:3)2 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.IO.Stream.ReadByte()
   at System.IO.BinaryReader.ReadByte()
   at System.IO.BinaryReader.Read[7](https://github.com/mikebattista/TemplateStudio-MSTest-CI-RC/runs/7510971867?check_suite_focus=true#step:7:7)BitEncodedInt()
   at System.IO.BinaryReader.ReadString()
   at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable()
   at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action`1 errorHandler, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---.
Error: Process completed with exit code 1.

Applies to the following platforms:

  • WinUI
  • WPF
  • UWP

About your setup

  • Visual Studio Version:
  • Template Studio Wizard Version:
  • Windows Build:
@mikebattista mikebattista added the bug The issue relates to the wizard not working or a problem with the generated code. label Jul 26, 2022
@mikebattista mikebattista added this to the 5.2 milestone Jul 26, 2022
@mikebattista mikebattista self-assigned this Jul 26, 2022
@mikebattista mikebattista modified the milestones: 5.2, 5.3 Jul 27, 2022
@mikebattista mikebattista removed this from the 5.4 milestone May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue relates to the wizard not working or a problem with the generated code.
Projects
None yet
Development

No branches or pull requests

1 participant