Authentication:
- AWS Cognito
- AWS Cognito Hosted UI
API Authorization and Throttling:
- AWS API Gateway with Cognito Authorizer
- AWS API Gateway with API Keys
Backend execution:
- AWS Lambda
# Bootstrap the Sentry environment | |
from sentry.utils.runner import configure | |
configure() | |
from sentry.models import Team, Project, User, ProjectKey | |
def get_user(a_user): | |
for user in User.objects.all(): | |
if user.get_username() == a_user: | |
return user |
{ | |
"test_name": "Add to cart workflow", | |
"num_clients": 250, | |
"hatch_rate": 250, | |
"run_time": 60, | |
"domain_name": "my-magento-website.com", | |
"protocol": "https", | |
"test_region": [ | |
"us-east-1" | |
], |
Authentication:
API Authorization and Throttling:
Backend execution:
import collections | |
import base64 | |
import json | |
import urllib.parse | |
# Crypto can be found at https://pypi.org/project/pycryptodome/ | |
from Crypto.PublicKey import RSA | |
from Crypto.Hash import SHA1 | |
from Crypto.Signature import PKCS1_v1_5 | |
import phpserialize |
image: "alpine:3.10" | |
stages: | |
- load_test | |
variables: | |
API_KEY: your_api_key | |
TIMEOUT: 40 | |
before_script: |
#!groovy | |
def timeout=40 | |
def API_KEY=your_api_key_here | |
pipeline { | |
agent any | |
stages { | |
stage('StartLoadTest') { |
export API_KEY=the api key you received in your mailbox | |
export REQUEST=the value that was generated when you | |
created the test and offered in the response as | |
"requestId" | |
cat > results-from-bombard.json <<EOF | |
{ | |
"requestId": "${REQUEST}" | |
} | |
EOF |
export API_KEY=the api key you received in your mailbox | |
cat > bombard.json <<EOF | |
{ | |
"numClients": 500000, | |
"hatchRate": 500000, | |
"runTime": 300, | |
"maxThreads": 10, | |
"hostname": "netbears.com", | |
"protocol": "https", |
* status: | |
-> Can be "COMPLETED" or "IN PROGRESS", | |
depending on whether test is still running or not | |
-> If you submit a request with an invalid "requestId", | |
you will get an "IN PROGRESS" reply | |
* input: | |
-> These are all the parameters that you have used to generate the load test | |
* globalStats: |
<MANDATORY PARAMETERS> | |
* numClients: | |
-> The number of users testing your application | |
-> Each user opens a TCP connection to your application and tests it | |
* hatchRate: | |
-> How many users will be added to the current users, per second, | |
until the total amount of users is fulfilled. | |
-> This tells the app how gradually do you want to do the load test |