### Start production with external services Source: https://docs.testplanit.com/docs/docker-setup Example of running production configuration while using external database and S3, with Docker handling cache and search. ```bash # Example: Using external database and S3, Docker for cache/search docker compose -f docker-compose.prod.yml \ --profile with-valkey \ --profile with-elasticsearch \ up --build ``` -------------------------------- ### Start application in production mode Source: https://docs.testplanit.com/docs/docker-setup Starts the application with optimized builds using the prod profile. ```bash docker compose --profile prod up --build ``` -------------------------------- ### Install @testplanit/wdio-reporter dependencies Source: https://docs.testplanit.com/docs/sdk/wdio-overview Install the reporter and API packages using npm, pnpm, or yarn. ```bash npm install @testplanit/wdio-reporter @testplanit/api # or pnpm add @testplanit/wdio-reporter @testplanit/api # or yarn add @testplanit/wdio-reporter @testplanit/api ``` -------------------------------- ### Install dependencies Source: https://docs.testplanit.com/docs/manual-setup Run this command from the monorepo root directory to install all required dependencies. ```bash pnpm install ``` -------------------------------- ### Start Service Combinations Source: https://docs.testplanit.com/docs/docker-setup Commands to start specific service stacks using Docker Compose. ```bash # Full development stack docker compose up dev workers-dev --build # Full production stack docker compose up prod workers --build # Minimal development (no search/files) docker compose up dev workers-dev postgres valkey --build # Start in background (detached) docker compose up prod workers --build -d ``` -------------------------------- ### Install TestPlanIt via Helm Source: https://docs.testplanit.com/docs/kubernetes-deployment Executes the Helm installation command using the specified namespace and values file. ```bash helm install testplanit ./testplanit/helm/testplanit \ --namespace testplanit --create-namespace \ -f my-values.yaml ``` -------------------------------- ### Feature-Based Organization Example Source: https://docs.testplanit.com/docs/user-guide/projects/milestones Example of a hierarchical milestone structure organized by features, showing a root milestone 'Product Launch' with core features, marketing activities, and operations setup. ```text Product Launch (Root) ├── Core Features │ ├── Feature A │ ├── Feature B │ └── Feature C ├── Marketing Activities │ ├── Campaign Planning │ └── Content Creation └── Operations Setup ├── Infrastructure └── Support Training ``` -------------------------------- ### Complete Setup and Run Source: https://docs.testplanit.com/docs/e2e-testing Sets up the database and executes the test suite in a single command. ```bash pnpm test:e2e:run ``` -------------------------------- ### Configure environment variables Source: https://docs.testplanit.com/docs/manual-setup Navigate to the application directory and create the .env file from the provided example. ```bash cd testplanit cp .env.example .env ``` -------------------------------- ### GET /api/model/projects/findMany (Session-Based Authentication) Source: https://docs.testplanit.com/docs/api-reference Example of querying projects using session-based authentication. The request includes session cookies via credentials: 'include'. ```APIDOC ## [GET] /api/model/projects/findMany ### Description Example of querying projects using session-based authentication. ### Method GET ### Endpoint /api/model/projects/findMany ### Authentication Session-Based (NextAuth.js session cookies) ### Parameters #### Query Parameters - **q** (string) - Required - URL-encoded JSON query object, e.g., {"where": {"isDeleted": false}} ### Request Example ``` const q = encodeURIComponent(JSON.stringify({ where: { isDeleted: false } })); const response = await fetch(`/api/model/projects/findMany?q=${q}`, { credentials: 'include' // Include session cookies }); ``` ### Response #### Success Response (200) - List of projects (array) - The projects matching the query. #### Response Example (Not provided in source) ``` -------------------------------- ### Install TestPlanIt CLI on Linux (x64) Source: https://docs.testplanit.com/docs/cli Downloads the Linux x64 binary, makes it executable, and moves it to /usr/local/bin. Requires curl and sudo. ```bash curl -L -o testplanit https://github.com/testplanit/testplanit/releases/download/cli-v1.0.0/testplanit-linux-x64 chmod +x testplanit sudo mv testplanit /usr/local/bin/ ``` -------------------------------- ### GET /api/model/projects/findMany (API Token Authentication) Source: https://docs.testplanit.com/docs/api-reference Example of querying projects using API token authentication. The request uses a Bearer token and a query parameter 'q' containing a JSON filter. ```APIDOC ## [GET] /api/model/projects/findMany ### Description Example of querying projects using API token authentication. ### Method GET ### Endpoint /api/model/projects/findMany ### Authentication API Token (Bearer token) ### Parameters #### Query Parameters - **q** (string) - Required - URL-encoded JSON query object, e.g., {"where": {"isDeleted": false}} ### Request Example ``` curl -G "https://your-domain.com/api/model/projects/findMany" \ -H "Authorization: Bearer tpi_your_token_here" \ --data-urlencode 'q={"where": {"isDeleted": false}}' ``` ### Response #### Success Response (200) - List of projects (array) - The projects matching the query. #### Response Example (Not provided in source) ``` -------------------------------- ### Start all services using profiles Source: https://docs.testplanit.com/docs/docker-setup Launch the full stack for development or production using the respective profiles. ```bash # Development docker compose --profile dev up --build # Production docker compose --profile prod up --build ``` -------------------------------- ### Get Milestone Forecasts API Response Source: https://docs.testplanit.com/docs/user-guide/forecasting Example JSON response from the milestone forecast endpoint. Contains total manual, automated, and mixed estimates along with test run and case counts. ```json { "milestoneId": "uuid", "totalManualEstimate": 7200, "totalAutomatedEstimate": 1800, "totalMixedEstimate": 4500, "testRunCount": 5, "testCaseCount": 150 } ``` -------------------------------- ### Copy environment file for production Source: https://docs.testplanit.com/docs/building-from-source Copy the example environment file to create a production configuration. At minimum, set DATABASE_URL, NEXTAUTH_SECRET, NEXTAUTH_URL, and VALKEY_URL. ```bash cp testplanit/.env.example testplanit/.env.production ``` -------------------------------- ### Get Repository Case Forecasts API Response Source: https://docs.testplanit.com/docs/user-guide/forecasting Example JSON response from the repository case forecasts endpoint. Contains forecast details for each case including manual, automated, and mixed estimates. ```json { "forecasts": [ { "caseId": "uuid", "manualEstimate": 300, "automatedEstimate": 60, "mixedEstimate": 180, "areAllCasesAutomated": false } ] } ``` -------------------------------- ### Clone and Setup Repository Source: https://docs.testplanit.com/docs/deployment Commands to clone the TestPlanIt repository and navigate into the project directory. ```bash # Clone the repository git clone https://github.com/testplanit/testplanit.git cd testplanit/testplanit ``` -------------------------------- ### Test Strategy Document Example Source: https://docs.testplanit.com/docs/user-guide/projects/documentation A Markdown template for a test strategy document defining objectives, testing types with frameworks and coverage targets, and a risk assessment. Use as a starting point for structuring your strategy. ```markdown # Test Strategy ## Objectives - Ensure all critical user flows are tested - Maintain 80%+ code coverage - Automate regression tests ## Testing Types ### Unit Testing - Framework: Jest - Coverage target: 80% - Responsible: Developers ### Integration Testing - Framework: Playwright - Environment: Staging - Frequency: Every release ## Risk Assessment - High Risk: Payment processing - Medium Risk: User authentication - Low Risk: UI cosmetics ``` -------------------------------- ### Start the development server Source: https://docs.testplanit.com/docs/manual-setup Launch the Next.js development server from the application directory. ```bash pnpm dev ``` -------------------------------- ### GitHub Actions workflow for E2E tests Source: https://docs.testplanit.com/docs/sdk Example GitHub Actions workflow that runs E2E tests on push and pull request events. It sets up Node.js 20, installs dependencies with npm ci, and runs the test:e2e script with the TESTPLANIT_API_TOKEN secret. ```yaml name: E2E Tests on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' - name: Install dependencies run: npm ci - name: Run E2E tests env: TESTPLANIT_API_TOKEN: ${{ secrets.TESTPLANIT_API_TOKEN }} run: npm run test:e2e ``` -------------------------------- ### Example parameter configuration Source: https://docs.testplanit.com/docs/user-guide/shared-steps Displays the parameter configuration for the 'User Login' shared step. ```text Shared Step: User Login Parameters: - username: "testuser@example.com" - password: "SecurePassword123" - expected_role: "Administrator" ``` -------------------------------- ### Manual Installation Commands Source: https://docs.testplanit.com/docs/sdk/jira-forge-app Commands to manually install the Forge app in development. Run `cd forge-app` to enter the app directory, then `npx forge install` to install the app and select your Jira instance when prompted. ```bash cd forge-app npx forge install ``` -------------------------------- ### Install @testplanit/wdio-reporter Source: https://docs.testplanit.com/docs/sdk Install the TestPlanIt WebdriverIO reporter package via npm. ```bash npm install @testplanit/wdio-reporter ``` -------------------------------- ### Copy environment file for development Source: https://docs.testplanit.com/docs/docker-setup Copies the .env.example file to .env.development for development setup. ```bash cp .env.example .env.development ``` -------------------------------- ### Install @testplanit/api Source: https://docs.testplanit.com/docs/sdk Install the TestPlanIt API client package via npm. ```bash npm install @testplanit/api ``` -------------------------------- ### Copy environment file for production Source: https://docs.testplanit.com/docs/docker-setup Copies the .env.example file to .env.production for production setup. ```bash cp .env.example .env.production ``` -------------------------------- ### Install TestPlanIt CLI on macOS (Intel) Source: https://docs.testplanit.com/docs/cli Downloads the macOS x64 binary, makes it executable, and moves it to /usr/local/bin. Requires curl and sudo. ```bash curl -L -o testplanit https://github.com/testplanit/testplanit/releases/download/cli-v1.0.0/testplanit-macos-x64 chmod +x testplanit sudo mv testplanit /usr/local/bin/ ``` -------------------------------- ### Install Playwright Browsers Source: https://docs.testplanit.com/docs/e2e-testing Command to install the necessary browser binaries for Playwright. ```bash cd testplanit pnpm exec playwright install ``` -------------------------------- ### Production OpenAI Integration Example Source: https://docs.testplanit.com/docs/user-guide/llm-integrations Example configuration for an active OpenAI integration. ```text Name: "Production OpenAI" Provider: OPENAI Model: gpt-4-turbo-preview Status: ACTIVE ```