Testing data Next Gen UI
Project description
Next Gen UI Agent Testing
This module is part of the Next Gen UI Agent project.
Library for testing support
Components
model.py-MockedInferenceto mock agent'sInferenceBasein unit testsagent_testing.py- Test setup for renderer testing with mock agentsdata_set_movies.py- Comprehensive movie database with tool functions for E2E testingMOVIES_DB: Rich dataset with 6 movies including box office data, ratings, awards, and weekly performancesearch_movie(title): Search for a specific movie by titleget_all_movies(**filters): Get movies with optional filtering by director, genre, actor, year, ratingfind_movie(title): Legacy function for backward compatibility
movies_agent_example.py- E2E testing agent demonstrating LangGraph ReAct agent with movie toolscreate_movies_agent(llm, system_prompt): Factory function to create a movies agentrun_example(): Runnable example demonstrating the agent in action
data_after_transformation- Distinct types ofComponentDatabased on movies data for use in tests
Usage
For Renderer Testing
from next_gen_ui_testing.agent_testing import create_mock_agent
For E2E Testing
from next_gen_ui_testing.data_set_movies import get_all_movies, search_movie
from next_gen_ui_testing.movies_agent_example import create_movies_agent
# Create agent
movies_agent = create_movies_agent(llm)
agent_graph = movies_agent.build_graph()
# Run query
result = await agent_graph.ainvoke({"messages": [("user", "Show me sci-fi movies")]})
Running the Example
cd libs/next_gen_ui_testing
export LLM_MODEL="your-model"
export LLM_BASE_URL="http://your-api/v1"
export LLM_API_KEY="your-key"
python -m next_gen_ui_testing.movies_agent_example
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file next_gen_ui_testing-0.4.0-py3-none-any.whl.
File metadata
- Download URL: next_gen_ui_testing-0.4.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21ee8aa2484f04557e9940fe36715e457145f67cebfcafb4c2d74ced696d2dcb
|
|
| MD5 |
3a1c1f0610596e38fec031670113cc42
|
|
| BLAKE2b-256 |
df7080992cb3521eb20d3e4f4c6f4556c700148447578e7b621ae96dab75b1e0
|