Knowledge Base Article

Operating with TestCase properties


Create a script which updates values of the selected options in all TestCases within the current TestSuite. All the options from the Basic tab should be available for modification ( - it's up to the script user which ones to comment/uncomment before running the script.



Below scripts to update properties of test case in basic option. I post all of them as screenshot attached( Maybe can better construct following scripts rather than writing similar method. FYI



def searchProperties = {testcase, boolean flag -> testcase.setSearchProperties(flag)}
def httpSession = {testcase, boolean flag -> testcase.setKeepSession(flag)}
def abortFailOnError = {testcase, boolean flag -> testcase.setFailOnError(flag)}
def failTestCaseOnErrors = {testcase, boolean flag -> testcase.setFailTestCaseOnErrors(flag)}
def testCaseTimeout = {testcase, long num -> testcase.setTimeout(num)}
def discardResult = {testcase, boolean flag -> testcase.setDiscardOkResults(flag)}
def maxResults = {testcase, int num -> testcase.setMaxResults(num)}

testSuite.getTestCaseList().each{testcase ->, true), true), false) // note its status, true) // note its status, 10000), true), 10)



Updated 3 years ago
Version 1.0

Was this article helpful?

No CommentsBe the first to comment