{"id":29225643,"url":"https://github.com/nu0ma/spanwright","last_synced_at":"2025-07-03T07:11:15.721Z","repository":{"id":302583052,"uuid":"1012560235","full_name":"nu0ma/spanwright","owner":"nu0ma","description":"CLI tool to generate Cloud Spanner E2E testing framework projects with Go database tools and Playwright browser automation","archived":false,"fork":false,"pushed_at":"2025-07-03T06:22:41.000Z","size":314,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-03T06:35:50.065Z","etag":null,"topics":["go","playwright","spanner","typescript"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nu0ma.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-02T14:14:24.000Z","updated_at":"2025-07-03T06:22:44.000Z","dependencies_parsed_at":"2025-07-03T06:35:55.036Z","dependency_job_id":"76edc891-0d2f-4b46-b525-436a5a47edd6","html_url":"https://github.com/nu0ma/spanwright","commit_stats":null,"previous_names":["nu0ma/spanwright"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nu0ma/spanwright","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu0ma%2Fspanwright","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu0ma%2Fspanwright/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu0ma%2Fspanwright/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu0ma%2Fspanwright/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nu0ma","download_url":"https://codeload.github.com/nu0ma/spanwright/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu0ma%2Fspanwright/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263279305,"owners_count":23441683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","playwright","spanner","typescript"],"created_at":"2025-07-03T07:11:14.752Z","updated_at":"2025-07-03T07:11:15.711Z","avatar_url":"https://github.com/nu0ma.png","language":"Go","readme":"# Spanwright\n\n\u003e **Note**: This is an unofficial third-party tool, not affiliated with Google Cloud or the Cloud Spanner team.\n\nA CLI tool for generating Cloud Spanner E2E testing framework projects that combine Go database tools with Playwright browser automation.\n\n## Quick Start\n\n```bash\n# Create a new E2E test project\nnpx spanwright your-project-name\n\n# Navigate to the project\ncd your-project-name\n\n# Initial setup\nmake init\n\n# Run all scenarios\nmake run-all-scenarios\n```\n\n## Features\n\n- **Flexible Database Configuration**: Support for single or dual Spanner databases\n- **Interactive Project Setup**: CLI guides you through database configuration\n- **Playwright Integration**: Browser automation with database validation\n- **Scenario-Based Testing**: Structured test organization with YAML configuration\n- **Docker Integration**: Automated Spanner emulator management\n- **High-Performance Tools**: Go-based database validation and seeding\n- **Make-Based Workflows**: Automated development and testing workflows\n\n## Prerequisites\n\nMake sure you have these tools installed:\n\n- **Node.js** \u003e= 22.0.0\n- **Docker** - For running Spanner emulator\n- **wrench** - Spanner schema migration tool ([installation guide](https://github.com/cloudspannerecosystem/wrench))\n- **Go** - For database tools in generated projects\n\n## Generated Project Structure\n\n```\nyour-project-name/\n├── Makefile                    # Workflow automation\n├── cmd/                        # Go CLI tools\n│   ├── db-validator/          # Database validation\n│   └── seed-injector/         # Data seeding\n├── scenarios/                  # Test scenarios\n│   └── example-01-basic-setup/\n│       ├── seed-data/         # JSON seed files\n│       ├── expected-*.yaml    # Expected results\n│       └── tests/             # Playwright E2E tests\n├── tests/                      # Test infrastructure\n├── internal/                   # Go internal packages\n└── playwright.config.ts       # Playwright configuration\n```\n\n## Usage Guide\n\n### Project Generation\n\n```bash\n# Generate a new project\nnpx spanwright my-spanner-tests\n\n# Follow the interactive prompts:\n# - Project name\n# - Number of databases (1 or 2)\n# - Database IDs\n# - Schema paths\n```\n\n### Generated Project Commands\n\n```bash\n# Initialize project (install dependencies, build tools)\nmake init\n\n# Database operations\nmake start                  # Start Spanner emulator\nmake setup-all              # Apply all schema migrations\nmake stop                   # Stop emulator\n\n# Scenario testing\nmake list-scenarios         # Show available scenarios\nmake run-scenario SCENARIO=example-01-basic-setup\nmake run-all-scenarios      # Run all scenarios\n\n# Browser testing\nmake test-e2e              # Run Playwright tests\nmake test-e2e-ui          # Interactive test UI\nmake test-report          # Show test results\n\n# Development\nmake clean                 # Clean build artifacts\nmake help                  # Show all commands\n```\n\n### Testing Architecture\n\nGenerated projects provide:\n\n1. **Database Tools** (Go):\n   - `db-validator`: Batch validation with performance metrics\n   - `seed-injector`: Data seeding with type conversion\n   - Connection pooling and error handling\n\n2. **Browser Tests** (Playwright):\n   - Database isolation for parallel execution\n   - Scenario-based test organization\n   - Automatic cleanup and teardown\n\n3. **Workflow Integration**:\n   - Make-based automation\n   - Docker compose for services\n   - Environment-based configuration\n\n## Development\n\n### Template Development\n\n```bash\n# Validate templates\nnpm run template:validate\n\n# Create development testbed\nnpm run dev:create-testbed\n\n# Run full E2E test\nnpm run dev:test-e2e\n\n# Quick development cycle\nnpm run dev:quick-test\n```\n\n### Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## Examples\n\n### Single Database Setup\n```bash\nnpx spanwright my-app-tests\n# Choose: 1 database\n# Database ID: app-db\n# Schema path: ./schemas/app\n```\n\n### Dual Database Setup\n```bash\nnpx spanwright multi-db-tests\n# Choose: 2 databases\n# Primary DB: user-db, Schema: ./schemas/users\n# Secondary DB: analytics-db, Schema: ./schemas/analytics\n```\n\n## Troubleshooting\n\n### Common Issues\n\n**Docker not running**\n```bash\n# Start Docker and try again\ndocker info\n```\n\n**wrench not found**\n```bash\n# Install wrench\ngo install github.com/cloudspannerecosystem/wrench@latest\n```\n\n**Permission denied on make commands**\n```bash\n# Make scripts executable\nchmod +x scripts/*.sh\n```\n\n## Architecture\n\nSpanwright generates projects with a hybrid architecture:\n\n- **Go Tools**: High-performance database operations\n- **TypeScript/Playwright**: Browser automation and test framework\n- **Docker**: Isolated development environment\n- **Make**: Cross-platform workflow automation\n\n## Security\n\nPlease report security vulnerabilities responsibly. See [SECURITY.md](SECURITY.md) for details.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for release history.\n\n---\n\n**Disclaimer**: This tool is not affiliated with Google Cloud or the Cloud Spanner team. It's an independent project designed to facilitate E2E testing with Cloud Spanner.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnu0ma%2Fspanwright","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnu0ma%2Fspanwright","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnu0ma%2Fspanwright/lists"}