// ***************** Project
Commands***************************
// Define Project object
def project =
testRunner.testCase.testSuite.project
// Get Project Location
log.info project.getPath()
// ***** Get Default Project
Properties
1. Name
log.info project.name
2. Default Scripting Language
log.info
project.getDefaultScriptLanguage()
In Similar fashion we can fetch other
default values of project properties like ‘Description (getDescription)’, etc
// ***** Get Custom Project
Properties
log.info project.getPropertyValue(“Property1”)
// ***** Change/Set default project
property values
1. Name
log.info
project.setName("Currency")
2. Change Default Script Language
log.info project.setScriptLibrary("Groovy")
In Similar fashion we can set other
default values of project properties like ‘Description (setDescription)’, etc
// ***** Set Custom Project
Properties
log.info project.setPropertyValue(“Property1”,
“SampleValue”)
// *******************************************************************
// *********************** Test
Suite Commands***************************
// Define Test Suite object
def sTestSuite =
testRunner.testCase.testSuite
// ***** Get Default Test Suite Properties
## Name
log.info sTestSuite.name
// ***** Get Custom TestSuite Properties
log.info
sTestSuite.getPropertyValue("SuiteProperty1")
// ***** Change default Test Suite property
values
## Name
log.info
sTestSuite.setName("Currency")
// ***** Set Custom Test Suite
Properties
log.info
sTestSuite.setPropertyValue("SuiteProperty1",
"ChangeSampleValue")
// *******************************************************************
// *********************** Test
Case Commands*************************
// Define Test Case object
def sTestCase = testRunner.testCase
// ***** Get Default Test Case Properties
## Name
log.info sTestCase.name
// ***** Get Custom TestSuite Properties
log.info
sTestCase.getPropertyValue("TestCaseProperty1")
// ***** Change default Test Case property
values
## Name
log.info
sTestCase.setName("TestCaseCurrency")
// ***** Set Custom Test Case Properties
log.info
sTestCase.setPropertyValue("TestCaseProperty1",
"ChangeSampleValue")
// *******************************************************************
// ***************** Global Property
Commands**************************
// Define SoapUI Global object
def oGlobal =
com.eviware.soapui.SoapUI.globalProperties
// ***** Get Global property
oGlobal.getPropertyValue("GlobalProperty1")
// ***** Set New Global Property
oGlobal.setPropertyValue("GlobalProperty2",
"GlobalValue2")