You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
->setVirtualUsers(1) // number of VUs (Virtual Users)
58
-
// ->setDuration('1s') // to run the test for 1 second
59
-
->setHttpDebug(true); // to enable http debug mode remove it if you don't want to see the http debug
60
-
61
-
// Create login scenario
62
-
$loginScenario = $test->scenario('User Login')
63
-
->autoHandleCookies(); // this will save cookies with all requests in this scenario
64
-
65
-
66
-
$loginScenario->step('Register')
67
-
->get('http://localhost:8001/register')
68
-
->extractFromRegex('csrf_token_register', 'name="_token" value="(.+?)"') // Extract the csrf token to submit a form
69
-
->header('Accept', 'text/html');
70
-
71
-
$loginScenario->step('Submit Register')
72
-
->post(
73
-
'http://localhost:8001/register',
74
-
'_token=${csrf_token_register}&name=Test-v&email=${email}&password=${password}&password_confirmation=${password}') // send data with extracted data and source file
0 commit comments