Contributing Guide¶
Thank you for your interest in YuanTest Playwright! We welcome code contributions, bug reports, and suggestions.
Code of Conduct¶
This project adopts the Contributor Covenant as its code of conduct. By participating in this project, you agree to abide by its terms.
How to Contribute¶
Reporting Bugs¶
If you find a bug, please create an Issue, including:
- Clear title and description
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment information (Node.js version, OS, etc.)
Proposing New Features¶
If you have an idea for a new feature, please create an Issue, including:
- Feature description
- Use cases
- Possible implementation approach
Submitting Code¶
- Fork this repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a Pull Request
Development Guide¶
Environment Setup¶
# Clone the repository
git clone https://github.com/yuandiv/yuantest-playwright.git
cd yuantest-playwright
# Install dependencies
npm install
# Build
npm run build
Development Commands¶
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Lint code
npm run lint
# Format code
npm run format
# Type check
npm run typecheck
# Generate documentation
npm run docs
Code Style¶
- Use TypeScript
- Follow ESLint rules
- Use Prettier for code formatting
- Write meaningful commit messages
Commit Message Convention¶
Use Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation updatestyle:Code formatting (does not affect functionality)refactor:Refactoringtest:Test relatedchore:Build/tool related
Example:
feat: add AI-powered failure analysis
fix: resolve WebSocket connection issue
docs: update API reference
Pull Request Guidelines¶
- Ensure all tests pass
- Update relevant documentation
- Add necessary tests
- Keep PR focused on a single feature
- Write a clear PR description
Project Structure¶
yuantest-playwright/
├── bin/ # CLI entry point
├── dashboard/ # Web Dashboard frontend
├── src/ # Source code
│ ├── orchestrator/ # Test orchestration
│ ├── executor/ # Test execution
│ ├── reporter/ # Report generation
│ ├── flaky/ # Flaky management
│ ├── realtime/ # Real-time reporting
│ └── ...
├── tests/ # Test files
├── documentation/ # Documentation source files
└── docs/ # API documentation output
License¶
This project is licensed under the GPL-3.0 License. By submitting code, you agree to license your code under the same license.