Mismatch between response from a CURL request and ReadyAPI response
Hello, I'm encountering a significant issue as I'm receiving an unexpected response when sending a request through ReadyAPI to validate error handling in the software under test. (The request works as expected when it's a 'passing' request). Here is the curl request : curl -X POST http://localhost/xxx/api/rest/latest/ai-servers -H 'Authorization: Basic xxx' -d '{"name": "name"}' -H'Content-Type: application/json' and the correct response: {"fieldValidationErrors":[{"objectName":"post-ai-server","fieldName":"url","fieldValue":null,"errorMessage":"This attribute can't be empty"}]} When I send the same request in ReadyAPI I get <response null="true"></response> Could you please tell me what this is due to? Best regards, KasiaSolved33Views0likes4CommentsTest Runner - Report All in One File
Hi, I'm trying to sort out if it's possible to use the reporting functionality to export test step results to an XML file, but have all results in one file? We currently use this feature to export results for different test cases into different files but we'd like them all in one file to help add better logging to the system we use to run things. Is this possible? It doesn't seem so but thought I would ask here. Thanks! Jonathan34Views0likes5CommentsGroovy script for dynamic response in Readyapi
Our scope of need is to get a dynamic response if the user hits the API request incorrectly and they need to get different response. I have created in readyapi rest, soap, and jdbc protocols with static responses when the user wants to access the response, but when the user requests with payload incorrectly example ( wrong I'd -xxxxx) , they receive the same response from readyAPI. I would like to create script to handle dynamic response; could you please share an example?Solved178Views0likes3CommentsData Sink step in ReadyAPI (v3.49.0) retains data from previous runs and does not append
Previously We had a build that created an excel file and filled it with data. Now, the last Data SInk step does not append. I made a new project to test this. Step 1: Delete the file Step 2: Data sink 1 with header information on the first row (no append, start at A1) -> A1 = A, B1 = B Step 3: Data sink with data, append to end file (A2 = 1, B2 = 2) If I execute all 3 steps seperately it works as expected. (A1 = A, B1 = B, A2 = 1, B2 = 2) This is the desirable outcome. If I execute all steps seperately again, it will show the same outcome (also desirable), because step 1 will delete the file and start all over again with step 2. However, if I run the testcase (all 3 steps) it seems to overwrite the first row, retain data and append that to the end of the file. So: Run 1 (step 1, 2 & 3) = A1= 1, B1 = 2 (overwrites step 2?) Run 2(step 1, 2 & 3) =A1= 1, B1 = 2, A2 = 1, B2 = 2 This is not how it worked before, and will lead to errors later (since the headers A & B are now overwritten)98Views0likes3Commentshow to change test step name when save test results
Hi, I'm trying to save test result into a file with following scripts. def pName = context.currentStep.testCase.testSuite.project.name //get project name def pDate = new Date().format( 'yyyyMMdd' )//get current date def sDate = pDate.toString()//convert date to string def pTestSuite = context.currentStep.testCase.testSuite.name//get TestSuite name def pTestCase = context.currentStep.testCase.name//get TestCase name def filePath = 'E:/Data/Dean Ding/CRD files/CRD_results_test/'+pName+'_'+sDate+'/'+pTestSuite+'/'+pTestCase+'/'//compose the folder path File file = new File(filePath) if (!file.exists()) file.mkdirs()//create the destination folder fos = new FileOutputStream(filePath+ testStepResult.testStep.label + '.txt', true) pw = new PrintWriter( fos ) testStepResult.writeTo( pw ) pw.close() fos.close() but as my test step name contains symbols like : , " such special symbols which not accepted when create txt file due to naming convention, as there are more than 1000 cases it will take such long time to change my test step name,I found script to replace those symbols but don't know how to make it change when use above script to save test results. It will be much appreciated if anyone can provide the scripts.196Views0likes2CommentsBroken links in test results HTML generated by testrunner.bat
There are broken links in the HTML test results generated by testrunner.bat In Windows, using ReadyAPI version 3.48 How to reproduce: 1 - Create a project that has a period in its name (e.g. Project1.0) 2 - Run the tests through the commandline, using testrunner.bat with the flags -A -r -j -I -f <output file> "-RJUnit-Style HTML Report" -FXML <project file> 3 - Open the index.html on a browser There are broken links in the HTML (they can also be seen directly in the "frame" html files that have been generated in the test results output directory). The reason they are broken is that the period "." character in the project name (and corresponding directory now created in the test results directory) has been replaced with a "/".185Views1like1CommentSoapUI Groovy to save Requests and Responses in a txt file
How can I save my REST project in SoapUI Open Source all requests and responses that was ran to a txt file divided in sections test by test. I would like to use a Groovy code to do it, Please may someone help me? Example: Test 1 - Title Request code Response code Test 2 - Title Request code Response code I tried to save the Dump File but I need all request and response information with titles and all test steps together in the same file. How can I solve my problem using REST API and save all requests and responses that was ran? Thank you too munch!214Views0likes1Comment2 TestSuites with diff auth/jwt clientID/secret. How do I configure it in Event handler?
Hi, I have 2 TestSuites and each uses diff auth/jwt (clientID/secret). How do I configure it in Event handler - RequestFilter.filterRequest to use depending on TestSuite name? I tried this but it does not work - def get_testsuitename = context.testCase.testSuite.name log.info(get_testsuitename) ifget_testsuitename == "TestSuite1"{ def CLIENT_ID = "aaa"; def SECRET = "bbb"; } else if get_testsuitename == "TestSuite2"{ def CLIENT_ID = "cc"; def SECRET = "ddd"; } Then I tried using TestSuiteRunListener.beforeRun but no luck 😞 Any help would be appreciated! Thanks341Views0likes2Comments