应用程序在chrome浏览器上运行,请问使用什么工具可以对该应用进行压力测试啊?
1条回答 默认 最新
m0_57409982 2021-04-29 15:11关注假如你的程序可以通过链接在chrome浏览器上跑,那么你可以看看k6 https://k6.io/docs/
压力测试脚本:
import http from 'k6/http'; import { check, group, sleep } from 'k6'; export let options = { stages: [ { duration: '5m', target: 100 }, // simulate ramp-up of traffic from 1 to 100 users over 5 minutes. { duration: '10m', target: 100 }, // stay at 100 users for 10 minutes { duration: '5m', target: 0 }, // ramp-down to 0 users ], }; export default function () { http.get('http://test.k6.io'); sleep(1); }解决 无用评论 打赏 举报