-
Python 3.7+ installed
- Check version:
python --version
- Check version:
-
pip (Python package manager) installed
- Check version:
pip --version
- Check version:
-
Git installed
- Check version:
git --version
- Check version:
-
IDE installed (Cursor AI recommended, or PyCharm)
-
GitHub access to VirtoCommerce/vc-testing-module repository
-
Open terminal/command prompt
-
Clone the repository:
git clone https://github.com/VirtoCommerce/vc-testing-module
-
Navigate to project directory:
cd vc-testing-module -
Verify you're in the correct directory:
ls # Should see requirements.txt, tests_graphql/, tests_e2e/, etc.
-
Create virtual environment:
python -m venv .venv
-
Activate virtual environment:
On macOS/Linux:
source .venv/bin/activateOn Windows:
.venv\Scripts\activate
-
Verify activation (you should see
(.venv)in your terminal prompt)
-
Upgrade pip:
python -m pip install --upgrade pip
-
Install project dependencies:
pip install -r requirements.txt
-
Wait for installation to complete (this may take a few minutes)
-
Verify installation (no errors should appear)
-
Install pre-commit hooks:
pre-commit install
-
Verify installation:
pre-commit --version
-
You should see a message: "pre-commit installed at .git/hooks/pre-commit"
-
Install Playwright browsers:
playwright install
-
Wait for browser downloads to complete (this downloads Chromium, Firefox, and WebKit)
-
Verify Playwright installation:
python -c "import playwright; print(playwright.__version__)" -
Should print Playwright version number without errors
-
Create
.envfile in the project root:touch .env # On macOS/Linux type nul > .env # On Windows
-
Open
.envfile in your editor -
Replace values:
FRONTEND_BASE_URL=your_frontend_base_url BACKEND_BASE_URL=your_backend_base_url STORE_ID=dataset_store_id ADMIN_USERNAME=your_admin_name ADMIN_PASSWORD=your_admin_password USERS_PASSWORD=dataset_user_password -
Replace values with actual data (get from team)
-
Save the file
-
Important: Verify
.envis in.gitignore(should already be there)
-
Run dataset seeder:
python -m dataset.dataset_seeder
-
Wait for completion
-
Check for any error messages
-
Run GraphQL test suite:
pytest -v -s tests_graphql/tests/
-
Verify tests execute (some may fail if environment is not fully configured)
-
Run E2E tests in headless mode:
pytest tests_e2e/tests/ -v -s
-
Run E2E tests with visible browser:
pytest tests_e2e/tests/ -v -s --show-browser
-
Browser should open and tests should run
-
Test checkout mode options:
pytest tests_e2e/tests/ --checkout-mode single-page --show-browser pytest tests_e2e/tests/ --checkout-mode multi-step --show-browser
-
Test product quantity control options:
pytest tests_e2e/tests/ --product-quantity-control stepper --show-browser pytest tests_e2e/tests/ --product-quantity-control button --show-browser
-
All options should work without errors
-
Open project in Cursor AI:
cursor . # If cursor command is available
-
Select Python interpreter:
- Press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Type "Python: Select Interpreter"
- Choose the
.venvinterpreter
- Press
-
Install recommended extensions:
- Python
- Pylance
- Playwright Test for VSCode
-
Open project in PyCharm
-
Configure Python interpreter:
- Go to Settings → Project → Python Interpreter
- Select the
.venv/bin/pythoninterpreter
-
Mark directories:
- Right-click on test directories
- Mark as "Test Sources Root"
-
Virtual environment activated (check terminal prompt)
-
Pre-commit hooks working:
pre-commit run --all-files
-
All tests can be discovered:
pytest --collect-only
-
Environment variables loaded:
python -c "from dotenv import load_dotenv; import os; load_dotenv(); print('TOKEN:', 'SET' if os.getenv('TOKEN') else 'NOT SET')" -
Can run specific test:
pytest tests_graphql/tests/ -k "test" --collect-only
If all checkboxes are complete, your environment is ready!
- Review the project structure
- Read through existing tests
- Try modifying a simple test
- Run your first test successfully
- Attend team onboarding session
Virtual environment not activating:
- Make sure you're in the project directory
- Try creating venv again:
python -m venv .venv --clear
Playwright browsers not installing:
- Run with sudo/admin if needed:
sudo playwright install - Or:
playwright install --with-deps
Tests failing:
- Check if
.envfile has correct token - Verify network connection to test environment
- Check if test environment is running
Pre-commit hooks not working:
- Reinstall:
pre-commit uninstall && pre-commit install - Update:
pre-commit autoupdate
Import errors:
- Ensure virtual environment is activated
- Reinstall dependencies:
pip install -r requirements.txt --force-reinstall
- Check project README: https://github.com/VirtoCommerce/vc-testing-module
- Contact team lead
- Ask in team chat channel
- Review Playwright docs: https://playwright.dev/python/
- Python https://www.python.org/downloads/