We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 142b7cd commit ff1e268Copy full SHA for ff1e268
tests/simulation_test.sh
@@ -0,0 +1,20 @@
1
+#!/bin/bash
2
+
3
+# This script is used to simulate a load test on the task server
4
+# We have 2 parameters, the first one is the host, second Authorization token
5
6
+if [[ ! -n $1 ]];
7
+then
8
+ echo "No HOST provided"
9
+ exit 1
10
+fi
11
12
+for i in `seq 1 40`
13
+do
14
+ curl \
15
+ -X POST "$1/task" \
16
+ -H 'Content-Type: application/json' \
17
+ -H "Authorization: $2" \
18
+ -d '{"script": "await agent.goto(\"https://example.com/\"); await agent.waitForMillis(10000); resolve(await agent.document.title);"}' \
19
+ > /dev/null &
20
+done
0 commit comments