ContributionsMost RecentMost LikesSolutionsRe: Groovy and File datasource Hello rich Thanks for your answer Sorry I don't know what OTB means... you have a link or tutorial ? I have to generate a small json object to use as POST in my REST web service I'm use to do it in groovy and store a variable in context for the first time I'm using datasource to read a set of external parameters,for example TITLE;MINDATE;MAXDATE TEST;2001/01/01;2010/01/01 TEST1;2010/01/01;2019/01/01 I have created a datasource FILE step named "DataSource" and the csv seems correctly loaded I'm looping in datasource with datasource loop, seems ok In my groovy script I need to get the 3 fields for each line, manipulate the data and build a json structure def jsonAsText = '''{ "field1" : "string", "field2" : "string", "field3" : "string", }''' def object = slurper.parseText(jsonAsText) I found some groovy examples to get datasource fields like def row = testRunner.testCase.testSteps["DataSource"].currentRow; def thetitle = context.expand( '${DataSource#TITLE}' ) I looking for a full example of FILE datasource usage in groovy Thanks for your help Ludovic Groovy and File datasource Hello, I'm using Ready Api 2.6 to test REST web services I'm trying to access to a File Datasource (CSV) with groovy script I have created a File datasource in my testcase, the list of items seems ok, good columns name and data Im creating a groovy script to generate a POST json to include in a REST web service step I'm looking for sample groovy script to access to the datasource infos - number of data lines - loop through rows - get columns values for a specific row I've found some expand example but i didnt succeed to user them correctly Do you have some example that i can use and adapt Thank you Best regards Ludovic Re: Test Coverage Hello, Do you know if there's any improvement concerning coverage in 2.5 ? Thank you Regards Re: REST Resource and method Hello Lucian, Thank you for your answer, This code seems to give the full resources of the web service definitions, not related to a particular step What I need is to list the resource and method really used by each of my project steps (kind of coverage) The property should be found at teststep level ? I've tried code like that def testcasetype = teststep.config.type; def testcasews = teststep.getProperty("Resource") def testcasemet = teststep.getProperty("Method") but gives me nothing usable Thank you Regards REST Resource and method Hello, I'm trying to get the full list of the REST web services used by my project With Groovy I'm listing the suites ,cases and steps but I need some infos displayed by ready api: Resource and Method for a ws request Could you help me to get theses properties ? Thank you Re: Test Coverage Bad news for me :smileysad:, it was working in previous release Thank you for your help Regards Re: Test Coverage Hello, From swagger Thank you Re: Test Coverage Hello Anastasia, Thank for your answer, What I understand is I have to create representations before coverage run. I have nearly one hundred of web services, do I have to check each "auto create" for request and response ? I have tried to check a few, I have executed my test suite using these but no representation are added and my coverage is still empty, did I missed something ? Thank you Regards Test Coverage Hello, I'm testing REST Web services, trying to get a figure about the coverage testing when I run the tests in the Project Coverage panel , figure stays to 0%, like nothing was called ? Is there something special to do to get coverage figures ? Thanks for your help regards Re: JsonSlurper Hi, Thank you, I finally found the complete solution using jsonslurper (with the right import :smileyhappy:) and jsonbuilder Thanks for your help Regards