ReadyAPI - How to use code in the custom properties of a test step ?
Say we have a test step which actually calls/runs some test case. One of the properties, say ID has a variable value which is set by something else (script, another test step etc.). E.g. like this: ID :${TestCase-GetId#ID}. Can I use code inside the value box/field to alter the value of ID? This will be useful for ad hoc testing or could be used normally in the test. E.g. ID : ${TestCase-GetId#ID}.subString(0, 5). I don't want to create another groovy script for minor changes to property values. I know that we can prepend or append constants to the value easily like this - ID : MyId_${TestCase-GetId#ID}. But, I don't know if we can use code there instead. If we can use code, then are there any limitations (e.g. the code should be 100 characters or less) ? Keywords - script in custom properties editor, code in custom properties editor, alter the value of a custom property, code in the value of a custom property, script in the value of a custom property, code in the custom properties of a test step.Solved1KViews0likes2CommentsAdd or Build HTTP Request TestStep to Test Case through Groovy Script
Hello, I would like to create a new Test Step to an existing Test Case, I would like this to be an HTTP Request type. I've seen and completed examples of creating Groovy Test Steps to an existing Test Case, see below: def project = context.testCase.testSuite.project; def testSuite = project.getTestSuiteByName("Library"); def testCase = testSuite.getTestCaseByName("Modified Transactions"); def newStep = testCase.addTestStep("groovy", "HelloGroovy").setScript("log.info 'Hello'"); However, I would like to add an HTTP Request type and complete the necessary properties, endpoints and request, etc... It looks like this post is discussing somewhat what I want to do, how can I find the definition of all the step types, it only has EMAIL? Any help is most welcome.2.1KViews0likes2Comments