Skip to content

Enhance process.bat to start and test applications with proper cleanup#74

Merged
supervoidcoder merged 9 commits intomainfrom
copilot/add-more-ci-tests
Feb 6, 2026
Merged

Enhance process.bat to start and test applications with proper cleanup#74
supervoidcoder merged 9 commits intomainfrom
copilot/add-more-ci-tests

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

Enhances tests/process/process.bat to actively start applications before testing them with win-witr, ensuring reliable tests against actual running processes with proper cleanup.

Test approach:

  • System processes (24 tests): Test always-running Windows processes (winlogon, lsass, explorer, svchost, dwm, RuntimeBroker, SearchIndexer, etc.)
  • Started applications (5 tests): Launch apps, test them, then clean up
    • notepad.exe
    • calc.exe
    • mspaint.exe
    • powershell.exe
    • win-witr.exe (self-lookup)

Implementation pattern:

start /B app.exe           # Launch app in background
timeout /t 1 /nobreak >nul # Wait for app to start
win-witr app.exe          # Test with win-witr
taskkill /F /IM app.exe >nul 2>&1  # Clean up

Total: 29 tests (24 system processes + 5 started applications)

This approach ensures tests run against actual running applications rather than depending on pre-existing processes, with proper cleanup after each test to avoid leaving orphaned processes.

Original prompt

This section details on the original issue you should resolve

<issue_title>more tests</issue_title>
<issue_description>🤤🤤🤤🤤 i want more ci tests but idk what more to test i
already have so manny tests but i want more</issue_description>

<agent_instructions>just add moree miscellanious tests that build.yml will run, just don't touch anything outside the tests folder </agent_instructions>

Comments on the Issue (you are @copilot in this section)

@supervoidcoder @coderabbitai what should we add

💡 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: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Copilot AI changed the title [WIP] Add more miscellaneous tests for CI Add 19 miscellaneous tests covering port lookups, error handling, and edge cases Feb 6, 2026
Copilot AI requested a review from supervoidcoder February 6, 2026 18:17
Copy link
Owner

@supervoidcoder supervoidcoder left a comment

Choose a reason for hiding this comment

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

needs a lot of work

Copy link
Owner

Choose a reason for hiding this comment

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

bro this already exists??? if you want you can add more to the existing process.bat

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in eaca981. You're right, process.bat already tests sequential lookups.

Copy link
Owner

Choose a reason for hiding this comment

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

also already exists, you should look at ALL the existing tests and remove the redundant ones in this pr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in eaca981. help.bat and version.bat already test the short aliases.

$output = & win-witr --help 2>&1 | Out-String

# Check if output contains expected help sections
$hasUsage = $output -match "usage|Usage|USAGE"
Copy link
Owner

Choose a reason for hiding this comment

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

maybe you should look at how the tool even actually works? i said don't touch the c++ file, but you can LOOK at it otherwise this whole pr doesn't make sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in eaca981. Updated to check for the exact output format: "Usage:", "Options:", and "--help" as defined in main.cpp lines 1969-1974.

@supervoidcoder supervoidcoder marked this pull request as ready for review February 6, 2026 18:21
Copilot AI and others added 3 commits February 6, 2026 18:22
Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Copilot AI changed the title Add 19 miscellaneous tests covering port lookups, error handling, and edge cases Add 10 miscellaneous tests covering performance, edge cases, and validation Feb 6, 2026
Copilot AI requested a review from supervoidcoder February 6, 2026 18:25
@supervoidcoder
Copy link
Owner

@copilot y'know what. Why don't you just delete everything you've done. I just want more tests in process.bat

Perhaps even run new apps and run win witr on them

Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 6, 2026

@copilot y'know what. Why don't you just delete everything you've done. I just want more tests in process.bat

Perhaps even run new apps and run win witr on them

Done in 34a9a8d. Removed all new test files and expanded process.bat from 18 to 52 process tests, including Windows system processes (dwm, RuntimeBroker, SearchIndexer, etc.), UI processes (StartMenuExperienceHost, ShellExperienceHost, etc.), and common apps (notepad, calc, taskmgr, browsers, etc.).

Copilot AI changed the title Add 10 miscellaneous tests covering performance, edge cases, and validation Expand process.bat with 34 additional Windows process tests Feb 6, 2026
Copy link
Owner

@supervoidcoder supervoidcoder left a comment

Choose a reason for hiding this comment

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

yeah. im not too sure all the stuff that ci runners have though

Copy link
Owner

Choose a reason for hiding this comment

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

well you gotta START the apps first don't you? i'm pretty sure there's a way to start something in batch and then make it so it immediately continues. in fact you can even install stuff via winget and run it on that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 4e83445. Now starting apps (notepad, calc, mspaint, cmd, powershell, win-witr) with start /B, waiting briefly with timeout, testing them, then cleaning up with taskkill. The pattern: start app → wait 1 sec → test with win-witr → kill app.

Copilot AI and others added 2 commits February 6, 2026 20:22
Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Co-authored-by: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com>
Copilot AI changed the title Expand process.bat with 34 additional Windows process tests Enhance process.bat to start and test applications with proper cleanup Feb 6, 2026
Copilot AI requested a review from supervoidcoder February 6, 2026 20:23
Copy link
Owner

@supervoidcoder supervoidcoder left a comment

Choose a reason for hiding this comment

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

looks :shipit: to :copilot:

@supervoidcoder supervoidcoder merged commit 9d57f22 into main Feb 6, 2026
10 checks passed
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.

more tests

2 participants