winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

[Tech Debt]: No E2E tests for UpgradeCommand

Open Trenly opened this issue 3 years ago • 0 comments

Description of the new feature / enhancement

There are currently E2E tests for Install, Search, Import, and many other core functionalities of winget in the project AppInstallerCLIE2ETests. Notably, there are no tests for the Upgrade command.

As the application matures and upgrade scenarios become more complex, end to end tests should be implemented to ensure upgradeability is maintained.

Proposed technical implementation details

Possible tests could include -

  • Show upgrades when . . .
    • No upgrades available
    • New version available with no installer types matching system requirements
    • Upgrade available, no unknown versions
    • Upgrade available, with unknown versions
    • Upgrade available, with unknown versions and --include-unknown
  • Result of upgrading when . . .
    • --location is used
    • --all is used, with unknown versions
    • --all is used, with unknown versions and --include-unknown
    • Package is MSI
    • Package is MSIX/APPX
    • Package is EXE
    • Package is standalone/portable app
    • Package is a zipped installer

Trenly avatar Feb 24 '22 21:02 Trenly