feat: Add comprehensive k6 load test suite for ToolJet with 15 test scenarios and VU scaling#1
Open
feat: Add comprehensive k6 load test suite for ToolJet with 15 test scenarios and VU scaling#1
Conversation
…cenarios and VU scaling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a complete k6 load testing suite for ToolJet, providing comprehensive performance testing coverage across all major features. The suite includes 15 test
scenarios covering authentication, app building, data sources, workspace management, end users, and enterprise features, with support for adjustable virtual user (VU) scaling.
🎯 Motivation
📊 What's Included
Test Coverage (15 Scenarios)
Authentication Tests (3)
App Builder Tests (3)
Data Source Tests (4)
Workspace Tests (2)
End User Tests (2)
Enterprise Tests (1)
Infrastructure
🔑 Key Features
./runners/run_all_tests.sh 0.5 # 50% VUs for testing
./runners/run_all_tests.sh 2.0 # 200% VUs for stress testing
📁 File Structure
🚀 Usage
Quick Start
Setup environment
cp .env.example .env
Edit .env with your ToolJet instance details
Run individual test
k6 run tests/authentication/login_logout_journey_500vus.js
Run test suite
./runners/run_all_tests.sh
Run with custom VU scaling
./runners/run_datasource_suite.sh 0.5 # 50% VUs
Configuration
All tests can be configured via .env:
BASE_URL=<site_endpoint>
WORKSPACE_ID=your-workspace-uuid
EMAIL=dev@tooljet.io
PASSWORD=password
SLEEP_MULTIPLIER=2.5 # Adjust for your environment
🎯 Performance Targets
🔧 Technical Details
Critical Fix: Authentication Headers
All tests use the correct authentication header format:
// CORRECT (capital T and W):
headers: { 'Tj-Workspace-Id': workspaceId }
// WRONG (would cause 401 errors):
headers: { 'tj-workspace-id': workspaceId }
Test Pattern
Each test follows a complete user journey:
export default function () {
// 1. Login
let authData = login();
}
📚 Documentation
✅ Testing
All 15 test scenarios have been validated to:
🔍 Cypress Test Mapping
This suite is based on existing Cypress tests from:
See docs/CYPRESS_MAPPING.md for detailed mapping.
🎓 Future Enhancements
Potential additions (out of scope for this PR):
📝 Notes