Forum Discussion

danielmbanks's avatar
danielmbanks
Occasional Contributor
7 years ago
Solved

Dynamic property means project XML changes after every run

The situation: I have 1 test case (TC1) that dynamically creates a property (imagine a property received from a database, rest call, random number generator, etc.) and a 2nd test case (TC2) that use...
  • groovyguy's avatar
    7 years ago

    If you don't want to save this property, you can use either a groovy script test step at the end of your TC2, or a tear down script, that NULLs this data after running if all tests passed. 


    Here's a sample groovy script:

     

    context.testCase.testSteps["Run TestCase"].setPropertyValue("propFromTestCase1", "");