Forum Discussion

srizzling's avatar
srizzling
New Contributor
11 years ago

Inactive Environment Handling

It seems like (requires a little more verification) when running via the commandline there is a check to ensure there is access to all the environments. This seems to be a bug, if we have particular enviromment that won't have access from the CI (local dev machines).


I am unsure if this is a bug, or something we can work around. Any ideas?
  • srizzling's avatar
    srizzling
    New Contributor
    Alright a bit more debugging has found that command line arguments need to be in a certain order.. is this true?
    • nmrao's avatar
      nmrao
      Icon for Champion Level 2 rankChampion Level 2
      What you mean by "arguments needs to be in certain order"? Can you explain little more on what you tried?
      • srizzling's avatar
        srizzling
        New Contributor

        Sorry about that.

        So, I have written a python script, that wraps command line execution our tests. This python script does a few things, but the core of it is shown below

        command = command + "-E%s -F%s -R\"%s\" -A -j -f %s \"%s\"" % ( config["environment"], config["report"]["type"], config["report"]["name"], config["report"]["location"], config["project"]) command = appendProjectProperties(popProps(), command) return command
        # Read the project properties file, and append the project properties file to the command line def appendProjectProperties(config, command): print "===== Appending Project Properties to command line =====" with open("..\\Project Files\\properties.properties") as f: for line in f: # Split line by = on the first occurance... side affect of this is that if props has an "=" lineSplit = line.split("=", 1) key = lineSplit[0].rstrip() # Replace all quotes with single quotes, # the auth key has quotes which breaks the command value = lineSplit[1].rstrip().replace('"', "'") # Append command and loop to next line command = command + " -P\"" + key + "\"=\"" + value + "\"" return command

        The problem I have found is that "-E" isn't switch the ENV. No matter what I do. Am I doing something wrong?