framework-architecture.mdc in tugkanboz/awesome-cursorrules runs 344 words across 10 headings.
A curated list of awesome .cursorrules files for enhancing your Cursor AI experience.
Covers
7 of the 20 section tags
In the order a file is read inHeadings
10 headings, in the order the file writes them
01Selenium Python Framework Architecture
02Modern Framework Foundation
03Project Structure Best Practices
04pytest Configuration Excellence
05conftest.py - Global configuration
06Environment Management
07Environment-specific configuration loading
08Dependency Management
09requirements.txt - Pinned versions for stability
10Development dependencies
Commands
6 commands this file writes down
Extracted from the file, verbatimpytest==7.4.0
pytest-html==4.1.1
pytest-xdist==3.3.1
python-dotenv==1.0.0
black==23.9.1
mypy==1.6.0
The file
example-structures/selenium-python/.cursor/rules/framework-architecture.mdc
121 lines1---
2description: Selenium + pytest framework architecture — configuration, fixtures, and dependency management
3globs: **/conftest.py,**/pytest.ini,**/requirements.txt,**/pyproject.toml
4alwaysApply: false
5---
6# Selenium Python Framework Architecture
7
8## Modern Framework Foundation
9- **pytest Framework**: Leverage pytest's powerful fixture system and plugin ecosystem
10- **Modular Architecture**: Separate concerns with clear package structure
11- **Configuration Management**: Environment-specific settings with proper inheritance
12- **Dependency Management**: Pinned versions with regular security updates
13
14## Project Structure Best Practices
15```
16selenium-project/
17├── tests/
18│ ├── conftest.py # Global pytest configuration
19│ ├── pages/ # Page Object Models
20│ ├── specs/ # Test specifications
21│ ├── utils/ # Helper utilities
22│ └── data/ # Test data files
23├── config/
24│ ├── environments/ # Environment configurations
25│ └── browsers/ # Browser configurations
26├── reports/ # Test execution reports
27├── logs/ # Application logs
28├── requirements.txt # Python dependencies
29└── pytest.ini # pytest configuration
30```
31
32## pytest Configuration Excellence
33```python
34# conftest.py - Global configuration
35import pytest
36import os
37from selenium import webdriver
38from selenium.webdriver.chrome.options import Options as ChromeOptions
39from webdriver_manager.chrome import ChromeDriverManager
40
41def pytest_addoption(parser):
42 """Command line options for flexible test execution."""
43 parser.addoption("--browser", action="store", default="chrome")
44 parser.addoption("--headless", action="store_true", default=False)
45 parser.addoption("--env", action="store", default="dev")
46 parser.addoption("--parallel", action="store", default="1")
47
48@pytest.fixture(scope="session")
49def browser_config(request):
50 """Browser configuration based on command line arguments."""
51 return {
52 "browser": request.config.getoption("--browser"),
53 "headless": request.config.getoption("--headless"),
54 "environment": request.config.getoption("--env")
55 }
56```
57
58## Environment Management
59```python
60# Environment-specific configuration loading
61import yaml
62import os
63from typing import Dict, Any
64
65class ConfigManager:
66 """Centralized configuration management."""
67
68 def __init__(self, environment: str = "dev"):
69 self.environment = environment
70 self.config = self._load_config()
71
72 def _load_config(self) -> Dict[str, Any]:
73 """Load environment-specific configuration."""
74 config_file = f"config/environments/{self.environment}.yaml"
75
76 if not os.path.exists(config_file):
77 raise FileNotFoundError(f"Configuration file not found: {config_file}")
78
79 with open(config_file, 'r') as f:
80 config = yaml.safe_load(f)
81
82 # Validate required keys
83 required_keys = ["base_url", "timeouts", "credentials"]
84 for key in required_keys:
85 if key not in config:
86 raise KeyError(f"Missing required configuration: {key}")
87
88 return config
89
90 def get(self, key: str, default=None):
91 """Get configuration value with dot notation support."""
92 keys = key.split('.')
93 value = self.config
94
95 for k in keys:
96 if isinstance(value, dict) and k in value:
97 value = value[k]
98 else:
99 return default
100
101 return value
102```
103
104## Dependency Management
105```ini
106# requirements.txt - Pinned versions for stability
107selenium==4.15.0
108pytest==7.4.0
109pytest-html==4.1.1
110pytest-xdist==3.3.1
111webdriver-manager==4.0.1
112pyyaml==6.0.1
113allure-pytest==2.13.2
114python-dotenv==1.0.0
115
116# Development dependencies
117black==23.9.1
118flake8==6.1.0
119mypy==1.6.0
120```
121
The rest of the repository
tugkanboz/awesome-cursorrules ships 16 other instruction files
example-structures/react-typescript/.cursor/rules/component-development.mdcframeworks/cypress/.cursor/rules/cypress-excellence.mdcexample-structures/selenium-python/.cursor/rules/page-object-patterns.mdcrules/selenium-net-test-automation-framework/.cursorrulesrules/restassured-java-framework/.cursorrulesexample-structures/next-js/.cursor/rules/app-router-patterns.mdcrules/webdriverio-javascript-test-automation-framework/.cursorrulesexample-structures/cypress/.cursor/rules/api-testing.mdcexample-structures/cypress/.cursor/rules/testing-fundamentals.mdcrules/selenium-python-test-automation-framework/.cursorrulesrules/vitest-javascript-unit-test-framework/.cursorrulesexample-structures/selenium-python/.cursor/rules/test-patterns.mdcrules/appium-mobile-test-automation-framework/.cursorrulesrules/cypress-javascript-test-automation-framework/.cursorrulesrules/k6-performance-test-framework/.cursorrulesrules/playwright-javascript-test-automation-framework/.cursorrules
A row that is not a link is a file this repository ships that this app did not freeze a sheet for. It is listed because the corpus knows it exists, and it is not linked because there is nothing here to open.
This listing
Whoever runs tugkanboz/awesome-cursorrules can claim it
This is yours? Claim this config and we will write to you when the measurement moves. The check is one token placed where only you can place it, and there is no account and no password.