spryker/commerce-k6-performance-tests
Composer 安装命令:
composer require spryker/commerce-k6-performance-tests
包简介
K6 performance tests
README 文档
README
This project contains performance tests for the Spryker Commerce applications using K6.
Prerequisites
- Node.js & NPM
- Docker & Docker Compose
Setup
-
Clone the repository:
git clone <repository-url> cd commerce-k6-performance-tests
-
Install dependencies:
npm install
-
Create a
.envfile based on the provided.env.local.example:cp .env.local.example .env
-
Update the
.envfile with the required environment variables.
Scripts
Build
-
Build all tests:
npm run webpack:build
-
Build specific test patterns:
npm run webpack:build --tags=cart-reorder npm run webpack:build --tags=cart,load ...
Docker
-
Start Docker services:
npm run docker:up
-
Stop Docker services:
npm run docker:down
-
Run tests in Docker:
npm run docker:run
Linting and Formatting
-
Check code formatting:
npm run prettier:check
-
Fix code formatting:
npm run prettier:write
-
Lint code:
npm run lint
Running Tests
-
Build the tests:
npm run webpack:build
-
Start Docker services:
npm run docker:up
-
Run the tests:
npm run docker:run
-
Stop Docker services:
npm run docker:down
Configuration
Environment Variables
K6_HOSTENV: Environment for K6 (default:local)K6_NO_THRESHOLDS: Disable thresholds (default:true)SPRYKER_REPOSITORY_ID: Repository ID (default:suite)SPRYKER_TEST_TYPE: Test type (default:smoke)
Project Structure
src/tests: Contains test filessrc/utils: Utility functionssrc/resources: API resource filessrc/pages: Page objectssrc/fixtures: Test data fixturesdist: Compiled test files
Using Grafana
Grafana is used to visualize the performance test results.
-
Start the Docker services:
npm run docker:up
-
Open Grafana in your browser:
http://localhost:3000 -
Navigate to the dashboards to view the performance metrics.
License
This project is licensed under the MIT License.
统计信息
- 总下载量: 53
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-13