Contributions
Re: Setting/using properties in the cmd
So I've been working on resolving this issue all morning, and I see in my log fileI have this: 2017-01-12 11:45:00,615 INFO [SoapUITestCaseRunner] Setting project property [analysisId] to ['Testing_01_12_17_06'] 2017-01-12 11:45:00,616 INFO [SoapUITestCaseRunner] Running SoapUI tests in project [GenerateAnalysisAndReport - REST] 2017-01-12 11:45:00,618 INFO [SoapUITestCaseRunner] Running Project [GenerateAnalysisAndReport - REST], runType = SEQUENTIAL 2017-01-12 11:45:00,634 INFO [SoapUITestCaseRunner] Running SoapUI testcase [RunFromScript] 2017-01-12 11:45:00,634 INFO [SoapUITestCaseRunner] running step [setupPropertiesAndRun] 2017-01-12 11:45:01,073 INFO [log] 2 2017-01-12 11:45:01,073 INFO [log] If you notice in the first line it tells me it is setting the property. But the last line from this snipit of log file should be outputting the value of "analysisId", which you can see is null. I am outputting this value using this methods: def analysis_ID = testRunner.testCase.testSuite.project.properties["analysisId"].value log.info(testRunner.testCase.testSuite.getPropertyValue('dataset')) log.info(analysis_ID) so even though it just told me that the property analysisId was set it then comes up null. I have no clue what could be causing this.1.6KViews0likes0CommentsRe: Setting/using properties in the cmd
Setting the properties in a groovy script (the method I was previously using) was working fine. These properties are at the testSuite level so that I can access then in Different Testcases. My need has changed and some of the properties need to be set externally from the cmd line instead of in an internal groovy script. This is what is not working. When I look at the log file my property "analysisId" is never being set (I am using the commands listed in my original post). Also the double quotes are needed because the payload string for the website needs to have " " around it that is why i have the string being set with ' ' but contains "analysisIdString" inside of it. That works perfectly fine when set from inside a groovy script in soapUI, it only when trying to set the property from a command line that it is not working. I think the problem is trying to call the property and I am calling it wrong. I am using " { "analysisId": ${#TestSuite#analysisId}, "datasetId": ${#TestSuite#datasetId}, "outputPlotting": ${#TestSuite#outputPlotting}, "truthAnalysis": ${#TestSuite#truthAnalysis}, "truthPlotting": ${#TestSuite#truthPlotting}, "useCases": ${#TestSuite#useCases}, "reports": ${#TestSuite#reports}, "makeCombinedReport": ${#TestSuite#makeCombinedReport}, "reportOutputType": ${#TestSuite#reportOutputType}, "outputDir": ${#TestSuite#outputDir} } " to use all of my properties. Many of these are still set in a groovy which works properly but analysisId needs to be set from the command line and the method above has analysisId as null when I use -PanalysisId = ""MyID"' in the cmd line. Thank you for you help and sorry for the unclear message earlier.1.6KViews0likes1CommentSetting/using properties in the cmd
I have properties set in my Testcases, I am trying to automate my test at work so two of these properties now need to be set using the cmd properties. I have originally set these properties via the TestSuite so I can use them in multiple TestCases. for instance: testRunner.testCase.testSuite.addProperty('analysisId') testRunner.testCase.testSuite.setPropertyValue('analysisId','"Testing_01_11_17_05"'). i think later use the property using this line: "analysisId": ${#TestSuite#analysisId}, in a put json payload. I have tried using this cmd command as follows and it is not working: "testRunner.bat" "project" -PanalysisId='"Testing_01_11_17_05"' It seems that the property is not being saved. Thanks for your help1.6KViews0likes3CommentsSetting/using properties in the cmd
I have properties set in my Testcases, I am trying to automate my test at work so two of these properties now need to be set using the cmd properties. I have origianly set these properties via the TestSuite so I can use them in multiple TestCases. for instance: testRunner.testCase.testSuite.addProperty('analysisId') testRunner.testCase.testSuite.setPropertyValue('analysisId','"Testing_01_11_17_05"'). i think later use the property using this line: "analysisId": ${#TestSuite#analysisId}, in a put json payload. I have tried using this cmd command as follows and it is not working: "testRunner.bat" "project" -PanalysisId='"Testing_01_11_17_05"' It seems that the property is not being saved. Thanks for your helpSolved1KViews0likes1CommentCondition GoTo When I have JSon not XML
From what I've read so far is seems like you need an XPath to use the Conditional GoTO but I do not have and XML information, I only haveJson. Is there a way for me to still use a Conditional GoTo without having an XPath or will we have to rework our entire system to output XML information, which may be out of the question?1.4KViews0likes1Comment