Movatterモバイル変換


[0]ホーム

URL:


shinyloadtest1.2.0.9000

Load Testing Authenticated Apps

2018-09-05

Source:vignettes/load-testing-authenticated-apps.Rmd
load-testing-authenticated-apps.Rmd

shinyloadtest supports load testing applications servedbyPositConnect with the following authentication configurations:

  • Connect
    • Password
    • LDAP and Active Directory
    • PAM

Recording

shinyloadtest::record_session will automatically detectwhen an application is protected using a supported authentication schemeand will prompt for a username and password.

Ifrecord_session is called from within an RStudio IDEsession, two UI dialogs will appear. If it’s called from an R session ina command-line setting, prompts will appear on standard output.

The supplied username and password are used for the duration of therecording to interact with the application, but these credentials arenot stored in the recording file.

Load testing

Because credentials are not stored in recordings, a username andpassword or Posit Connect API Key must be supplied toshinycannon in order to load test authenticatedapplications.

shinycannon does not have--user,--password, or--connect-api-key arguments forsecurity reasons, so that these strings will not appear in a processlist. Instead, theSHINYCANNON_USER,SHINYCANNON_PASS, andSHINYCANNON_CONNECT_API_KEY environment variables must beset.SHINYCANNON_CONNECT_API_KEY will take preference overSHINYCANNON_USER andSHINYCANNON_PASS.

On Linux and macOS, you can disable history for any command thatstarts with a space. If using abash:

$ # Disable history for any command that starts with a space$ HISTCONTROL=ignoreboth$  export SHINYCANNON_USER=myUser$  export SHINYCANNON_PASS=myPass$$ shinycannon recording.log https://shinyapp.example.com/ --workers 5 --loaded-duration-minutes 2 --output-dir run1

And if usingzsh:

$ # Disable history for any command that starts with a space$ setopt HIST_IGNORE_SPACE$  export SHINYCANNON_CONNECT_API_KEY=$CONNECT_API_KEY$$ shinycannon connect_recording.log https://connect.example.com/content/545/ --workers 5 --loaded-duration-minutes 2 --output-dir run2

[8]ページ先頭

©2009-2025 Movatter.jp