Contributions
Set active environment by id or endpoint
Hi, I'm working on a script in READYAPI and ran into the following problem. I have to create a script that switches environment 2 after the testsran on environment 1. I have a solution for it, but it does not work on SOAP UI. Currently I use the environment names in the script to identify and change the envs.But in SOAP UI envrionments don't have names. My question is there any other way to switch the environment from script? Like id or the endpoint? Or is there a way to get a list about the available environments? Here is my code: if(testRunner.testCase.project.getActiveEnvironment().name=="DevEnv") { testRunner.testCase.project.setActiveEnvironment("IntegrationEnv") testRunner.gotoStepByName("TestStep1") } Thanks for the help!8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.7KViews0likes2CommentsDatasink issues
Hi! I just recently started to work with datasink steps and I have encountered a few issues I could not find solution to so I am going to ask them here: 1. Datasink writes everything into 1 row I would like to export response times into an excel file by using DataSink. I set the template, set the output file, the worksheet. I add properties: Title of the request (first column A2) Response time (second column B2) I always start writing into the sheet from A2 cell. If it's only one entry no problem. If I add more properties with the title and response time of other requests they will all be put into the same row. The question: how can I put the data into the next row? Do I have to Create a separate datasink for it? 2. Existing data in excel is overwritten every time I try to record the response time of similar Rest and Soap requests from different projects. I would like to save the data into the same excel file. Even though the data writing should start from a different cell (A2 - in case of Rest, B2 in case of SOAP) it is always overwritten and by the previously ran datasink. Even if I try to write the data on another worksheet. Would the template cause it? My template contains two sheets the first holds the header (Title and Response in A1 and B1) the second is empty. But as said before, even if I write on the second worksheet the data from the first will be removed. Your help is appreciated! Thank you!8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1KViews0likes1CommentSkipping assertions in a test case
Hi, I have a question regarding assertions. So Ihave a few assertions in a test step which build upon each other in a tree like structure. So for example, if assertion1 fails it should fail assertions from 2 to 10 . Imanaged to figure out how to fail assertions but they are ran after they are failed so Ididn't save any time with it. Itried disabling the assertions, but it's very very slow, and sometimes it crashes the whole application. Here is some of our code(It's inserted into a script assertion): def assertionList=messageExchange.modelItem.getAssertionList() def currentStep=messageExchange.modelItem String status=assertionList[1].status if(status=='FAILED') { for(int i=2; i<10;i++) { String can=assertionList[i].name currentStep.assertions[can].status="FAILED" } } I use the above code when trying to disable the assertions and it looks like this: def assertionList=messageExchange.modelItem.getAssertionList() def currentStep=messageExchange.modelItem String status=assertionList[1].status if(status=='FAILED') { for(int i=2; i<10;i++) { String can=assertionList[i].name currentStep.assertions[can].disabled=true } } Is there a way to skip the assertions that I fail? Like something similar to goToTestStep() ?8 years agoPlace ReadyAPI QuestionsReadyAPI Questions650Views0likes0CommentsRe: Failing test cases
The script runs if testStep4 fails. This is how I know the jump works correctly.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews0likes0CommentsFailing test cases
Hi! I'm working with SOAPUI NG PRO and ran into the following issue: In a test case I have many test steps. I would like to create a "hierarchy" between them. So for example: testStep4 - checks if a field exists in the response testStep4.1 - counts if the field is only present once testStep4.2 - checks the value of the field testStep5 - next main test step If testStep4 fails I would want to: 1. Fail 4.1 and 4.2 without executing them 2. Continue from testStep5 I have a groovyscript (branching path1) which decides what to do. It's after testStep4. I can do the skipping part by: testRunner.gotoStepByName("testStep5") but I couldn't find a solution for setting testStep4.1 and 4.2 to failed. I googled it but could not find a solution. How would you guys take care of this? Or if you have any idea how to work around this, please tell me! Thanks!Solved8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews0likes5Comments