Skip to content

Set up TestDriver #30

Open
Open

Description

@testdriverai

@testdriverai let's get TestDriver set up in this repo.

Create some short, sample tests for the app this repo represents. Target the production environment and use example credentials or fixtures if you can find them.

Make a pull request with your example tests.

Activity

  1. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Exploring App Testing

    I'm currently focused on testing different application paths. Specifically, I'm checking the functionality of run_local_app, and considering testing challenges/birdsbirdbirds and challenges/glitch-invaders. Also, I am trying to determine if the microhackathon website exists and if the apps in this repo are the challenges. I noticed the user prompt starts with "Title".

  2. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Investigating Run Command

    I'm currently looking into how challenges/birdsbirdbirds/setup or challenges/glitch-invaders/setup might run. I'm also examining the function run_local_app. It executes a shell command, then waits on a local port. I think I'm on the right track!

  3. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Observing Configuration Guidance

    I'm now carefully examining the instructions regarding the use of @canary for sandbox CLI invocations. I'm taking special note of the distinction between using @canary in a sandbox environment and @stable in committed workflows. I'm focusing on the configuration details for .github to remain compliant with this guidance.

  4. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Analyzing Test Requirements

    I'm currently dissecting the prompt to pinpoint the crucial elements for test creation. The focus is on crafting concise, production-ready tests for the application within this repository. I'm prioritizing the use of example credentials or fixtures to ensure functionality within the target environment. I'm working to produce a concise and effective plan for the test cases.

  5. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Analyzing the Instructions

    I'm now diving into the instructions, trying to understand the workflow. Right now, I'm focusing on how the system finds a "target" based on what the user gives. The first instruction point is all I can focus on so far. I'm taking the wording literally as I start to go.

  6. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Analyzing Host Validation

    I've been examining the host validation in the code, specifically the isOwnHost check. The use of request.headers.host suggests a vulnerability might arise from services like run_local_app (or cloudflare/localtunnel), which can manipulate the host header. I'm focusing on how this could potentially be exploited.

  7. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Investigating Remote Access

    I'm now focusing on the implications of the remote Linux VM in the sandbox environment. I realize I need to confirm if this remote VM can actually communicate with my localhost runner. This seems critical for resolving the 'Host' header dependencies for those test cases like birdsbirdbirds and glitch-invaders.

  8. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Examining Script Details

    Okay, I've shifted focus to the project's scripting. I'm taking a close look at the package.json file, specifically the scripts defined for verification, testing, and linting. It seems that there are verification tools in place. Now, I'm checking AGENTS.md for specific conventions to consider before declaring completion.

  9. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Refining Project Structure

    I'm thinking about the project structure now. I need to move or remove .github/agents and .github/skills. I copied these in, but they should not be checked into the repository! I need to ensure npm run lint doesn't try to lint these files.

  10. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Analyzing Workflow Configuration

    I've successfully run all the basic checks! No linting issues, and the verify and test scripts ran without any problems. I'm now taking a close look at the testdriver.yml workflow configuration file, specifically the use of the canary tag and sandbox CLI invocations. I'm making sure to keep the instructions regarding the sandbox environment in mind.

  11. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Analyzing Workflow Structure

    I'm currently examining the GitHub Actions workflow file, specifically .github/workflows/testdriver.yml. I've noted the workflow's name, "TestDriver.ai Tests," and the triggers for its execution: pushes to the main and master branches, as well as pull requests targeting those branches. I'm focusing on the branching strategy and automation triggers.

  12. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Investigating Verification Tools

    I'm now digging into the verification process. It seems tools/verify.mjs is surprisingly limited, only targeting packages within challenges/ using boothstrap dev --verify. It completely skips package.json dependency checks! I've also checked test/verify.test.mjs, which confirms this narrow scope, and I'm starting to think I should review AGENTS.md.

  13. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Considering Deployment Options

    Okay, I'm exploring deployment methods for these challenges. I've realized I need to determine the start command for a locally run application. I'm now thinking about scripting solutions to serve specific pages, like challenges/birdsbirdbirds/page and challenges/glitch-invaders/game. I'm also considering reverse proxies with host rewriting. Finally, I'm thinking of just serving static pages. I'm also thinking of checking some specifics.

  14. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Analyzing Error Messages

    I've been examining the error message system, specifically how the "Save my bird" button interacts with an empty canvas. I've noted the setStatus function's role in displaying informative messages when the canvas is empty, or when various color and tool buttons are clicked. I'm also considering how this system might apply to challenges, like the glitch-invaders example.

  15. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Analyzing Host Errors

    I've hit a 421 Misdirected Request, pointing to a host mismatch. The server's expecting the host as localhost:4322, while the request likely sends a different value. I'm checking the server.mjs file's isOwnHost function for the specific host matching logic, using LISTEN_HOST and port to determine if the host is valid. It's expecting a specific header format, and I need to determine what is being sent.

  16. 13 remaining items

  17. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    🖱️ Clicking through the UI…

  18. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    ✅ Recording an assertion…

  19. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    🖱️ Clicking through the UI…

  20. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    ✅ Recording an assertion…

  21. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    📸 Here's the current screen:

    screenshot

  22. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Updating Test Sequence

    I'm currently updating the test file birdsbirdbirds.test.js. The focus is to provision chrome, confirm the header and tools are visible, click the "Save my bird button", scroll down 200px, and finally, assert the "The canvas is empty. Draw your bird first" message is displayed. This new sequence ensures a comprehensive testing workflow.

  23. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Investigating Vitest Configuration

    Okay, I've got a handle on it. Vitest seems to be running tests from both test/ (Node.js runner tests) and tests/birdsbirdbirds.test.js. My immediate thought is to delve into vitest.config.js. I am curious whether the configuration is explicitly including tests/**, or if it is running by default. The next step is to examine the file!

  24. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    🎬 Test run recording:

    ✅ allows selecting drawing tools and saving a bird
    allows selecting drawing tools and saving a bird

  25. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Reviewing Current Results

    I've just reviewed the latest test results, and it looks like the functionality for selecting drawing tools and saving a bird has passed successfully. I'm pleased with the outcome so far, and the test recording confirms everything.

  26. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    🎬 Test run recording:

    ✅ allows selecting drawing tools and saving a bird
    allows selecting drawing tools and saving a bird

  27. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Revising Workflow Configuration

    I've updated the testdriver.yml workflow file. I've switched to using testdriverai/action@stable and removed the canary step. Specifically, the "Authenticate to TestDriver" step now uses the stable action.

  28. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Analyzing Package Dependencies

    I'm currently focused on package dependencies. Specifically, I'm examining package.json to integrate "testdriverai" and "vitest". I've shifted to checking versions in /opt/td-toolchain/package.json for compatibility. Noted the devDependencies for testdriverai and vitest.

  29. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Verifying Testing Setup

    I've confirmed the published version as 7.11.171. I'm now looking into integrating vitest for end-to-end testing, specifically considering adding a "test:e2e" script to package.json like "test:e2e": "vitest run". I'll also add testdriverai to devDependencies to reflect the changes.

  30. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    Examining Pull Request Creation

    I'm currently focused on the open_pull_request function. I'm noting the expected parameters: a title (like "feat:...") and a body description, alongside paths for the pull request. The paths include both a workflow file (.github/workflows/testdriver.yml) and a directory (tests/birdsbirdbirds).

  31. testdriverai commented on Nov 1, 2026

    @testdriverai
    Author

    I have set up TestDriver in this repository and created an automated end-to-end test suite for the BirdsBirdBirds challenge application.

    What was done

    1. Configured TestDriver:

      • Added vitest.config.js scoped to tests/**/*.test.{js,mjs,ts} with TestDriver reporter and timeouts.
      • Added .github/workflows/testdriver.yml using testdriverai/action@stable with GitHub OIDC support.
      • Added tools/serve-birds.mjs to serve the BirdsBirdBirds challenge app with Host header proxying.
    2. Created E2E Test Suite (tests/birdsbirdbirds.test.js):

      • Provisions Chrome and navigates to the app.
      • Verifies the drawing header and tools are rendered.
      • Tests canvas validation by clicking "Save my bird" on an empty canvas and asserting that "The canvas is empty. Draw your bird first!" is displayed.
      • Verifies toggling between the Eraser and Pen tools with UI state assertions.
    3. Verified Checks:

      • npm run verify passed
      • npm test passed (264 tests passed)
      • npm run lint passed (0 issues)
      • vitest run passed (1/1 passed)

    Test Run Recording & Report

    allows selecting drawing tools and saving a bird — ✅ passed
    Test Recording
    📊 Test run report

    Pull Request

    Pull request created: #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions