{"id":43189689,"url":"https://github.com/manticoresoftware/doc-tests","last_synced_at":"2026-02-01T04:37:15.854Z","repository":{"id":320192870,"uuid":"1081125532","full_name":"manticoresoftware/doc-tests","owner":"manticoresoftware","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-22T12:28:27.000Z","size":11,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-22T14:10:10.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manticoresoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://www.paypal.me/manticoresearch"]}},"created_at":"2025-10-22T10:50:54.000Z","updated_at":"2025-10-22T11:38:30.000Z","dependencies_parsed_at":"2025-10-22T14:10:18.993Z","dependency_job_id":"d636d164-02fd-48f9-bddf-f7d27f533d74","html_url":"https://github.com/manticoresoftware/doc-tests","commit_stats":null,"previous_names":["manticoresoftware/doc-tests"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/manticoresoftware/doc-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fdoc-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fdoc-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fdoc-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fdoc-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manticoresoftware","download_url":"https://codeload.github.com/manticoresoftware/doc-tests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fdoc-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28968051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T03:46:10.227Z","status":"ssl_error","status_checked_at":"2026-02-01T03:46:01.693Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-01T04:37:14.292Z","updated_at":"2026-02-01T04:37:15.848Z","avatar_url":"https://github.com/manticoresoftware.png","language":"Python","funding_links":["https://www.paypal.me/manticoresearch"],"categories":[],"sub_categories":[],"readme":"# 🧪 Selenium UI Test Suite\n\nAutomated UI tests for the ManticoreSearch documentation website, supporting both local development and CI/CD workflows.\n\n## 📋 Prerequisites\n\n- Docker installed and running\n- Python 3.9+ installed\n- Git repository cloned locally\n\n## 🚀 Quick Start\n\n### 1. Start Selenium Container\n\n```bash\ndocker run -d -p 4444:4444 -p 7900:7900 --platform linux/amd64 selenium/standalone-chrome:4\n```\n\n### 2. Setup Python Environment\n\n```bash\n# Create and activate virtual environment\npython3 -m venv selenium_env\nsource selenium_env/bin/activate\n\n# Install dependencies\npip install -r core/requirements.txt\n```\n\n### 3. Run Tests\n\n```bash\n# Run all tests\npytest manual/tests -v\n\n# Run specific test\npytest manual/tests/test_manual_search.py -v\n\n# Run with detailed output\npytest manual/tests -v -s\n```\n\n### 4. Watch Tests Execute (Optional)\n\n1. Open browser to `http://localhost:7900`\n2. Enter password: `secret`\n3. Watch your tests run in real-time!\n\n## 🔄 Subsequent Runs\n\n```bash\n# Start container (if not running)\ndocker run -d -p 4444:4444 -p 7900:7900 --platform linux/amd64 selenium/standalone-chrome:4\n\n# Activate environment and run tests\nsource selenium_env/bin/activate\npytest manual/tests -v\ndeactivate\n```\n\n## 🧩 Writing Tests\n\nCreate new test files in `manual/tests/` using this template:\n\n```python\nimport pytest\nfrom selenium.webdriver.common.by import By\nfrom core.base_test import BaseTest\n\n@pytest.mark.usefixtures(\"setup_driver\")\nclass TestNewFeature(BaseTest):\n    def test_example(self):\n        self.driver.get(\"https://manual.manticoresearch.com/\")\n        # Your test steps here\n```\n\n## 🐛 Debugging Tools\n\nThe `BaseTest` class provides powerful debugging tools for troubleshooting test failures.\n\n### Screenshots\n```python\n# Take manual screenshots\nself.take_screenshot(\"before_action\")\nself.take_screenshot(\"after_action\")\n```\n\n- **Local**: Saved to `screenshots/` directory with timestamps\n- **CI**: Automatically uploaded to GitHub Actions artifacts when tests fail\n\n### Console Logs\n```python\n# Capture browser console logs\nself.capture_console_logs(\"after_page_load\")\n```\n\n### JavaScript Errors\n\nJavaScript error detection works in two phases:\n\n```python\n# 1. START monitoring (install listener)\nself.driver.get(\"https://example.com\")\nself.start_javascript_error_monitoring()  # Begin collecting errors\n\n# 2. Perform actions that might cause errors\nbutton.click()\n\n# 3. END monitoring (retrieve collected errors)\nself.print_javascript_errors(\"after_action\")  # Pretty print errors\n\n# Or get errors programmatically\nerrors = self.get_javascript_errors()  # Get raw error data\nassert len(errors) == 0, f\"JS errors: {errors}\"\n```\n\n### Network Activity\n```python\n# Monitor AJAX/XHR requests\nself.capture_network_logs(\"api_calls\")\n\n# Monitor all network activity\nself.capture_network_logs(\"all_requests\", xhr_only=False)\n```\n\n### Complete Debugging Example\n```python\n@pytest.mark.usefixtures(\"setup_driver\")\nclass TestWithDebugging(BaseTest):\n    def test_search_with_full_debugging(self):\n        # Initial state\n        self.take_screenshot(\"start\")\n        self.driver.get(\"https://manual.manticoresearch.com/\")\n        \n        # START monitoring JS errors early\n        self.start_javascript_error_monitoring()\n        \n        # Check page load\n        self.capture_console_logs(\"page_load\")\n        self.print_javascript_errors(\"page_load\")  # Check for early errors\n        \n        # Perform search\n        search_input = self.driver.find_element(By.CLASS_NAME, \"DocSearch-Input\")\n        search_input.send_keys(\"SELECT\")\n        self.capture_network_logs(\"search_request\")\n        \n        # Final validation\n        self.take_screenshot(\"final_state\")\n        errors = self.get_javascript_errors()  # END monitoring - get all errors\n        if errors:\n            pytest.fail(f\"JavaScript errors: {errors}\")\n```\n\n## 📊 CI/CD Integration\n\nTests run automatically on:\n- Pull requests to `main` branch\n- Daily scheduled runs\n\n**Important**: Screenshots are only uploaded to GitHub Actions artifacts when tests **fail**.\n\n## 📁 Project Structure\n\n```\n├── README.md                    # This guide\n├── conftest.py                  # Pytest configuration\n├── core/\n│   ├── requirements.txt         # Python dependencies\n│   ├── base_test.py            # Base test class with debugging tools\n│   └── __init__.py\n└── manual/\n    ├── __init__.py\n    └── tests/\n        ├── __init__.py\n        └── test_manual_search.py  # Example test\n```\n\n## 🎯 Tips \u0026 Best Practices\n\n### Local Development\n- Use visual mode (`http://localhost:7900`) to watch tests execute\n- Add `time.sleep(2)` between actions for easier observation\n- Take screenshots at key points to document test flow\n- Monitor browser console for JavaScript errors\n\n### Debugging Failed Tests\n- Check screenshots in `screenshots/` directory (local) or GitHub artifacts (CI)\n- Review console logs and JavaScript errors in test output\n- Use network monitoring to verify API calls\n- Run tests in visual mode to observe browser behavior\n\n### Performance\n- Use `xhr_only=True` (default) for network monitoring to reduce noise\n- Take targeted screenshots rather than after every action\n- Clear browser logs periodically in long tests","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanticoresoftware%2Fdoc-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanticoresoftware%2Fdoc-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanticoresoftware%2Fdoc-tests/lists"}