dumbuserOccasional ContributorJoined 7 years ago11 Posts1 LikeLikes received1 SolutionView All Badges
ContributionsMost RecentMost LikesSolutionsRe: Interface scaling issue in 5.6.0 Up! Just updated to 5.6.0 as well and I'm having same troubles. Tried to override settings as well, but as described by Alterant, nothing works. Re: Using maven plugin with GitLab - dependencies could not be resolved If anyone is facing something similar then my problem, as it turned out, was that Gitlab runner didn't have permission to access the postgres database. It did get the driver, but couldn't connect due to security settings. Anyhow I still had problems with oracle driver, since it's not publically in smartbear repo. What I did is that I added the driver locally with the help of this tutorial: https://gist.github.com/timmolderez/92bea7cc90201cd3273a07cf21d119eb So in the end my pom looked something like this: <pluginRepositories> <pluginRepository> <id>SmartBearPluginRepository</id> <url>https://rapi.tools.ops.smartbear.io/nexus/content/groups/public/</url> </pluginRepository> <pluginRepository> <id>in-project</id> <name>In Project Repo</name> <url>file://${project.basedir}/lib</url> </pluginRepository> </pluginRepositories> and <dependency> <groupId>oracle</groupId> <artifactId>ojdbc</artifactId> <version>6.0</version> </dependency> groupId, artifactId and version (also folder names and jar, pom files, of course) named like the tutorial said. Using maven plugin with GitLab - dependencies could not be resolved Hi. I've been having some difficulties setting up my SoapUI test in Gitlab pipeline. At first I was successful getting them to run in principle. By now I added my real tests into the project and got into some problems with JDBC steps. I have both Oracle and Postgres connections in my steps. Can some of you tell me what I'm doing wrong? At first I was getting connection errors left and right. Then I realized I probably need to add dependencies. I added <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.2.8</version> </dependency> but nothing changed. I also added oracle driver but now I'm getting [ERROR] Failed to execute goal com.smartbear.soapui:soapui-maven-plugin:5.5.0:test (default) on project dsa-otsusetugi-soapui-tests: Execution default of goal com.smartbear.soapui:soapui-maven-plugin:5.5.0:test failed: Plugin com.smartbear.soapui:soapui-maven-plugin:5.5.0 or one of its dependencies could not be resolved: Failed to collect dependencies at com.smartbear.soapui:soapui-maven-plugin:jar:5.5.0 -> com.oracle:ojdbc8:jar:12.2.0.1.0: Failed to read artifact descriptor for com.oracle:ojdbc8:jar:12.2.0.1.0: Could not transfer artifact com.oracle:ojdbc8:pom:12.2.0.1.0 from/to rmv_repo (http://repo.rmv/nexus/repository/maven-public/): Transfer failed for http://repo.rmv/nexus/repository/maven-public/com/oracle/ojdbc8/12.2.0.1.0/ojdbc8-12.2.0.1.0.pom: Unknown host repo.rmv: Name or service not known -> [Help 1] What's interesting that I don't get any errors during the download phase.. [INFO] Downloading from SmartBearPluginRepository: http://smartbearsoftware.com/repository/maven2/com/oracle/ojdbc8/12.2.0.1.0/ojdbc8-12.2.0.1.0.pom [INFO] Downloading from rmv_repo: http://repo.rmv/nexus/repository/maven-public/com/oracle/ojdbc8/12.2.0.1.0/ojdbc8-12.2.0.1.0.pom [INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/oracle/ojdbc8/12.2.0.1.0/ojdbc8-12.2.0.1.0.pom [INFO] Downloading from smartbear-sweden-repository: http://www.soapui.org/repository/maven2/com/oracle/ojdbc8/12.2.0.1.0/ojdbc8-12.2.0.1.0.pom [INFO] Downloading from SmartBearPluginRepository: http://smartbearsoftware.com/repository/maven2/org/postgresql/postgresql/42.2.8/postgresql-42.2.8.pom [INFO] Downloaded from SmartBearPluginRepository: http://smartbearsoftware.com/repository/maven2/org/postgresql/postgresql/42.2.8/postgresql-42.2.8.pom (12 kB at 12 kB/s) [INFO] Downloading from SmartBearPluginRepository: http://smartbearsoftware.com/repository/maven2/org/postgresql/pgjdbc-core-parent/1.1.6/pgjdbc-core-parent-1.1.6.pom [INFO] Downloaded from SmartBearPluginRepository: http://smartbearsoftware.com/repository/maven2/org/postgresql/pgjdbc-core-parent/1.1.6/pgjdbc-core-parent-1.1.6.pom (18 kB at 25 kB/s) [INFO] Downloading from SmartBearPluginRepository: http://smartbearsoftware.com/repository/maven2/org/postgresql/pgjdbc-versions/1.1.6/pgjdbc-versions-1.1.6.pom [INFO] Downloaded from SmartBearPluginRepository: http://smartbearsoftware.com/repository/maven2/org/postgresql/pgjdbc-versions/1.1.6/pgjdbc-versions-1.1.6.pom (23 kB at 32 kB/s) [INFO] Downloading from SmartBearPluginRepository: http://smartbearsoftware.com/repository/maven2/com/jgoodies/forms/1.2.1/forms-1.2.1.pom [INFO] Downloaded from SmartBearPluginRepository: http://smartbearsoftware.com/repository/maven2/com/jgoodies/forms/1.2.1/forms-1.2.1.pom (3.4 kB at 4.9 kB/s) Currently my pom file containing dependencies looks like this: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>blaa.blaah</groupId> <artifactId>blaa-blaah</artifactId> <version>1.0-SNAPSHOT</version> <name>BLAAHSoapUITests</name> <properties> <maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.target>${java.version}</maven.compiler.target> <maven.version>3.0.0</maven.version> <soapui.version>5.5.0</soapui.version> <surefire.version>2.20</surefire.version> </properties> <pluginRepositories> <pluginRepository> <id>SmartBearPluginRepository</id> <url>http://smartbearsoftware.com/repository/maven2/</url> </pluginRepository> </pluginRepositories> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <version>1.0.0</version> <executions> <execution> <phase>initialize</phase> <goals> <goal>read-project-properties</goal> </goals> <configuration> <files> <file>${project.basedir}/test.properties</file> </files> </configuration> </execution> </executions> </plugin> <plugin> <groupId>com.smartbear.soapui</groupId> <artifactId>soapui-maven-plugin</artifactId> <version>${soapui.version}</version> <configuration> <soapuiProperties> <property> <name>soapui.logroot</name> <value>${project.basedir}/build-testlog/build-testlog-</value> </property> </soapuiProperties> <projectFile>${project.basedir}/${projectfile}</projectFile> <projectProperties> <value>END_POINT=${END_POINT}</value> <value>USER_ID=${USER_ID}</value> </projectProperties> <outputFolder>${project.basedir}/build-testlog</outputFolder> <printReport>true</printReport> <junitReport>true</junitReport> </configuration> <dependencies> <dependency> <groupId>com.smartbear.soapui</groupId> <artifactId>soapui</artifactId> <version>${soapui.version}</version> <exclusions> <exclusion> <groupId>javafx</groupId> <artifactId>jfxrt</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc8</artifactId> <version>12.2.0.1.0</version> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.2.8</version> </dependency> <dependency> <groupId>com.jgoodies</groupId> <artifactId>forms</artifactId> <version>1.2.1</version> </dependency> </dependencies> <executions> <execution> <phase>test</phase> <goals> <goal>test</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <reporting> <outputDirectory>${project.basedir}/build/reports/html</outputDirectory> </reporting> </project> Am I doing something wrong? Am I using wrong dependencies? Thanks in advance. SolvedRe: Multiple sql statements in one JDBC step with Oracle Thanks, this was very helpful. Had to google some other examples as well for my case, but this was probably the best at explaining the principle. Multiple sql statements in one JDBC step with Oracle Is there a way to use multiple sql statements with JDBC step while using Oracle database? I can have multiple inserts, updates etc. in one test step while working with Postgres, but with oracle I get ORA-00933 error. Is there a workaround so I don't have to make loads of separate JDBC steps? I have to change my tests made for Postgres so they would work in Oracle and I have A LOT of testdata creation and deletion. For example testcase which contains 7 steps right now would contain nearly 30 steps and I have testcases which would probably go up to atleast 50-60 steps. Also it's a lot of manual work, so maybe there's a better way. Thanks in advance SolvedRe: setProprertyValue string to integer to insert into database Thank you so much!! I struggled so much with it and in the end it was quite an easy fix. As always... For future refrence: I also had to change my SQL query a bit. While :userId::integer didn't work, (select cast (:userId as int)) made all the difference. Re: setProprertyValue string to integer to insert into database Nope. I get: No signature of method: com.eviware.soapui.impl.wsdl.WsdlTestSuite.setPropertyValue() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [ACCOUNT_ID, 1000092192] Possible solutions: setPropertyValue(java.lang.String, java.lang.String), getPropertyValue(java.lang.String) I suppose setPropertyValue only want strings and .toInteger() messes it up. And when I try Integer.parseInt I still get null. context.testCase.testSuite.setPropertyValue('ACCOUNT_ID', jsonResponse.accountId.first().toString()).toInteger() result: Cannot invoke method toInteger() on null object Re: setProprertyValue string to integer to insert into database Yes, the PSQL works just fine when I write a value in directly. And about the id coming as an array I'm not actually sure. It shouldn't be an array, but it's kind of confusing. When I run context.testCase.testSuite.setPropertyValue('ACCOUNT_ID', jsonResponse.accountId.toString().toInteger()) I get an error: For input string: "[1000092192]" The id is shown, but in brackets. In the json response it's not in brackets (which is correct). So is it an array? I've also tried context.testCase.testSuite.setPropertyValue('ACCOUNT_ID', jsonResponse.accountId.toString().replace("[", "").replace("]", "").toInteger()) I get an error "No signature of method: com.eviware.soapui.impl.wsdl.WsdlTestSuite.setPropertyValue() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [ACCOUNT_ID, 1000092192] Possible solutions: setPropertyValue(java.lang.String, java.lang.String), getPropertyValue(java.lang.String)" I guess it's for strings only and I can't use toInteger() here. So I tried another option def i = Integer.parseInt(context.testCase.testSuite.getPropertyValue(jsonResponse.accountId.toString())) but in that case I get an error that it's null. Which it can't be?? I mean, I just saw that the string contains the correct value. I think I should somehow get an int value here in the groovy script and then I shouldn't have a problem in the insertion. But I can't figure out how. JSON response: [{ "accountId": 1000092192, "user": "blabla", "code": "1121212", "firstName": "testfirst", "familyName": "testfamily", "country": "US", "anotherId": 23121 }] Re: setProprertyValue string to integer to insert into database Not sure what you mean about the format, but it's PSQL and looks something like this. INSERT INTO table (text, boolean, boolean, date, int, int, user_id, text, boolean, int) VALUES ('some text', 0, 0, '2001-01-01', 11111, 1111, :userId, 'some text', 0, 111); I changed all the names of the columns except user_id to their types. user_id is int as well setProprertyValue string to integer to insert into database From REST Request I get a json response which contains an accountID which I want to use in the next teststep as and id in insertion to database. In the REST request I use script assertion: import net.sf.json.groovy.JsonSlurper def jsonResponse = new JsonSlurper().parseText(messageExchange.responseContent) assert null != jsonResponse.accountId, "accountId of response either does not have value or null" context.testCase.testSuite.setPropertyValue('ACCOUNT_ID', jsonResponse.accountId.toString()) In the next JDBC step I use a property userId which has value ${#TestSuite#ACCOUNT_ID}. But when I try the INSERT, I get a error that column is of type bigint but expression is of type character varying. I've tried typing it like so :userId::integer. But then I get an error which says "No value specified for parameter 2". I suppose it's because the string I get is an array. The question is how can I setPropertyValue as a single int? There is no way that there could be an array of numbers. Userid is always just one number. I've tried everything the groovy script like toInteger() and so on, but it won't let me do that. Can someone suggest something? Solved