← Back to team overview

sikuli-driver team mailing list archive

[Bug 897248] Re: A way to add source ~/environment.settings to the default test runner

 

So the env setting means that (yes Linux) in Ubuntu I can set a file
separate to the unittest files that can hold my email password settings.

This works really well as each user can use the same test scripts and
just point the tool at their person source file.

To call it in bash you set the source ~/my-source-file.txt for example this will then use the objects set in that folder as a global variable.
Source file may include text like
export EMAIL="Me@xxxxxxxxxxx"

So I can call type(os.environ['EMAIL']) at any time and it will type in
my email address.  This works flawlessly if you run the script in the
following manner:

Open terminal
source ~/my-env.txt
/usr/local/Sikuli-IDE/sikuli-ide.sh <testname>

However if I click on run in the IDE window it will get to the
type(os.environ['EMAIL']) and fail.  So I'm wondering if their is  a way
to implement so it runs?

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/897248

Title:
  A way to add source ~/environment.settings to the default test runner

Status in Sikuli:
  New

Bug description:
  Due to the need to share these tests with others I don't want to add
  personal info for things like username and password for tests.

  For this I am using import os and os.environ['name_of_required_field']
  in conjunction with the type command.  This works flawlessly from a
  terminal using source ~/xyz.env for example but will not run in the
  sikuli test gui runner.

  Is there a way to add this functionality some how?

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/897248/+subscriptions


References