Contributions
- 8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews1like0Comments
can i run multiple jbdc queries with only one constant connection
I may be doing this the wrong way but here is some background. I am useing soapui to create a validation script that connects to our data bases and returns various information on different devices all on a single contract. so the script does 5 different jbdc test steps per account and each test step retrieves specific information about the account. The problem: i have been advised that this validation is causing system issues where each time it runs a jbdc query it connects to the database and then does the query , then disconnects. Each connection is only active for maybe a 10th of a second but it the sheer number of them that is causeing an issue for the database admins. If this were just a single account this would not be much of an issue but normaly this is done over 200 to 20000 accounts. That is a lot of connections/disconnections. Other than condensing all those steps into a single query and thus a single step is there a way to open single connection at the start of a project, run the queries (as this is an iterative process) and then close the single connection after i have checked every account on the list? thank you for your assistance in this.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions600Views0likes0Commentssql query works in toad but not in ready api
Admitedly i dont know why this is not working but i have happened upon an odd issue. I have a rather long sql query that works fine in toad but throws a null pointer exception when running in ready api (1.7.0 Soapui NG pro) . I know what your thinking its a null pointer, but i should also add that the query works just fine when i run it from thebuild query screen in the jbdc test step. Below you will find the query that i am attempting to run. The connection tests fine and all other queries to the database run fine. The exact error states : SQL Query - Plus1 Accociated Device: Error getting response; java.lang.NullPointerException anyone have any clues what is going on? is this a limitation of ready api (number of char on a single line string?) , or am i hitting a bug? SELECT 'r << TOK 1' || chr(10) || '0 PIN_FLD_POID POID [0] 0.0.0.1 /device/num ' || TO_DEVICE.POID_ID0 || chr(10) || '0 PIN_FLD_STATE_ID INT [0] 1' || chr(10) || 'TOK' || chr(10) || 'xop PCM_OP_WRITE_FLDS 0 1' || chr(10) || 'r << XX 1' || chr(10) || '0 PIN_FLD_POID POID [0] 0.0.0.1 /device/num ' || FROM_DEVICE.POID_ID0 || chr(10) || '0 PIN_FLD_SERVICES ARRAY [0] allocated 20, used 1' || chr(10) || '1 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/telco/iri_tel ' || DS.SERVICE_OBJ_ID0 || chr(10) || '1 PIN_FLD_ACCOUNT_OBJ POID [0] 0.0.0.1 /account ' || DS.ACCOUNT_OBJ_ID0 || chr(10) || '0 PIN_FLD_PROGRAM_NAME STR [0] "BillingOps Device Associate"' || chr(10) || '0 PIN_FLD_FLAGS INT [0] 0' || chr(10) || 'XX' || chr(10) || 'xop PCM_OP_DEVICE_ASSOCIATE 0 1' || chr(10) || 'r << XX 1' || chr(10) || '0 PIN_FLD_POID POID [0] 0.0.0.1 /device/num ' || TO_DEVICE.POID_ID0 || chr(10) || '0 PIN_FLD_SERVICES ARRAY [0] allocated 20, used 1' || chr(10) || '1 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/telco/iri_tel ' || DS.SERVICE_OBJ_ID0 || chr(10) || '1 PIN_FLD_ACCOUNT_OBJ POID [0] 0.0.0.1 /account ' || DS.SERVICE_OBJ_ID0 || chr(10) || '0 PIN_FLD_PROGRAM_NAME STR [0] "BillingOps Device Associate"' || chr(10) || '0 PIN_FLD_FLAGS INT [0] 1' || chr(10) || 'XX' || chr(10) || 'xop PCM_OP_DEVICE_ASSOCIATE 0 1' || chr(10) FROM PIN.DEVICE_T FROM_DEVICE, PIN.DEVICE_T TO_DEVICE, PIN.DEVICE_SERVICES_T DS WHERE FROM_DEVICE.POID_ID0 = DS.OBJ_ID0 AND FROM_DEVICE.DEVICE_ID = 'xxxx' <- this is retrieved from a data source but i have tried a real number AND TO_DEVICE.DEVICE_ID = 'yyyy' <- this is retrieved from a data source but i have tried a real number8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.2KViews0likes2CommentsRe: JBDC response does not return an "" when element does not exist
Upon checking the version of ready api that we are currently useing i find the following information: Ready! API 1.4.1 © SmartBear Inc. 2007-2015 http://www.smartbear.com So yes the version is 1.4.1 as far as the information returned the datasink for soapui ng pro has the following information set as name / value for one of the fields: PLUS ONE /${SQL Query - PLUS1#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/DEVICE_ID[1]} and the datasink for soapui pro (5.1.1) has the following information set as name / value for the same field PLUS ONE /${SQL Query - PLUS1#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/DEVICE_ID[1]} as you can see they are the same. with the same exact data source file the programs returns different results. SoapUI NG Pro returns : (accountnumber),(resource),(source),(stateid), (resource2), (source), (stateid), (resource3), (source), (stateid) , ${SQL Query - PLUS1#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/DEVICE_ID[1]}, ${SQL Query - PLUS1#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/SOURCE[1]}, ${SQL Query - PLUS1#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/DECODEPIN.DEVICE_T.STATE_IDNULL1RESERVED2ACTIVE3INACTIVEOTHER-PIN.DEVICE_T.STATE_ID[1]} where as SoapUI Pro returns: (accountnumber),(resource),(source),(stateid), (resource2), (source), (stateid), (resource3), (source), (stateid) ,,, as some of the resources may or may not exist on any given account it is actually very important to keep track of that fact. If i was to add a grovy script to remove the incorrect information i am assuming that i would, 1.use a regex to locate the text to remove from the file itself 2.replace the text with a "" so would this be done after the datasink and before the datasource loop or would i want to do that in a while or loop statement after the datasource loop?9 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes2CommentsRe: Looping thorugh a data source in SoapUI
you can try using something like a data sink before your datasource loop to print the response from the test step this would allow you to verify that the information your getting back is what you expect. also the log output should show if the request was succesful or not.9 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.8KViews0likes1CommentRe: can soapui run commands on a unix server
Thank you for the reply, I did find a way to make this work useing a groovy script and the java jsch. It even works if you have 2 factor authentication. http://www.jcraft.com/jsch/ The above site pretty much gave me all the information needed to create a connection. word of note: when addressing arrays in a soap groovy script use hard brackets not curly brackets. Object[] options=[ "yes", "no" ];4.1KViews0likes1CommentJBDC response does not return an "" when element does not exist
I have a test that uses multiple jbdc elements using sql to get information from our database. The information is then used in a data sink that pulls the response directly from the ResponseAsXml from said jbdc. The problem that i am encountering is that in the older version of soapui pro the data sink equated a response from the jbdc where the element did not exist as null or an empty string. Now with SoapUI NG Pro the datasink is placeing the value${SQL Query - PLUS1#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/SOURCE[1]} into the output file instead of "". Is there an assertion or something i can add to my test steps to correct this issue as this change basically breaks my entire program as the output from the datasink is used as a datasource for multiple other test suites. The only other think i can think of to correct this is to create a groovy script that would replace the incorrect string with an emptry string or null but how can i get the datasink to pick that up?1.6KViews0likes4Commentscan soapui run commands on a unix server
I may be posting this in the completly wrong area if someone can point me where to look i would greatly appreciate it. I am writing an automated script to end to end test our companies api and need to validate information stored on a unix server that has the following requirements. (this is what i do know and understand) I use a putty session from a windows machine to connect to these unix servers due to security restrictions the servers i need to access can only be gotten from specific putty sessions. A) soapui would need to connect to an existing putty session that i have open already B) the server is secured with a user name and password , i can store this information in a variable and push it through when needed - that much i think i understand C) the server then takes set commands and returns a very structured output that i would need to capture or read into a buffer - possibly as a string. what i dont know ! can soap ui connect to said unix server or servers send the stored username and password and then the required commands. i would imagine this would require some kind of groovy script , is there a built in test step for this kind of function any direction would be extreamly helpfull as i got voluntold to learn soap and have only been at it about a 2 months now im still not sure of the nomenclature so if i said something incorrectly i do apologize.4.1KViews0likes3Comments