Skip to content

Add support for unpackaged Windows apps in TCP tests#68

Merged
mattleibow merged 5 commits intomainfrom
copilot/fix-67
Jun 12, 2025
Merged

Add support for unpackaged Windows apps in TCP tests#68
mattleibow merged 5 commits intomainfrom
copilot/fix-67

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 12, 2025

This PR adds support for unpackaged Windows applications (.exe files) in the TCP test workflow by introducing a new windows test-unpackaged command.

Changes Made

New Command: windows test-unpackaged

  • Purpose: Run TCP tests with unpackaged Windows applications (.exe files)
  • Key differences from packaged apps:
    • No certificate management required
    • No MSIX installation/uninstallation
    • Direct process launch via Process.Start()
    • Simple process termination for cleanup

Implementation Details

  • Added WindowsUnpackagedTestCommand class extending BaseTestCommand
  • Reuses existing TCP listener functionality from the base class
  • Validates input files are .exe extensions
  • Includes proper error handling and cleanup
  • Added comprehensive unit tests

Usage Examples

# Basic usage
devicerunners windows test-unpackaged --app path/to/app.exe

# With custom port
devicerunners windows test-unpackaged --app path/to/app.exe --port 8080

# With custom timeouts
devicerunners windows test-unpackaged --app path/to/app.exe --connection-timeout 60 --data-timeout 45

Testing

  • All existing tests continue to pass (34/34)
  • Added comprehensive test coverage for the new command
  • Validated error handling for missing files and non-exe files
  • Tested JSON output format compatibility

This implementation follows the existing architecture patterns and maintains backward compatibility while providing the requested functionality for unpackaged Windows applications.

Fixes #67.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for unpakcaged Windows apps in the TCP tests Add support for unpackaged Windows apps in TCP tests Jun 12, 2025
Copilot AI requested a review from mattleibow June 12, 2025 09:48
Copy link
Copy Markdown
Owner

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

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

Thins must not be a separate command, just check the extension of the app in the test command and do the different thing.

Also, demonstrate this in a new pipeline

Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 12, 2025

Thins must not be a separate command, just check the extension of the app in the test command and do the different thing.

Also, demonstrate this in a new pipeline

Done! I've refactored the implementation as requested:

  1. Removed separate command: Deleted WindowsUnpackagedTestCommand and combined functionality into the existing windows test command
  2. Extension-based detection: The command now checks Path.GetExtension() and routes to different logic:
    • .exe files → unpackaged app flow (direct process launch, no certificates)
    • .msix files → packaged app flow (existing MSIX logic)
  3. New pipeline: Added test-tcp-windows-unpackaged.yml that publishes as a self-contained .exe and tests it

Key changes in commit 865f599:

  • Modified WindowsTestCommand with ExecuteUnpackagedApp() and ExecutePackagedApp() methods
  • Updated command description to indicate support for both file types
  • Added comprehensive tests for both paths
  • All existing tests pass (32/32)

The command now works seamlessly with both file types using the same windows test command.

…eanup step

Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
@mattleibow mattleibow marked this pull request as ready for review June 12, 2025 15:24
@mattleibow mattleibow merged commit 636bca1 into main Jun 12, 2025
17 of 18 checks passed
@mattleibow mattleibow deleted the copilot/fix-67 branch June 12, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for unpakcaged Windows apps in the TCP tests

2 participants