Contributions
Re: Is it possible to transfer the results of a JDBC step to an array or list?
I'm really sorry about that. I'm sure is because I'm totally clueless about SoapUI, testing and programming in general, and English not being my mother tongue does not help either. I'll try to formulate in another way: I have a JDBC step which returns several nodes with child-nodes as an XML response. I want to store this information into an 'arrays of arrays' so later I can access this data from a Groovy Script. Perhaps this piece of code can help me to explain what I'm trying to do: // Create an empty list to store csv file info def testDataSet = [] // Load the csv file def fileName = "C://SoapUI Projects//Data//test.csv" // Opens the file, iterates through each line and splits the line on the commas into an array new File(fileName).eachLine { line -> testDataSet.add( line.split(",") ) } // Select a random line def index = (int)Math.random()*testDataSet.size() def testDataLine = testDataSet[index] // Assign their value to the Test Case Property fields def props = testRunner.testCase; props.setPropertyValue("valueOne", testDataLine[0]) props.setPropertyValue("valueTwo", testDataLine[1]) props.setPropertyValue("valueThree", testDataLine[2]) In that particular case, the index is randomly selected which won't work for me. I need some way to store the information in a list so later I can access all the values that are stores on the nth index. I hope this clears up what I'm trying to do. Anyways, thank you so much for your reply! I appreciate it!1.6KViews0likes1CommentIs it possible to transfer the results of a JDBC step to an array or list?
Hello all. I'm not sure what I'm trying to do can be accomplished on the free version. Here's what I would like to do: - Get some results using a JDBC step as XML - Transfer all these nodes to a list - Read from that list For example I got this: <Results> <ResultSet fetchSize="128"> <Row rowNumber="1"> <TYPE>somevalue</TYPE> <SUBTYPE>somevalue</SUBTYPE> <ID>somevalue</ID> </Row> <Row rowNumber="2"> <TYPE>somevalue</TYPE> <SUBTYPE>somevalue</SUBTYPE> <ID>somevalue</ID> </Row> <Row rowNumber="3"> <TYPE>somevalue</TYPE> <SUBTYPE>somevalue</SUBTYPE> <ID>somevalue</ID> </Row> <Row rowNumber="4"> <TYPE>somevalue</TYPE> <SUBTYPE>somevalue</SUBTYPE> <ID>somevalue</ID> </Row> </ResultSet> </Results> Then I would like to insert the Type, SubType and ID on each index of the list so later I can get the nth index of that list and retrieve these three values. I'm terrible sorry if I'm not being clear enough, as I'm really newbie when it comes to SoapUI and testing in general. Thanks for reading so far.1.6KViews0likes3CommentsRe: [Solved] [JDBC] Cannot connect to a MS SQL database
I'll try for sure. This is the current configuration for my JDBC step: - Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver - Connection String: jdbc:sqlserver://HOSTNAME\sqlexpress;databaseName=MYDB;username=USER;password=PASS - Driver File: C:\Program Files\SoapUI-5.2.1\bin\ext\sqljdbc4.jar And that's it! Let me know if it works20KViews1like2Comments[Solved] [JDBC] Cannot connect to a MS SQL database
Hello. I'm having issues connecting to a MS SQL database with JDBC. I went to the JDBC drivers page and saw that there isn't a download link for MS SQL driver. So I went to the Microsoft website and downloaded the Microsoft JDBC Drivers 6.0, 4.2, 4.1, and 4.0 for SQL Server. I extracted the file and added both sqljdbc.jar and sqljdbc4.jar (individually) but whenever I try to test the connection I get the following error message: com.eviware.soapui.support.SoapUIException: Failed to init connection for driver [com.microsoft.sqlserver.jdbc.SQLServerDriver], connectionString [jdbc:microsoft:sqlserver://HOSTNAME\SQLExpress:3306;databaseName=MYDB;user=USER&password=PASS] I checked the SoapUI log and the drivers are being loaded. For example: Mon Dec 05 08:08:21 PST 2016:INFO:Adding [C:\Program Files\SoapUI-5.2.1\bin\ext\sqljdbc.jar] to extensions classpath According to the error log, it seems that the driver loaded isn't the correct one: Mon Dec 05 08:35:48 PST 2016:ERROR:java.sql.SQLException: No suitable driver Obviously I'm doing something wrong here. Can someone help to me to understand where I'm making the mistake? If it helps, the db connection works (checked with MS SQL Server Manager) and I was able to connect to a MySQL db using SoapUI (different db though). Thanks for reading and I appreciate any advice you may have!Solved23KViews0likes20CommentsIs it possible to apply gzip compression to a particular Test Step?
Hello all, I'm required to apply gzip compression to a particular Test Step within a Test Case that contains other Test Steps, would that be possible? In other words, if I've, say, 4 Test Steps and I only need to apply gzip compression to only one of them, can this be done? Any advice and/or guidance would be truly appreciated. Thanks!763Views0likes0CommentsA few questions from a beginner (modify a parameter on a GET request and repeat a test step)
Hello all, I'm a beginner when it comes to both SoapUI and testing, so please forgive me if these are really silly questions. I just wanted to clarify that I'm not looking for you to make my 'homework', rather some pointers or guidance. Here is what I'm trying to achieve: 1) I have a few GET request that looks like this: Is there a way to dynamically modify the number? If so, where should I be looking? 2) Similar to the previous question, I have some GET requests that looks like this: Also, is there any way to dynamically modify that value? 3) I made a Test Step using a script I found on this page, so I can load a random value from a file into an HTML tag. However, if I add this Test Step to a Load Test it will be only run once per thread. How can I get to run it several times per thread so I can generate more and different request each run of the Load Test? In other words, I would like to be able to simulate, let's say, 10 request per thread with random values (generated from the file). Any advice will be greatly appreciated! Many thanks for reading this far.564Views0likes0CommentsQuestion about Load Test output
Hello all. I have a working Load Test set up on SoapUI that for some reason is not resulting as I expect. Either that, or I'm misunderstanding how it works! Here's how it's set up: Threads: 20 Strategy: Simple Delay: 1200ms Random: 0.2 Limit: 600 seconds My understanding is that the 20 threads will make each POSTs request (the batch of seven) every 960~1200ms, or roughly 140 requests per second. However, the outcome is rather different: about 12 POSTs request per seconds instead of the expected ~140. What am I doing wrong? Is something on my configuration? Am I misunderstanding how it works? If this is the wrong approach, how can I best emulate a load of about 100 request per second? Many thanks for any advice!532Views0likes0CommentsRe: [REST] Having the following error: error getting response java.net.socketexception connection reset
Hi there, thanks for your reply! I finally found out what was going on: there was a Windows Registry Key messing around with the certificates. I don't know why it was working using a regular HTTP requester tool and not SOAPUI. Anyways, it is solved now!2.5KViews0likes0Comments