AnkTechsol / AnkTechsol/Satya_AI

[good first issue] Add unit tests for core Satya AI modules

Open
#159 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
8
Forks
6
PR merge metrics
No merged PRs in 30d

Description

## Task

The Satya AI repository currently lacks comprehensive unit tests. Adding tests will improve code quality, prevent regressions, and make the project more attractive to contributors and potential users who want to star a well-maintained repository.

## Modules to Test

1. **Agent Registration** (`src/satya/sdk/client.py`) - Test agent creation, registration, and validation
2. **Task Management** - Test task creation, assignment, status updates, and completion
3. **Dashboard API** (`app.py`) - Test Streamlit widget interactions and data retrieval
4. **Audit Logging** - Test log entry creation, querying, and filtering
5. **Multi-Agent Workflows** - Test agent collaboration and task delegation

## Implementation Steps

- [ ] Set up pytest in the project (add to requirements.txt or pyproject.toml)
- [ ] Create a `tests/` directory following Python testing conventions
- [ ] Write unit tests for each core module (aim for at least 70% coverage)
- [ ] Add test fixtures for common test data and mock objects
- [ ] Run tests locally and verify they pass
- [ ] Add a `pytest` command to the project documentation
- [ ] Optionally: Add a test badge to the README showing test coverage

## Tips

- Start with one module and gradually expand coverage
- Use `unittest.mock` or `pytest-mock` for external dependencies
- Follow the Arrange-Act-Assert pattern for test structure
- Name test files as `test_.py` (e.g., `test_agent.py`, `test_task.py`)
- Keep tests fast and isolated (no real API calls or database connections)

## Resources

- [SDK Reference](src/satya/sdk/client.py)
- [Dashboard Code](app.py)
- [pytest Documentation](https://docs.pytest.org/)
- [Python Testing Best Practices](https://docs.python-guide.org/writing/tests/)

---

**New to the project?** Check out our [Contributing Guide](CONTRIBUTING.md) to get started.

**Love Satya?** Please [give us a star](https://github.com/AnkTechsol/Satya_AI) to support the project!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.