Hand East India to your agent

Prepare your Hyper-V PC once: install East India and download Windows. Then paste the prompt below into your AI, in the repository of the software you want tested, and it does the rest. It asks you whenever it needs something done on the PC.

1Prepare your PC

Install East India

Download EastIndiaDesktop-<version>.msi from the Releases page and install it, naming the folder that will hold your images. Then sign out and in again, so that Windows sees your new group.

Administrator prompt on the PC
msiexec /i EastIndiaDesktop-<version>.msi IMAGEFOLDER=M:\eastindia

Needs Hyper-V and Windows build 26100 or later. Installation has the details.

Download Windows

Every image starts from a Windows installation disc. Download the Windows 11 IoT Enterprise LTSC 2024 evaluation ISO from Microsoft's Evaluation Center, which asks you to register first, and save it in your image folder, where the service looks for Windows discs.

The evaluation edition lasts 90 days

It stops working 90 days after its image is prepared, and endia images warns as that date approaches. Microsoft publishes the ISO's SHA-256 hash, so you can check the download.

2Paste the prompt

Prompt for your coding agent
You are going to test Windows software on Windows virtual machines, using East India.

East India is a service on my Windows PC that runs Hyper-V virtual machines the way Docker runs containers. Images are Windows disks built from recipes called Endiafiles, which use Dockerfile syntax with some differences. Machines come from Compose files. The endia command line follows Docker's commands and options wherever Docker has one.

1. Read both guides before you start:
   https://raw.githubusercontent.com/teaToolkit/EastIndia/main/docs/using-eastindia.md
   https://raw.githubusercontent.com/teaToolkit/EastIndia/main/docs/testing-windows-apps.md

2. Connect to the service.
   - If you are running on the Windows PC itself, run: endia version
   - If you are in a Docker sandbox, download endia-linux-x64 from
     https://github.com/teaToolkit/EastIndia/releases and put it on your PATH as endia.
     Tell me your sandbox's name (run hostname) and ask me to run these on the PC:
       sbx policy allow network --sandbox <sandbox> localhost:7443
       endia context export <sandbox>
     and to copy the .eastindiacontext file into your workspace as a file.
     Then run:
       endia context import pc <sandbox>.eastindiacontext
       endia context use pc
       endia version
     and delete the file.

3. Run endia images. If there is no Windows root image yet, make one:
   - Ask me for the name of the Windows ISO in my image folder, and for the
     password the machines' accounts should use.
   - Run endia base prepare with --password-stdin, as the guide shows.
     It takes about half an hour.

4. Build images for the application in this repository, in two layers:
   - A tools layer FROM the root image, with the runtimes the application
     needs and the registry line from the guide that lets you answer
     elevation prompts.
   - An application layer FROM the tools layer. East India makes one layer
     per stage, so keep slow steps in the tools layer.

5. Test the application:
   - Write a compose.yaml. Give each run its own project name, and always
     remove the fleet afterwards with endia compose -p <run> down -v,
     whether the test passed or not.
   - Drive the application's desktop, take screenshots and collect its logs.

6. Report what you checked, what passed and what failed, with the screenshots
   and logs as evidence.

3Answer your agent's questions

If there is no Windows image yet, your agent asks you which ISO in your image folder to use, and for a password for the machines' two accounts: testuser, signed in automatically, and testadmin, whose password answers elevation prompts. The password must meet Windows' own rules.

An agent in a Docker sandbox also asks you to allow its sandbox's network access to the service and to authorise it with a client certificate: two commands on the PC and one file copied into the sandbox. Its access lasts until the certificate expires after 365 days, or until you remove it.

Copy the context file into the sandbox as a file

The service checks the certificate itself, so the encrypted connection must reach it unopened. A sandbox secret makes the sandbox's proxy open the connection instead.

Image layers

Each image is a disk of differences over its parent, so one Windows disk serves every image built on it. Your agent builds three layers, each sitting on the one below, slowest at the bottom.

  • Application layer rebuilt when your software changes

    Your software and its settings. For a build that changes on every run, your agent can copy it into a running machine instead.

  • Tools layer rebuilt rarely

    The runtimes and Windows settings every test needs, including the line that shows elevation prompts on the normal desktop.

  • Windows root image prepared once from the ISO · about half an hour

    Windows, East India's own programs and an SSH server, with Windows Update turned off.

Each stage is one layer

Docker caches each instruction. East India makes one layer for each stage of a recipe, because each layer costs a Windows shutdown and start. Any change to a stage rebuilds all of it, so slow steps belong in an early stage. Layers, stages and the build cache

Results

A report of what the agent checked, what passed and what failed, with screenshots and logs as evidence. The machines are gone afterwards; the images stay for the next run. To try more, see the examples of what to ask.