Forum Discussion

asseldonk01's avatar
asseldonk01
Contributor
6 years ago
Solved

How to use groovy to cleanup the properties teststep

I have read a lot in this forum and in other places to cleanup project/testsuite/testcase properties. I was looking for some groovy to cleanup the properties teststep with a script. There is a setting to clear all values when saving but I am searching for a script so that I can decide when to cleanup. The name of these teststeps very but it is always of type properties teststep.

Any idea?

  • Sorry for my post, found it already.

    log.info "--Type:" +testSteps.config.type

    if (type == "properties") {
    log.info "~~~Cleaning Properties Test Step:" + testSteps.name
    testSteps.clearPropertyValues()
    }

2 Replies

  • Sorry for my post, found it already.

    log.info "--Type:" +testSteps.config.type

    if (type == "properties") {
    log.info "~~~Cleaning Properties Test Step:" + testSteps.name
    testSteps.clearPropertyValues()
    }

    • Olga_T's avatar
      Olga_T
      SmartBear Alumni (Retired)

      Hi asseldonk01

       

      Thanks for sharing the found solution with the Community! 

      Do you mind accepting your latest message as a Solution to this topic? This way, other users will easily find it when searching for a solution if they face the same question.

       

      Thank you in advance!