12345678910111213141516171819202122 |
- #!/bin/bash
-
- # Prompt user for the prefix value
- read -p "Enter the prefix for the URL: " prefix
-
- # Variables
- TESTS=200
- PATHS="/rest/user/whoami"
- CONCURRENT=10
-
- # Run ApacheBench with the specified prefix
- /usr/bin/ab -v 0 -q -S -d \
- -X "gslab-juiceshop.com.edgekey-staging.net:80" \
- -c$CONCURRENT -n$TESTS \
- -H "task:rateControlTest" \
- -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36" \
- -H "Accept-Encoding: gzip" \
- -H "Accept: */*" \
- -H "referer: http://${prefix}.gslab-juiceshop.com/" \
- -H 'accept-language: en-US,en;q=0.9,es;q=0.8' \
- -H 'cookie: language=en; welcomebanner_status=dismiss; io=H1-9Vtxayp4pdpaQAABZ' \
- "http://${prefix}.gslab-juiceshop.com/$PATHS"
|