Skip to main content

Getting Started with TrendGate

Welcome to TrendGate! This guide will help you set up automated test quality monitoring for your projects in just a few minutes.

🚀 Quick Start

Step 1: Create Your Account

  1. Visit app.trendgate.ai
  2. Sign up using your GitHub account or email
  3. Create or join an organization

Step 2: Connect Your Repository

# Install TrendGate CLI
npm install -g @trendgate/cli

# Authenticate
trendgate auth login

# Initialize in your project
cd your-project
trendgate init

Step 3: Configure Quality Policies

Create a .trendgate.yml file in your repository:

version: 1
policies:
test_pass_rate:
threshold: 95 # Minimum pass rate
enforce: true

coverage:
threshold: 80 # Minimum coverage
enforce: true

performance:
lighthouse_score: 90
enforce: false # Warning only

baseline:
branch: main # Compare against main branch
computation: rolling_average # Use 7-day average

Step 4: Add to Your CI/CD Pipeline

GitHub Actions

name: Quality Check
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- name: Run Tests
run: |
npm install
npm test -- --coverage

- name: TrendGate Analysis
uses: trendgate/action@v1
with:
api-key: ${{ secrets.TRENDGATE_API_KEY }}
test-results: ./coverage/lcov.info
fail-on-regression: true

Other CI Systems

# Run tests and generate results
npm test -- --json --outputFile=test-results.json

# Submit to TrendGate
trendgate submit \
--api-key=$TRENDGATE_API_KEY \
--test-results=test-results.json \
--coverage=coverage/lcov.info

📊 Understanding Your Dashboard

Once integrated, your TrendGate dashboard will show:

Quality Metrics

  • Pass Rate: Percentage of passing tests
  • Coverage: Code coverage percentage
  • Flaky Tests: Tests with inconsistent results
  • Performance: Lighthouse/performance scores

Trend Analysis

  • Quality evolution over time
  • Branch comparisons
  • Module-level breakdowns
  • Team performance metrics

🔑 API Key Management

Creating API Keys

  1. Navigate to Settings → API Keys
  2. Click "Create New Key"
  3. Give it a descriptive name (e.g., "GitHub Actions")
  4. Copy the key immediately (shown only once)

Using API Keys

# Set as environment variable
export TRENDGATE_API_KEY=tg_live_xxxxx

# Or pass directly to commands
trendgate submit --api-key=tg_live_xxxxx

👥 Team Setup

Inviting Team Members

  1. Go to Settings → Team
  2. Click "Invite Member"
  3. Choose their role:
    • Admin: Full access to all features
    • Developer: Create API keys, view all data
    • QA Lead: Configure policies, view trends
    • Viewer: Read-only dashboard access

Role Permissions

FeatureAdminDeveloperQA LeadViewer
View Dashboard
Create API Keys
Configure Policies
Manage Team

🎯 Best Practices

1. Start with Baselines

  • Let TrendGate collect data for 1-2 weeks
  • This establishes your quality baseline
  • Policies become more accurate over time

2. Configure Gradually

  • Start with test pass rate monitoring
  • Add coverage requirements once stable
  • Enable performance checks last

3. Use Branch Policies

policies:
feature_branches:
test_pass_rate: 90 # Lower for features
main:
test_pass_rate: 98 # Higher for main

4. Monitor Flaky Tests

  • Review flaky test reports weekly
  • Fix or quarantine unreliable tests
  • This improves CI/CD reliability

🛠️ Troubleshooting

Common Issues

Tests not appearing in dashboard

  • Verify API key is correct
  • Check test result format is supported
  • Ensure CI/CD is submitting results

Quality gates not blocking PRs

  • Confirm GitHub integration is active
  • Check policy enforce is set to true
  • Verify branch protection rules

Incorrect baseline comparisons

  • Check .trendgate.yml baseline configuration
  • Ensure main branch has sufficient history
  • Allow 24 hours for baseline computation

📚 Next Steps

Need help? Join our Discord community or check our FAQ!