Forum Discussion

Happy's avatar
Happy
Contributor
9 years ago

Change Properties for new test project

I have test step Properties in test project. I use test project for two different customer and need only to change Properties. How to implement changing of properties for every new test project. I ru...
  • Happy's avatar
    9 years ago

    It can be implemented using Groovy step.

     

    // get value
    def project = testRunner.getTestCase().getTestSuite().getProject()
    def value = "name" + project.properties['value'].value 
    
    // set values 
    testRunner.testCase.getTestStepByName("step1").setPropertyValue("Username", value)
    testRunner.testCase.getTestStepByName("step1").setPropertyValue("Password", value)