Enables Test Case scripts to load Execution Profile(s) dynamically. ExecutionProfilesLoader modifies the GlobalVariable object using Groovy's Meta-programming technique. It can add new entries into the GlobalVariables, update the value of GlobalVariables, clear the added entries.
Modifiers | Name | Description |
---|---|---|
java.lang.Boolean |
alreadyDone |
|
java.lang.Boolean |
onlyOnce |
Constructor and description |
---|
ExecutionProfilesLoader
() |
ExecutionProfilesLoader
(java.nio.file.Path profilesDir) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
clear() |
|
java.util.Map<java.lang.String, java.lang.Object> |
digestProfile(java.nio.file.Path profile) @param profile <? |
|
java.lang.Object |
evaluateGroovyLiteral(java.lang.String literal) Parse the given parameter string as a Groovy script, which is suppose to be a literal of various types. |
|
static int |
loadEntries(java.util.Map<java.lang.String, java.lang.Object> globalVariableEntries) actually update GlobalVariables |
|
int |
loadProfile(java.lang.String profileName) load an Execution Profile to add GlobalVariables dynamically and make them available to Test Case script |
|
int |
loadProfiles(java.lang.String... profileNames) |
|
int |
loadProfiles(java.util.List<java.lang.String> profileNames) load Execution Profiles to add GlobalVariables dynamically and make them available to Test Case script |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
profile
- <?xml version="1.0" encoding="UTF-8"?> <GlobalVariableEntities> <description></description <name>default</name> <tag></tag> <defaultProfile>true</defaultProfile> <GlobalVariableEntity> <description></description> <initValue>'BAR'</initValue> <name>FOO</name> </GlobalVariableEntity> </GlobalVariableEntities>
Parse the given parameter string as a Groovy script, which is suppose to be a literal of various types. Evaluate the script to obtain a Object instanace and return it
actually update GlobalVariables
load an Execution Profile to add GlobalVariables dynamically and make them available to Test Case script
load Execution Profiles to add GlobalVariables dynamically and make them available to Test Case script