Contributions
Re: Property transfer into test step of run test case
Hi, I used groovy script to transfer properties into and out of a 'RunTestCase' - pass a line number into the test case. e.g - Before calling OTSOnly - as a RunTestCase def line = testRunner.testCase.testSuite.project.getProperty("normal_line").value; log.info "Xfer line " + line.toString() testRunner.testCase.testSuite.project.getTestSuiteByName("ReuseableCalls").getTestCaseByName("C1").setPropertyValue("inlinenum", line.toString()) log.info "Check line " + testRunner.testCase.testSuite.project.getTestSuiteByName("ReuseableCalls").getTestCaseByName("C1").getPropertyValue("inlinenum") e.g - After calling - extract the session id from the response of the reusable test case and use it in next test step. def sid = testRunner.testCase.getTestStepByName("Run TestCase - C1").getPropertyValue("outsessionid") log.info "Xfer sid " + sid testRunner.testCase.testSuite.project.getTestSuiteByName("ReuseableCalls").getTestCaseByName("C2").setPropertyValue("insessionid", sid.toString()) log.info "Check sid " + testRunner.testCase.testSuite.project.getTestSuiteByName("ReuseableCalls").getTestCaseByName("C2").getPropertyValue("insessionid")8 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes0CommentsCode completion - test suite/case/property names
The script engine has code completion for the methods of the class hierarchy ; which is quite useful. This can be extended to include the current names of TS/TC/Prop names, like so. getTestSuiteByName("ReuseableCalls").getTestCaseByName("CTSOnly").setPropertyValue("insessionid", 'hello'); ^ ^ ^ In the above example, we have to copy paste the names in ""; it would help to have completion/prompting based on the current set of names available at the current level. Thanks and best regards.2.3KViews1like1CommentRe: Reusing Test Case/Suite
Sorry for leaving lots unsaid. Lets say its a test system; input being components under test. the backend that tests, is proper system , i.e not simulated, hence the need to use exact input. the input is a string - like a product code (all numbers). a simple test would be to send in a code that will sent back a known successful result. a load test, i would like to get a mix of results, hence would like to pass in a set of product codes, which could generate different types of results; thus exercising a broader coverage in the backend, than just hammering one area. Hope this makes sense... Bhuvan.2.6KViews0likes1CommentRe: Reusing Test Case/Suite
Dear nmrao, That is one suggestion, but I guess it would not work for me. I am looking for non-random (specific) values to make the calls. One workaround i thought of is to have 2 sets of files; a - single test b - load test Also have the file name and location as project property. And a startup script to setup either single or load test in the project proeprty. Then run the required script; and followup with the actual tests. Based on what file is chosen, the appropriate data set will be fed into the data source loop. Unless, there is a better way that someone can suggest... Bhuvan.2.7KViews0likes5CommentsReusing Test Case/Suite
I have a test case which takes input from project property. This is fine for a single shot test. However for load tests, I see a Datasource is best suited. How do I re-use testcase/suite for a single run and the load test with minimal overhead (or) better , no repetition at all. Thanks Bhuvan.Solved2.7KViews0likes7CommentsRe: Property transfer into test step of run test case
Hi Radford, The prop xfer doesnt seem to work. so i opened a support case and got it sorted using a groovy script; but this is for passing values between RunTestCases. However, What I want to achieve is to pass a property from the top level test case into the (sub) - RunTestCase->TestStep. Here is a example of what I am trying to get - hope this helps with understanding. Thanks Bhuvan.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes2CommentsProperty transfer into test step of run test case
I have a test case (TCBase) that is (planned to be) called in many places. This contains one operation and couple of property xfer steps. I have a Run Test Case step in a higher level test case which call this TCBase. I do have a requirement that each call may have to pass in a property into one of the test steps of the TCBase. From the top level, I could only see the out parameter of the TCBase; none of the internal steps are visible. Is there a way to get data into the TCBase test step? Thanks Bhuvan.Solved8 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes4CommentsAssertion cloning
It would be great to have facility to clone assertions to multiple TestCases in one go. Current support is to target only one test case in a test suite. The same idea can be extended to choose multiple target TestSuites and in each Suite select all/specific TestCases to copy assertions to. Thanks for considering.5.1KViews1like1CommentRe: How to View Run TestCase message content
Hi Tanya, I found that the box was checked for the test cases ; I unchecked them. But then too, the data is not logged after running the 'caller' testcase which has the two 'Run Testcase' steps. I also tried using the http monitor - and I can confirm that the property is not getting transferred from the output of first 'Run Testcase' to the input of second 'RunTestCase' - which us done using the property transfer. The linked post has the Generics.xml which shows the contents of the test case. Any help on transferring output of a RunTC to the input of next RunTC would be helpful. Thanks Bhuvan.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes1Comment