Contributions
Re: Data Source - Fetch all configuration data of a given property
Hi, I never did this, but this guy shows how to get the data out of the grid. https://community.smartbear.com/t5/ReadyAPI-Questions/Groovy-reading-from-Data-Source-Grid/td-p/152260 I would then read all rows into an array with a loop and work from there2 years agoPlace ReadyAPI QuestionsReadyAPI Questions390Views0likes0CommentsTags in xml comments of SOAP calls are readded to the call
Hi, sometimes I need to comment out some parts of an xml request in a SOAP call. The call then works as expected. But then under some to me unknown circumstances ReadyAPI reforms this xml to the original state. The comments are still there but the tags within the comments were added again automatically. Is there a way to prevent this, as this causes unexpected behavior a lot of times. Thx3 years agoPlace ReadyAPI QuestionsReadyAPI Questions655Views0likes4CommentsRe: Tags in xml comments of SOAP calls are readded to the call
Hey Richie, thx for your reply. You got it basically correct (sorry for not beeing 100% precise). But I am not adding the comments in the API itself, just in the SOAP teststep -> this might be a good hint, I will try to place the comments in the API itself. Also the comments are not removed - just the tags which are in comments are automatically recreated in the call + the comments are still there. But then the call is in its original form and does not work. I was not able so far to figure out when this happens when not. But when it happens I always have to search the problem, which can be quite annoying. Here I was just checking if anybody else knows the problem and maybe a solution. But actually creating a new request template in the API might help. I will try. thx again PS: I leave the request open for this week, maybe someone else has an additionial idea.3 years agoPlace ReadyAPI QuestionsReadyAPI Questions616Views0likes2CommentsTrack does not exist, entries discarded
Anyone else experienced this warning since ReadyAPI 3.10.00 with load tests? I get it quite regulary ReadyAPI log panel Wed Oct 13 10:19:23 CEST 2021: WARN: Track does not exist, entries discarded Virtual Users are started but no teststeps are executed then. Google and community search did not bring up any result Thx3 years agoPlace ReadyAPI QuestionsReadyAPI Questions548Views0likes2CommentsRe: How to keep database connection open or how to use one connection per testcase
HiJKolosova, thanks for the reply. Actually I was able to keep the connection as described in that link in my first post. I put up the following script as "setup script" in the testcase level //In a Setup Script import groovy.sql.Sql //try to create connection to database, if available. load this connection on context //if not, log error and continue //In order for this to work, you need to have jdbc driver jar file in $SOAPUI_HOME/bin/ext folder def dbString = context.expand( '${#Project#dbString}' ) def dbDriver = context.expand( '${#Project#dbDriver}' ) def dbUserName = context.expand( '${#Project#dbUserName}' ) def dbPassword = context.expand( '${#Project#dbPassword}' ) if ( (null != dbString) && (null != dbDriver) && (null != dbUserName) && (null != dbPassword) ) { try { connection = Sql.newInstance(dbString, dbUserName, dbPassword, dbDriver) context.setProperty("dbConn", connection) log.info "Hello DB" } catch (Exception e) { log.error "Could not establish connection to the database. " + e.toString() } } The following I set up as a tear down script in the Testcase level //In a TearDown Script //Close db connection if (context.dbConn) { context.dbConn.close() log.info "Byebye DB Connection." } Then in a groovy teststep I am able to use this context.dbConn until the testcase is finished. Like this: The query result are bit strange in format, thats why I put the log.info, so everybody who uses this, will see right away. if (context.dbConn) { try{ log.info "Hello -connection available" //connection to the database def sql = context.dbConn rowSerienNr = sql.firstRow("select nSerienNr from TableSerialNr where product = 'Screen'") log.info "QueryResult " + rowSerienNr.toString() } catch(Exception e) { log.error e.toString() } } else {log.error "Error"} With these scripts I was able to just open 200 DB connections on Oracle instead of serveral 10.000 in a load test using the default JDBC request. All kudos should go to the guy who posted the info in the link I copied in my first post4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews1like1CommentHow to keep database connection open or how to use one connection per testcase
Hi community, For reasons I want to open a database connection to Oracle manually in groovy, not with the JDBC teststep. And I want to keep this connection open the whole testcase or maybe even the whole load test. I found some groovy example which look very promising. if you are interested: https://onebyteatatime.wordpress.com/2009/02/17/reusable-sql-connection-in-soapui/ And it works, as far as as open the DB connection. Then in the snipped you see that this guy then sets a context porperty "dbConn". connection = Sql.newInstance(dbString, dbUserName, dbPassword, dbDriver) context.setProperty("dbConn", connection) But in the next groovy script where I actually want to use the connectio to query and update a table, I cannot use this property how it suggested it should work: if (context.getProperty("dbConn")) { ... This expression returns nothing... (checked with log.info ....) So the question: does anyone know how to do this? Is it ieven possible? Using ReadyAPI 3.5.1 Thx for any hint 🙂 TerkonSolved4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes3CommentsRe: REST calls do not work with Load agents: invalid JSON
Found the problem: - one property I used in the Login turned out to be empty sometimes - I am still wondering how it worked without locally, without Loadagent - then also, there were some empty values when the datasource (jdbc) ran out of data and did not restart it. I has to check in the datasource checkbox "Skip loop on empty" in the options4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews1like0Comments- 4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews0likes0Comments