Command-line browser bots

164 views
Skip to first unread message

Alice CHING

unread,
Nov 29, 2021, 9:11:19 AM11/29/21
to oTree help & discussion
Hi All,

I'm doing a pressure test using the command-line browser bots feature provided by otree. I plan to first launch browser bots with local host, and then move on to test my Heroku server. By the way, my otree version is 3.4.0, for both local and Heroku server.

I've read the documentation several times yet I'm still confused with some steps outlined in the "Command-line browser bots" section.

First, I'm not sure how to set OTREE_REST_KEY correctly for the local server after reading the "REST" section of the documentation. I just added the following line of code to the settings.py but have no idea how to make use of it:

OTREE_REST_KEY = 'some-secret-value'

Second, I don't know how to run "otree browser_bots mysession" after running my server in the command line, since after running my server, it seems impossible for me to execute any command:

command line.png

I'm just a novice programmer and any help is appreciated :)

Thanks a lot,
Ningning

Chris @ oTree

unread,
Nov 30, 2021, 12:47:10 AM11/30/21
to oTree help & discussion
(1) OTREE_REST_KEY is not for settings.py. It's an environment variable / Heroku config var.
(2) Open a second terminal window.

Alice CHING

unread,
Nov 30, 2021, 3:56:34 AM11/30/21
to oTree help & discussion
Hi Chris,

Thank you for the prompt help as always :)

Cheers,
Ningning

Reply all
Reply to author
Forward
0 new messages