π§ GrabDocs β Intelligent Document Management Automated Tests This repository contains automated end-to-end tests for GrabDocs, an intelligent document management platform. Tests are implemented using Python, Pytest, and Playwright to validate key user workflows such as authentication, workspace management, uploads, and chat functionality.
π Project Structure βββ Grabdocs Test Plan.pdf # Reference document for test planning βββ logged_in.json # Stored login state (auto-generated) βββ README.md # Project documentation (this file) βββ requirements.txt # Python dependencies (note: βtsxtβ β typo fix) βββ tests/ βββ conftest.py # Pytest fixtures (setup, authentication) βββ test_auth.py # Authentication and session tests βββ test_chat.py # Chat-related test cases βββ test_workspace.py # Workspace creation and deletion tests βοΈ Setup Instructions
- Clone the Repository git clone git@github.com:swilltec/grabdocs_tests.git cd grabdocs-tests
- Create a Virtual Environment python -m venv venv source venv/bin/activate # On Linux/macOS venv\Scripts\activate # On Windows
- Install Dependencies pip install -r requirements.txt If requirements.txt doesnβt exist yet, create it with:
pytest playwright pytest-playwright python-dotenv Then install Playwright browsers:
playwright install π Environment Variables Set credentials used for logging into GrabDocs:
export EMAIL="your_email@example.com" export PASSWORD="your_password" Or create a .env file:
EMAIL=your_email@example.com
PASSWORD=your_password
pytest -v Run a specific test file:
pytest tests/test_auth.py -v Run tests in headed mode (browser visible):
pytest --headed π§ͺ What the Tests Cover Test File Description test_auth.py Validates login, remember-me, and logout flow test_workspace.py Creates and deletes team workspaces test_chat.py Tests chat input and message visibility test_files.py Uploads files to the dashboard and validates success Each test reuses an authenticated Playwright context managed by conftest.py, preventing redundant logins and improving test efficiency.
π§° Key Fixtures Fixture Scope Description base_url session The GrabDocs app base URL email / password session User credentials from environment browser_context session Provides a single browser session authenticated_context session Logs in and reuses an authenticated browser context π€ Upload Test Example page.set_input_files("input[type='file']", "Grabdocs Test Plan.pdf") expect(page.get_by_text("No documents uploaded yet")).not_to_be_visible() This test validates that file uploads successfully remove the "No documents uploaded yet" message on the GrabDocs Upload page.
π GrabDocs GrabDocs β Intelligent Document Management Automate document handling, chat with your data, and transform your workspace productivity. Visit GrabDocs β
π§Ή Notes If logged_in.json exists, tests will reuse it for faster sessions. Some tests (e.g. βRemember Meβ) may be known to fail due to unimplemented features in the current production environment. You can safely delete logged_in.json to force reauthentication.