Contributions
Re: Ready API / ServiceV - floating license check interval
To expand on this enhancement request... like the initial requester, our license server is on my company's local network. We have several remote employees utilizing the floating licenses and when the VPN disconnects, we are forced to close ReadyAPI/SoapUI NG Pro and re-open. It would be GREAT if there was an option to "Retry" a license lock on the dialog that appears that reads(paraphrased), "No licenses found, would you like to install a license?"3.8KViews0likes0CommentsRe: Reading files from smb shared drive from Groovy test step?
It's a network location. I've tried the following and it appears that I can connect to the drive(getPath() for example), but for some reason I can't call certain methods(isFile() for example): import jcifs.smb.NtlmPasswordAuthentication import jcifs.smb.SmbFile String url = "smb://myserver.com" String fullPath = ( url + "/path/to/file.txt" ) smbAuth = new NtlmPasswordAuthentication( url, context.expand( '${#TestCase#username}' ), context.expand( '${#TestCase#password}' ) ) dir = new SmbFile( fullPath, smbAuth ) //works log.info dir.getPath() //doesn't work log.info dir.isFile() Getting this error: jcifs.smb.SmbException: jcifs.util.transport.TransportException java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:209) at java.net.SocketInputStream.read(SocketInputStream.java:141) at jcifs.util.transport.Transport.readn(Transport.java:29) at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:351) at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:267) at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:298) at jcifs.util.transport.Transport.run(Transport.java:223) at java.lang.Thread.run(Thread.java:745) at jcifs.util.transport.Transport.run(Transport.java:239) at java.lang.Thread.run(Thread.java:745) error at line: 15 I appreciate any assistance!8 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.9KViews0likes0Comments- 8 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.5KViews0likes0Comments
Delete Test Suite (and test cases) via groovy script?
Hi, I've searched everywhere and tried SEVERAL approaches, but I haven't had any luck with any of them. Hoping someone may be able to help me out! Here is what my test case looks like: The test step, "Create New Generate Report Requests" creates the "GenerateReportUS" test suite, test cases(I know there is a duplicate name, this would never happen with a full execution), and test steps for each test case. Here is the code in the step that checks to see if it already exists, where I'm stuck: //see if 'GenerateReportUS' suite exists genReportTS = context.testCase.testSuite.project.getTestSuiteByName("GenerateReportUS") if ( genReportTS != null ) { //if exists remove test suite and all test cases //stuck here!!! } else { //create 'GenerateReportUS' suite context.testCase.testSuite.project.addNewTestSuite("GenerateReportUS" ) genReportTS = context.testCase.testSuite.project.getTestSuiteByName("GenerateReportUS") } The reason I'm doing it this way instead of just iterating through the test data is that the request that is being created takes ~30-60 seconds to run depending on size of the test data and there are 50+ iterations, so I want to speed up the execution time. Thanks in advance for your assistance!Solved8 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.5KViews0likes2CommentsRe: In Ready! API 1.6.0, how do you pass a Test Case tag as a command line parameter?
Hello, I'm going to dig this one backup since it's related to my issue and doesn't appear to be "Solved." I'm also trying to get the tags to work with maven and I've encountered an issue I'm wondering if it's a bug. I have two Jenkins projects that I've setup. The build section of my pom.xml is configured as follows: <build> <plugins> <plugin> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>runtime</scope> </dependency> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.3</version> </dependency> </dependencies> <groupId>com.smartbear</groupId> <artifactId>ready-api-maven-plugin</artifactId> <version>1.7.0</version> <executions> <execution> <phase>test</phase> <goals> <goal>test</goal> </goals> <!--<id>p1</id>--> <configuration> <projectFile>${basedir}/soapui-project.xml</projectFile> <environment>${environment}</environment> <testSuite>${testSuite}</testSuite> <testCase>${testCase}</testCase> <!--<tags><param>TestCase ${tags}</param></tags>--> <junitReport>true</junitReport> <outputFolder>${basedir}/target/Reports</outputFolder> <readyApiProperties> <readyApiProperties> <property> <name>soapui.home</name> <value>%env.SOAPUI_HOME%</value> </property> </readyApiProperties> </readyApiProperties> </configuration> </execution> </executions> </plugin> </plugins> </build> One of my builds uses tags, and the other doesn't. When I uncomment the tags section, the project that I'm not using the tags begins to fail with the following error: [ERROR] java.lang.Exception: The tag "${tags}" was not found. It appears that it's not being ignored when it's not set like the other configurations (testCase, testSuite, environment); I suspect it has to do with there are additional parameters and text, "TestCase," associated with using tags. Any input would be appreciated! Thanks, Mark8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes0CommentsRe: how to connect to a database
I used custom properties because the db connections in conjunction with switching environments didn't seem to be fully baked at the time... Here is my post about it: https://community.smartbear.com/t5/SoapUI-NG/Databases-for-Environments-JDBC-Driver-Connection-String/m-p/119651#M27589 Hope that helps.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews1like0CommentsRe: Execute test cases from excel based on Yes/No flag?
I used a Groovy script to evaluate the value and jump to steps accordingly: def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) //"TestData" is my datasource name def ds = testRunner.testCase.testSteps["TestData"] def rr = ds.getPropertyValue('RunRow').toLowerCase() if ( rr == 'true' ) { testRunner.gotoStepByName("True Step") } else { testRunner.gotoStepByName("DataSource Loop") } return rr Just an FYI, the DataSource Loop test step is what iterates to the next row of your datasource. I didn't have any luck incrementing the row number via a groovy script.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.1KViews1like1CommentRe: Caling a Stored Procedure in JDBC Test Step
I'm digging this one back up as I was unsuccessful the first time and it was reprioritized, but I'd like to figure this out. At this point, it doesn't look like it's possible to do via the JDBC Test step with the "stored procedure" flag on, but it looks like some folks have had some luck using Groovy. Here is what I have so far: import groovy.sql.Sql import oracle.jdbc.driver.OracleTypes com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("oracle.jdbc.OracleDriver") //get environment specific(dev1, qa1, etc.) project db connection string properties def host = context.expand( '${#Project#dbhost}' ) def port = context.expand( '${#Project#dbport}' ) def serviceName = context.expand( '${#Project#dbservicename}' ) def username = context.expand( '${#Project#dbusername}' ) def password = context.expand( '${#Project#dbpassword}' ) def schemaName = context.expand( '${#Project#db_scema_name}' ) //build full stored procedure name, including the db schema def procName = ( schemaName + ".STORED_PROCEDURE_NAME" ) //build connection string conString = ("jdbc:oracle:thin:@" + host + ":" + port + "/" + serviceName) //connect to db def con = Sql.newInstance(conString, username, password, "oracle.jdbc.driver.OracleDriver") //call stored procedure con.call '{' + procName + '(PARAMETER1,PARAMETER2,?)}', [367,'en_US',Sql.REFCURSOR], { output -> log.info output} //TODO- do something with the output of the stored procedure //close connection con.close() I'm making the call to an Oracle 11g database, but I don't know how to work with the "Ref Cursor" datatype. Any suggestions or working examples would be appreciated!8 years agoPlace ReadyAPI QuestionsReadyAPI Questions2KViews0likes0CommentsRe: Building Agile XML with MarkupBuilder and JDBC Query Results
Here was the solution: import groovy.sql.Sql import oracle.jdbc.driver.OracleTypes com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("oracle.jdbc.OracleDriver") import groovy.xml.MarkupBuilder import groovy.xml.XmlUtil //get environment specific(dev1, qa1, etc.) project db connection string properties def host = context.expand( '${#Project#dbhost}' ) def port = context.expand( '${#Project#dbport}' ) def serviceName = context.expand( '${#Project#dbservicename}' ) def username = context.expand( '${#Project#dbusername}' ) def password = context.expand( '${#Project#dbpassword}' ) def schemaName = context.expand( '${#Project#dbSchemaName}' ) //build connection string conString = ("jdbc:oracle:thin:@" + host + ":" + port + "/" + serviceName) //connect to db def con = Sql.newInstance(conString, username, password, "oracle.jdbc.driver.OracleDriver") //get order types, these are properties that were transferred from the data source def orderTypeCodes = context.expand( '${#TestCase#orderTypeCodes}' ) def locale = context.expand( '${TestData#locale}' ) //build query, removed details because they are not important. ordertypeCodes and locale are used in this query def query = ("SELECT ... ") //run query and set results def results = con.rows(query) //create writer def writer = new StringWriter() def builder = new MarkupBuilder( writer ) //define standard order structure def createOrder( builder, repeat, date, quantity, id, owningId, addedBy, lastModifiedBy, version ) { repeat.times{ builder.order{ builder.orderDate(date) builder.orderQuantity(quantity) builder.orderId(id) builder.owningId(owningId) builder.addedBy(addedBy) builder.lastModifiedBy(lastModifiedBy) builder.version(version) } } } //I put the for loop inside, duhh builder.orders{ for ( i = 0; i < results.size(); i++ ) { createOrder(builder, 1, context.expand( '${#TestCase#date}' ), 1, results[i].ORDER_ID, results[i].OWNING_ID, context.expand( '${TestData#appUserID}' ), context.expand( '${TestData#appUserID}' ), 1) } } return writer.toString()8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes0Comments