Contributions
Re: ReadyAPI - Data Source - Minimum value as today´s date - Possible?
HiAutoBear, In your script, it looks like you forgot to use your i variable. In stead of currentDate.add(Calendar.DAY_OF_MONTH, 1) try currentDate.add(Calendar.DAY_OF_MONTH, i)6 months agoPlace ReadyAPI QuestionsReadyAPI Questions212Views2likes0CommentsRe: Disable test cases depending on environment
Vigneshwaranit: I assume that is either because you are not running this script from the project setup script OR something else in your setup script fails. The above script was confirmed working from the project setup script, no need for any additional imports. Of course, you need to adjust the values "generate access token" & "sandbox" to your use case. If first issue, you have to know that each place where you can do scripting has a limited set of "objects" you can use. Project setup script has these: A test case setup script has these: This means you cannot use a statement like project.testSuiteList in a test case setup script. To get the project object, you will need to use statement: testCase.testSuite.project If second issue: You need to look in your "Error Log" tab to know what exactly is the issue (you will see line number where it breaks and more info)6 months agoPlace ReadyAPI QuestionsReadyAPI Questions302Views0likes0CommentsRe: Environment-specific assertions
What I often do in such a case is assert via a script assertion. In the script I get the current active environment via: def activeEnvironmentName = messageExchange.modelItem.project.activeEnvironment.name //note, this is the name for your environment you have setup in the "Endpoints & Environments" setting. //for tst def expectedResult = "tst123" if (activeEnvironmentName == "acc"){ //for acc expectedResult = "acc123" } then proceed with the actual assertion by getting the actual api response value and assert it againstexpectedResult7 months agoPlace ReadyAPI QuestionsReadyAPI Questions183Views2likes0CommentsRe: ReadyAPI Error: Error getting response; java.net.SocketException: Connection reset by peer
Or perhaps another instance of readyAPI is already running on your machine? I know you can open ReadyAPI 2 times, but that does cause some instabilities I noticed... It could be a reason for the exotic "An established connection was aborted by the software in your host machine." Not tested it, but just trying to get some clues...10 months agoPlace ReadyAPI QuestionsReadyAPI Questions1KViews0likes0CommentsRe: ReadyAPI Error: Error getting response; java.net.SocketException: Connection reset by peer
From your logs, can you see how long exactly the request takes before the connection closes?If it happens each time after 60 seconds there might still be something with your socket timeout settings. Note that there is test case timeout and socket timeout. I referred to the latter. See https://support.smartbear.com/readyapi/docs/functional/ui/case.html#options(The duration (ms) of a connection socket. The empty value or 0 sets the timeout to 1 minute.) Or your rest service (or any other downstream service) has a timeout set whichafter it closes down. But if you say it consistently fails for ReadyAPI but works for Postmen than this cannot be the case.10 months agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes1CommentRe: ReadyAPI Error: Error getting response; java.net.SocketException: Connection reset by peer
HiAkshayMandloi. Did you trye in your test case options to specify you socket timeout limit. Default is zero = 60.000 ms (= 1 minute).10 months agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes0CommentsRe: data source Loop
Hiarmygrad. Just a guess, but if each loop takes around 8 seconds then your test case will time out if you use the default setting (=0 == 60000 ms === 1 minute). So after 7 loops ReadyAPI will cancel the run as 1 minute has passed since you started the test case. You can adjust the Test Case Timeout via right click on the test case and click on options. If that is not the root cause, potentially there might be something in your data source that is not as expected (check perhaps your error log and/or do some scripting to the script log (log.info) to see more details...2 years agoPlace ReadyAPI QuestionsReadyAPI Questions492Views1like0CommentsRe: How to change the HTTP verb (Post-GET vice versa) during runtime using groovy script
Hiapartamsetti. I don't really see/understand the use case to do that... You want to: Given a certain condition execute either a POST or a GET? Can't you then not define those POST & GET methods in your ReadyAPI "APIs" section and then in your test case perhaps use a script to execute "given condition X run test step "POST" else run test step "GET" "?2 years agoPlace ReadyAPI QuestionsReadyAPI Questions484Views1like1CommentRe: How to best assert unordered results?
HiTaz. I am glad that you bring thus up again. There are many users frustrated with the "Smart Assertion" feature (me included). See an old post here :https://community.smartbear.com/t5/ReadyAPI-Questions/Issues-and-Feedback-about-Smart-Assertions/m-p/228752#M55442 Bottom line: The current "Smart Assertions" feature does not accommodate the majority of the ReadyAPI user's needs and I for one am eagerly awaiting a SmartBear ReadyAPI update on this... No easy way to assert unordered results. Currently only complex scripting does my trick. Or, if you don't mind some loss in coverage, the assertion groups can also help ("assertion 1 OR assertion 2" see https://support.smartbear.com/readyapi/docs/testing/assertions/index.html#assertion-group)2 years agoPlace ReadyAPI QuestionsReadyAPI Questions547Views1like0Comments