Forum Discussion
Finan
15 years agoFrequent Contributor
Hi,
You can set a testSuite property from the free version of soapUI.
Use the following line in the setup script on testSuite level: runner.testSuite.setPropertyValue("date", new Date().format("yyyy-MM-dd'T'hh:mm:ssZ"))
or use the following line in a setup script on testCase level or in a groovy script testStep: testRunner.testCase.testSuite.setPropertyValue("date", new Date().format("yyyy-MM-dd'T'hh:mm:ssZ"))
to set a testCase property:
Use the following line in the setup script on testSuite level: runner.testSuite.getTestCaseByName("name").setPropertyValue("date", new Date().format("yyyy-MM-dd'T'hh:mm:ssZ"))
or use the following line in a setup script on testCase level or in a groovy script testStep: testRunner.testCase.setPropertyValue("date", new Date().fomrat("yyyy-MM-dd'T'hh:mm:ssZ"))
You can retrieve these values from your test request parameters with either:
${#TestCase#date} (to access the testCase property)
${#TestSuite#date} (to access the testSuite property)
You can set a testSuite property from the free version of soapUI.
Use the following line in the setup script on testSuite level: runner.testSuite.setPropertyValue("date", new Date().format("yyyy-MM-dd'T'hh:mm:ssZ"))
or use the following line in a setup script on testCase level or in a groovy script testStep: testRunner.testCase.testSuite.setPropertyValue("date", new Date().format("yyyy-MM-dd'T'hh:mm:ssZ"))
to set a testCase property:
Use the following line in the setup script on testSuite level: runner.testSuite.getTestCaseByName("name").setPropertyValue("date", new Date().format("yyyy-MM-dd'T'hh:mm:ssZ"))
or use the following line in a setup script on testCase level or in a groovy script testStep: testRunner.testCase.setPropertyValue("date", new Date().fomrat("yyyy-MM-dd'T'hh:mm:ssZ"))
You can retrieve these values from your test request parameters with either:
${#TestCase#date} (to access the testCase property)
${#TestSuite#date} (to access the testSuite property)