Skip to content

feat: integration tests for chat, image-gen, deploy + unit tests (#22)#29

Merged
web3guru888 merged 1 commit into
mainfrom
feat/integration-tests-22
Apr 21, 2026
Merged

feat: integration tests for chat, image-gen, deploy + unit tests (#22)#29
web3guru888 merged 1 commit into
mainfrom
feat/integration-tests-22

Conversation

@web3guru888

Copy link
Copy Markdown
Collaborator

Summary

Adds comprehensive test coverage for the three skills that previously had zero tests (agentverse-chat, agentverse-image-gen, agentverse-deploy), plus a new unit test file for offline testing of parsing functions.

Closes #22.

Integration Tests Added (tests/test_integration.py)

Test Class Tests What It Checks
TestDeployAgent 1 Deploy inline code → verify in agent list → delete
TestChatAgent 2 Structured output on success/timeout; debug info on timeout
TestImageGenAgent 2 --search returns agents; structured output from generation
TestManageCleanup 1 cleanup subcommand returns structured JSON

Total integration tests: 8 existing + 6 new = 14 tests

Design Decisions

  • Chat and image-gen tests accept both success and timeout — computation quotas may prevent actual relay execution
  • Deploy test skips gracefully if agent limit is reached
  • Chat/image-gen use --cleanup to prevent relay agent accumulation
  • Deploy test deletes created agent in tearDown

Unit Tests Added (tests/test_unit.py)

Test Class Tests What It Checks
TestParseResultEntry 8 JSON, Python repr, UUID stripping, apostrophes, nested, empty, fallback
TestExtractResults 4 RESULT: extraction, chronological ordering, empty cases
TestExtractStatus 3 Latest status, custom prefix, unknown default
TestIsRelayAgent 4 Prefix matching, session suffix, non-relay, None

Total unit tests: 19 tests — run offline, no API keys needed

Unit tests use @unittest.skipUnless(HAS_COMMON_MODULE) to skip gracefully when skills/_common/agentverse_relay.py is not present (depends on PR #28).

Files Changed

  • tests/test_integration.py — 6 new test methods across 4 new test classes
  • tests/test_unit.pynew file, 19 unit tests across 4 test classes
  • tests/README.md — updated with full test inventory, unit test instructions

…parsing (closes #22)

- Added integration tests for 3 missing skills:
  - TestDeployAgent: deploy inline code, verify in list, delete
  - TestChatAgent: structured output, timeout debug info
  - TestImageGenAgent: --search results, structured output
  - TestManageCleanup: cleanup subcommand validation
- Added unit tests (tests/test_unit.py, 19 tests):
  - TestParseResultEntry: JSON, Python repr, UUID stripping, apostrophes, fallback
  - TestExtractResults: RESULT: extraction, ordering, empty cases
  - TestExtractStatus: status extraction, custom prefix, defaults
  - TestIsRelayAgent: relay name prefix matching
- Unit tests skip gracefully when _common module is not present
- Updated tests/README.md with full test inventory
@web3guru888 web3guru888 force-pushed the feat/integration-tests-22 branch from 8356611 to 1027ee9 Compare April 21, 2026 09:43
@web3guru888 web3guru888 merged commit cc4ecd2 into main Apr 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Add integration tests for chat, image-gen, and deploy skills

1 participant