Contributions
Re: Download XML attachments in QAComplete
FinneganStetsonfirst, thank you for your feedback. However, can you please answer the following questions for me? Log in with administrative rights You mean on the QAComplete server, right? Find the File Attachment or File Types section and specify the XML file type or extension. Where exactly do you mean, in QAComplete in the administration area or in the file system? Could you please send me a screenshot? Thank you very much!12 months agoPlace QAComplete QuestionsQAComplete Questions1.1KViews0likes0CommentsDownload XML attachments in QAComplete
Hello all In QAC On-Prem, we want to add an XML attachment to a TestCase and then download them again later. Currently we get the following error message, when we try to download the attachment: {"errors":[{"message":"'Xml' Features have been disabled by your administrator","code":403}]} Currently we use the following workaround. 1. click on the file icon 2. select "save link as Is there a setting in QAComplete to allow the download of XML files? Many thanks Jens1.4KViews0likes1CommentRe: Is there a way I can input a specific value what will only run tests with that value
Hicaz88 I do not know how your project is constructed and how exactly you access your datasource but you can skip the execution of the testcases with the following approach: def objGlobalProperties = com.eviware.soapui.SoapUI.globalProperties; //set the global property -> if the property does not exist then it will be created automatically objGlobalProperties.setPropertyValue("globalPropertyName", "globalPropertyValue"); //get the global property def strValue = objGlobalProperties.getPropertyValue("globalPropertyName"); //cancel testCase if value is not equal the dataSource value if(strValue != "value from dataSource"){ testRunner.cancel("skip testCase execution"); } Best regards meinTest GmbH www.meinTest.software SmartBear preferred value-added Service Provider in the DACH region5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2KViews0likes2CommentsRe: Is there a way I can input a specific value what will only run tests with that value
Hi Caz88, if I understand you correctly, your question is only, how you access the global properties from a groovyScript, right? If yes, the answer is as follows: def objGlobalProperties = com.eviware.soapui.SoapUI.globalProperties; //set the global property -> if the property does not exist then it will be created automatically objGlobalProperties.setPropertyValue("globalPropertyName", "globalPropertyValue"); //get the global property def strValue = objGlobalProperties.getPropertyValue("globalPropertyName"); log.info("The value is:" + strValue); Best regards meinTest GmbH www.meinTest.software SmartBear preferred value-added Service Provider in the DACH region5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2KViews0likes4CommentsRe: Pass variable from Groovy Script to request
Hi Maximus, you have different issues in your script. 1. you try to set the testStep property. As far as I know you can not do that (it makes no sense because you could also write the value in the same request) testRunner.testCase.testSteps["Disable"].setPropertyValue('ID', job2) Therefore use the testCase.setPropertyValue... 2. you try to set the value with the variable 'job2' but job2is not instantiated and / or is not set in the script you should use job testRunner.testCase.testSteps["Disable"].setPropertyValue('ID', job2) Following is a script which should fix your error def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def holder = groovyUtils.getXmlHolder( "getBank#Response" ) for(job in holder.getNodeValues("//*[local-name()='identifier']")){ if (job.contains("70144")){ testRunner.testCase.setPropertyValue('ID', job); testRunner.runTestStepByName("Disable"); } } Best regards meinTest GmbH www.meinTest.software SmartBear preferred value-added Service Provider in the DACH region6.2KViews0likes1CommentRe: Is there a way to get the current script name?
For JavaScript, I found the following workaround. Maybe it will help others. I createa try-catch block. Within the try Iprovoke an exception, this one Icatch-upwith the catch and read-out the function name in the stack. Note: this also works across several units -> USEUNIT function getCaller(){ let arrStackLines = []; try{ throw new Error("throw a error to get the stack"); }catch(objE){ arrStackLines = objE.stack.split("\n"); } let strLine = arrStackLines[arrStackLines.length -1]; let intStart = strLine.indexOf("at ") + 3; let intEnd = strLine.indexOf("(<"); Log.Message(strLine.substring(intStart, intEnd)); } Best regards meinTest GmbH www.meinTest.software SmartBear preferred value-added Service Provider in the DACH region1.8KViews0likes0CommentsRe: Is there a way to return the name of the current sub routine or function?
For JavaScript, I found the following workaround. Maybe it will help others. I createa try-catch block. Within the try Iprovoke an exception, this one Icatch-upwith the catch and read-out the function name in the stack. Note: this also works across several units -> USEUNIT function getCaller(){ let arrStackLines = []; try{ throw new Error("throw a error to get the stack"); }catch(objE){ arrStackLines = objE.stack.split("\n"); } let strLine = arrStackLines[arrStackLines.length -1]; let intStart = strLine.indexOf("at ") + 3; let intEnd = strLine.indexOf("(<"); Log.Message(strLine.substring(intStart, intEnd)); } Btw. please add my vote..:-) Best regards meinTest GmbH www.meinTest.software SmartBear preferred value-added Service Provider in the DACH region1.6KViews0likes0Comments