npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

testdriver-agent

v4.0.0

Published

Next generation autonomous AI agent for end-to-end testing of web & desktop

Downloads

7

Readme

TestDriver AI Agent

Workflow

Everything will be saved when SigInt is called

Editing and naming

node index.js edit testdriver.yml
node index.js testdriver.yml

Running

node index.js run testdriver.yml

Internal Commands Docs

/summarize

Writes a summary to /tmp/oiResult.log for GitHub and such.

/save

Writes yml instructions from memory to save file

/run

Execute a /save

/summarize

Generate a text summary of the test.

/quit

Exits the application.

/undo

Undo the last thing appended to the save file.

/manual

Generates the yml and runs it as if it were created from AI.

/manual command=click x=10 y=20 /manual command=match-image path=sort.png /manual command=wait-for-image path=sort.png seconds=10 /manual command=wait-for-text text='see detatils' /manual command=embed file=open.yml

Old

Installation

npm install

Potential problems

Node GYP

FYI robotjs might require extra steps to install, due to node-gyp, so you have to:

brew install python-setuptools

or whatever accomplishes the same on your OS distro.

Running

npm run dev

Running as testdriver

Run npm link and the agent will be available globally as testdriver.

npm link
testdriver

Example of saving and restoring AI memory

Let's say I want to test the /save and /summarize call. It would be annoying to wait for an entire test to run to test the function once. Here's how you do it.

So let's say I just ran this test:

> open google chrome
> navigate to youtube.com
> search for 'cat videos'
> click the first one

I would call /savechat to save the history JSON into the /.chats directory.

Then, I can make changes and spawn a new process. At that point I could run /loadchat to restore the agent memory as if I had never exited the process:

# load an old chat history to test saving
/loadchat .chats/1713391070500.json

That will allow me to test things like /save and /summarize over and over again without running more tests.

# save the test plan to markdown
/save

Turning an exploratory test into a regression test

Ok so we've run our test. TestDriver will automatically save a regression to ./saves. This saved regression will contain the codeblocks the AI generated and ran in linear order.

Any invalid codeblocks (invalid yml) should not be written here. However, codeblocks that contain spelling errors or invalid paramers will be written.

Any yml block that spawns a subrouteine (at depth 1 or higher) will invoke a REAL ai agent that will make decisions. This is also an opportunity for it to go off the rails.

So for example, click-text does NOT hardcode the x/y coordinates. It is evaluated at run time, the AI is given a screenshot and the click-text process starts from scratch. The AI should choose the same text every time, but it may not.

Same for click-image. We think that this will be more reliable than x,y coords or sub-image matching, as it allows the AI to adapt to a changing application. No selectors!