-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
95 lines (76 loc) · 2.96 KB
/
.env.example
File metadata and controls
95 lines (76 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# K6 Performance Framework - Environment Configuration Example
#
# Copy this file to .env and update with your values
# Then run: k6 run --env-file .env scenarios/smoke-test.js
#
# Or pass variables directly: k6 run -e BASE_URL=https://api.example.com scenarios/smoke-test.js
# =============================================================================
# API Configuration
# =============================================================================
# Base URL for API endpoints
# Examples:
# - Development: https://dev-api.example.com
# - Staging: https://staging-api.example.com
# - Production: https://api.example.com
BASE_URL=https://jsonplaceholder.typicode.com
# API Key for authentication
# Get this from your API provider or admin panel
API_KEY=reqres-free-v1
# Request timeout (seconds)
# Increase for slower APIs or complex operations
TIMEOUT=30s
# =============================================================================
# Environment & Debugging
# =============================================================================
# Environment name (dev/staging/prod)
# Used for logging and conditional logic
ENVIRONMENT=dev
# Debug mode (true/false)
# Enables verbose logging when true
DEBUG=false
# =============================================================================
# Test Execution Parameters
# =============================================================================
# Think time range (seconds)
# Simulates realistic user behavior between requests
# Format: integer values
THINK_TIME_MIN=1
THINK_TIME_MAX=3
# =============================================================================
# Authentication Examples (Uncomment as needed)
# =============================================================================
# Bearer Token Authentication
# AUTH_TOKEN=your-bearer-token-here
# Basic Authentication
# API_USERNAME=your-username
# API_PASSWORD=your-password
# OAuth 2.0
# CLIENT_ID=your-client-id
# CLIENT_SECRET=your-client-secret
# Session-based Authentication
# USERNAME=your-username
# PASSWORD=your-password
# =============================================================================
# Advanced Configuration
# =============================================================================
# Custom headers (comma-separated)
# CUSTOM_HEADERS=X-Custom-Header:value,X-Another:value
# Rate limiting (requests per second)
# RATE_LIMIT=10
# Max concurrent connections
# MAX_CONNECTIONS=100
# =============================================================================
# Notes
# =============================================================================
#
# 1. Never commit .env files to version control
# 2. Add .env to .gitignore
# 3. Use different .env files for different environments:
# - .env.dev
# - .env.staging
# - .env.prod
#
# 4. Example usage by environment:
# k6 run --env-file .env.dev scenarios/smoke-test.js
# k6 run --env-file .env.staging scenarios/load-test.js
# k6 run --env-file .env.prod scenarios/stress-test.js