Forum Discussion

Aaronliu's avatar
Aaronliu
Frequent Contributor
13 years ago

Is there a way to clear all properties in testSuite level

Dear All,
I create a testSuite which contains a dozen of test cases, and each test case have its own properties file(define some data in file). some property are defined in test suite level. I want to clear out the previous all values when to start to run the next test case. would you post me a script to do this?

2 Replies

  • Finan's avatar
    Finan
    Frequent Contributor
    run from testCase tearDown script:
    testSuite = testRunner.testCase.testSuite
    for(int i=0;i<testSuite.getPropertyCount();i++)
    {
    testSuite.getPropertyAt(i).setValue("");
    }
  • Aaronliu's avatar
    Aaronliu
    Frequent Contributor
    thanks Finan.
    that is very helpful for me.

    Finan wrote:
    run from testCase tearDown script:
    testSuite = testRunner.testCase.testSuite
    for(int i=0;i<testSuite.getPropertyCount();i++)
    {
    testSuite.getPropertyAt(i).setValue("");
    }


    thanks,
    Aaron