agenttest

package
v0.0.0-...-c66f423 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentTestEnv

type AgentTestEnv struct {
	*e2etest.E2ETest
	T              *testing.T
	TmpDir         string
	AppName        string
	AppDir         string
	CommandsRun    []string
	SkillsUsed     []string
	CurrentWorkDir string
}

AgentTestEnv wraps E2ETest with agent-specific testing capabilities

func Setup

func Setup(t *testing.T, opts *SetupOptions) *AgentTestEnv

Setup creates a new agent test environment with isolation

func (*AgentTestEnv) AssertCommandRun

func (e *AgentTestEnv) AssertCommandRun(cmd string)

AssertCommandRun verifies that a specific command was executed

func (*AgentTestEnv) AssertDatabaseTableExists

func (e *AgentTestEnv) AssertDatabaseTableExists(tableName string)

AssertDatabaseTableExists verifies that a table exists in the database

func (*AgentTestEnv) AssertFileContains

func (e *AgentTestEnv) AssertFileContains(relativePath, text string)

AssertFileContains verifies that a file contains specific text

func (*AgentTestEnv) AssertFileExists

func (e *AgentTestEnv) AssertFileExists(relativePath string)

AssertFileExists verifies that a file exists in the app directory

func (*AgentTestEnv) AssertSkillUsed

func (e *AgentTestEnv) AssertSkillUsed(skillName string)

AssertSkillUsed verifies that a specific skill was used

func (*AgentTestEnv) RunLvtCommand

func (e *AgentTestEnv) RunLvtCommand(args ...string) error

RunLvtCommand executes an lvt command and tracks it

func (*AgentTestEnv) SimulateConversation

func (e *AgentTestEnv) SimulateConversation(steps []ConversationStep)

SimulateConversation simulates a multi-turn conversation

func (*AgentTestEnv) SimulateFullStack

func (e *AgentTestEnv) SimulateFullStack()

SimulateFullStack simulates the full stack workflow from the usage guide

func (*AgentTestEnv) SimulateQuickStart

func (e *AgentTestEnv) SimulateQuickStart(resourceName string)

SimulateQuickStart simulates the quick start workflow from the usage guide

func (*AgentTestEnv) TrackCommand

func (e *AgentTestEnv) TrackCommand(cmd string)

TrackCommand records that a command was run

func (*AgentTestEnv) TrackSkill

func (e *AgentTestEnv) TrackSkill(skillName string)

TrackSkill records that a skill was used (for testing agent skill selection)

type ConversationStep

type ConversationStep struct {
	Prompt  string
	Execute func(*AgentTestEnv)
}

ConversationStep represents a single turn in a conversation

type SetupOptions

type SetupOptions struct {
	AppName    string // Name of the app to create (if empty, no app is created)
	Kit        string // Kit type: multi, single, simple
	ChromeMode e2etest.ChromeMode
}

SetupOptions configures the agent test environment

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL