Contributions
Re: Groovy script Assertion
Sorry Rich, It got a little crazy after I sent out the post to the two individual you mentioned, but I should have answered your questions, which is: I believe I'm content considering typical extrapolation rules (number of extrapolates to determine a pattern) maybe only 4 data points is enough to assert against. And yes, this is a doozy of a problem to start with! Thanks for all your help5 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.8KViews0likes0CommentsGroovy script assertion to compare XML data
Thanks Rich, @avidCoder,@nmrao Is it possible that one of you could help me with my issue? I'll post again: NOTE: a Test step before this Test step(which I explain below) sets the polling interval (in this example to 10 sec). 1. Using an HTTP GET request call on a URL 2. The URL’s response is a list of events (<Event>) that have time stamps (<EventTime>) 3. These events, Event X, Event Y etc., are no more than polling events. So, if I send a polling interval for Event X to poll every 10 sec, then I want to verify that Event X is polling every 10 sec. Event Y could be polling at a different interval, no problem. I need to verify if I set the polling interval for Event X to be 10 sec, then when I send a GET on the URL, in the response I should see the time stamps for Event X to be 10 sec apart. 4. So, my Assertion should compare Event X with time stamp X and the next time that Event X polls the time stamp should be 10 sec from the previous Event X time stamp. Verifying polling interval was set correctly. 5. Example below shows there is a 10 sec diff between the Event X at 19:35:37.189 time and the same Event X at 19:35:47.24 <Response> <e> <Tplus>8201.19</Tplus> <SinceLast>8.29</SinceLast> <EventTime>2019-12-16T19:35:37.189</EventTime> <Event>trapPATS-NE-MIB: patsConfigFileDownloadCompleteTrap"/test_lru_manifest.xml"XX.XX.XX.162</Event> </e> <e> <Tplus>8211.24</Tplus> <SinceLast>10.05</SinceLast> <EventTime>2019-12-16T19:35:47.24</EventTime> <Event>trapPATS-NE-MIB:patsConfigFileDownloadCompleteTrap"/test_lru_manifest.xml"XX.XX.XX.162</Event> </e> <Response> 6. Trying to verify the polling request was set correctly. If there is a better way than a groovyscript, please point me into that direction. But if the groovyscript is the way please provide code on how to do this and an explanation into what the code is doing, this way I can learn, until I can get more experience with groovy. 7. To start with, not sure if I should go to the end of the response file or parse through the entire response file? Thanks, again, all help is greatly appreciated!Solved5 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes2CommentsRe: Groovy script Assertion
Thanks Rich, @avidCoder,@nmrao Is it possible that one of you could help me with my issue? I'll post again: NOTE: a Test step before this Test step(which I explain below) sets the polling interval (in this example to 10 sec). 1. Using an HTTP GET request call on a URL 2. The URL’s response is a list of events (<Event>) that have time stamps (<EventTime>) 3. These events, Event X, Event Y etc., are no more than polling events. So, if I send a polling interval for Event X to poll every 10 sec, then I want to verify that Event X is polling every 10 sec. Event Y could be polling at a different interval, no problem. I need to verify if I set the polling interval for Event X to be 10 sec, then when I send a GET on the URL, in the response I should see the time stamps for Event X to be 10 sec apart. 4. So, my Assertion should compare Event X with time stamp X and the next time that Event X polls the time stamp should be 10 sec from the previous Event X time stamp. Verifying polling interval was set correctly. 5. Example below shows there is a 10 sec diff between the Event X at 19:35:37.189 time and the same Event X at 19:35:47.24 <Response> <e> <Tplus>8201.19</Tplus> <SinceLast>8.29</SinceLast> <EventTime>2019-12-16T19:35:37.189</EventTime> <Event>trapPATS-NE-MIB: patsConfigFileDownloadCompleteTrap"/test_lru_manifest.xml"XX.XX.XX.162</Event> </e> <e> <Tplus>8211.24</Tplus> <SinceLast>10.05</SinceLast> <EventTime>2019-12-16T19:35:47.24</EventTime> <Event>trapPATS-NE-MIB:patsConfigFileDownloadCompleteTrap"/test_lru_manifest.xml"XX.XX.XX.162</Event> </e> <Response> 6. Trying to verify the polling request was set correctly. If there is a better way than a groovyscript, please point me into that direction. But if the groovyscript is the way please provide code on how to do this and an explanation into what the code is doing, this way I can learn, until I can get more experience with groovy. 7. To start with, not sure if I should go to the end of the response file or parse through the entire response file? Thanks, again, all help is greatly appreciated!5 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.8KViews0likes0CommentsRe: Groovy script Assertion
Ok, thanks Rich, let me try to explain this better: NOTE: a Test step before this Test step(which I explain below) sets the polling interval (in this example to 10 sec). 1. Using an HTTP GET request call on a URL 2. The URL’s response is a list of events (<Event>) that have time stamps (<EventTime>) 3. These events, Event X, Event Y etc., are no more than polling events. So, if I send a polling interval for Event X to poll every 10 sec, then I want to verify that Event X is polling every 10 sec. Event Y could be polling at a different interval, no problem. I need to verify if I set the polling interval for Event X to be 10 sec, then when I send a GET on the URL, in the response I should see the time stamps for Event X to be 10 sec apart. 4. So, my Assertion should compare Event X with time stamp X and the next time that Event X polls the time stamp should be 10 sec from the previous Event X time stamp. Verifying polling interval was set correctly. 5. Example below shows there is a 10 sec diff between the Event X at 19:35:37.189 time and the same Event X at 19:35:47.24 <Response> <e> <Tplus>8201.19</Tplus> <SinceLast>8.29</SinceLast> <EventTime>2019-12-16T19:35:37.189</EventTime> <Event>trapPATS-NE-MIB: patsConfigFileDownloadCompleteTrap"/test_lru_manifest.xml"XX.XX.XX.162</Event> </e> <e> <Tplus>8211.24</Tplus> <SinceLast>10.05</SinceLast> <EventTime>2019-12-16T19:35:47.24</EventTime> <Event>trapPATS-NE-MIB:patsConfigFileDownloadCompleteTrap"/test_lru_manifest.xml"XX.XX.XX.162</Event> </e> <Response> 6. Trying to verify the polling request was set correctly. If there is a better way than a groovyscript, please point me into that direction. But if the groovyscript is the way please provide code on how to do this and an explanation into what the code is doing, this way I can learn, until I can get more experience with groovy. 7. To start with, not sure if I should go to the end of the response file or parse through the entire response file? Thanks, again, all help is greatly appreciated!5 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes3CommentsGroovy script Assertion
Below is a sample from an XML file from my Response window of my project. I need to create a groovy assertion that will parse through the XML response file and compare the "Event" (looking for the same event name) and then compare the "EventTime" to make sure the time is 10 sec apart. I don't know groovy, so I piecing together a script from youtube and the internet, but I keep having issues. Help will be greatly appreciated...Thanks! <Response> <e> <Tplus>8201.19</Tplus> <SinceLast>8.29</SinceLast> <EventTime>2019-12-16T19:35:37.189</EventTime> <Event>trap:PATS-NE-MIB::patsConfigFileDownloadCompleteTrap"/test_lru_manifest.xml"XX.XX.XX.162</Event> </e> <e> <Tplus>8211.24</Tplus> <SinceLast>10.05</SinceLast> <EventTime>2019-12-16T19:35:47.24</EventTime> <Event>trap:PATS-NE-MIB::patsConfigFileDownloadCompleteTrap"/test_lru_manifest.xml"XX.XX.XX.162</Event> </e> <Response>Solved5 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes5Comments- 5 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes0Comments
ReadyAPI
I'm new to ReadyAPI... So, I'm not sure what to do next: 1) I created a SOAPUI project 2) I have one REST Get call ( a polling interval call that changes at 3 sec intervals) 3) Then from a command window I make an API call to start a process 4) I then make my REST Get call from ReadyAPI (to change the polling of the process every 3 sec) 5) Back in the command window the REST call I performed in step 4, has made a change, but the change is in the command window with a time stamp (showing every 3 seconds the process will poll) I'm not sure how to capture the results in the command window from ReadyAPI. I thought of using an Assertion, but I'm not sure how to capture assertions from an outside source(the command window). OR do I use the TestRunner app in ReadyAPI, I was reading up on this app? Please Help, TheEndSolved5 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes1Comment