How to change the API of a REST test step
Hi guys, If you test REST APIs in SoapUI, you may encounter an issue where you cannot change the API attached to the REST test step. I am not aware of any standard way to do it, so I prepared a simple Groovy script to change the test step's API programmatically: testRunner.testCase.getTestStepList().each(){ step = it service = step.getService() log.info("TestStep: ${step.getName()}") config = step.getRequestStepConfig() log.info "Before: ${step.getService()}" config.setService("BankGround_v1.12") log.info "After: ${step.getService()}" } I thought this may help those of you who work with REST APIs, which get changed over time (new versions). For a longer story, you can visit the following article: https://www.linkedin.com/pulse/soapui-what-rest-api-changes-karel-husa-7vb2e33Views2likes0CommentsSoapUI long term issues
Hi, I have been using SoapUI for a while with a view to recommending it and ReadyAPI to the company as our default SOAP and REST api tool. However there are some fundamental problems that seem to have been around on the forums for a while that I would like further information on if possible. By the way I am using version 5.7.0: WSDL refresh - SoapUI often gets itself into a state where a service Update Definition will always fail with a message that includes the phrase "a[c] is null". Saving the project, closing SoapUI, restarting SoapUI and performing another Update Definition will be successful. Adding requests to operations - Often either adding a new request or cloning an existing rest on an operation will create the request, but it never appears in the tree beneath the operation and there is no way to refresh the tree. The only way I have found to select the new request is to select the same operation in the mock service and right-click Open Request and then choose the new request. The only way to see the request under the operation is to once again saving the project, close SoapUI, and restart SoapUI. Mock service caching - I have also had a few occasions where a mock service will return old responses rather than an updated one, as if it were cached. This is infrequent and harder to reproduce consistently, but stopping the mock service and restarting it makes no difference, and again only saving the project, closing SoapUI, restarting SoapUI, restarting the mock service and make the request again will get the expected response. Documentation - The online documentation is quite light. I found this to be particularly true for mock service operation dispatching, where a few more examples would help, and a full API for the build in objects such as requestContext. Also a link to the APIs for the items that can be imported would be useful. Forum - There doesn't appear to be much forum activity, and I haven't noticed much interaction from SmartBear employees. Cheers, Chris751Views2likes2CommentsSoapUI 5.6.0 (Thanks!)
I have no clue what they did, but version 5.6.0 is running smooth when using a Mac. I have had not yet had any session that was jammed. I even could run all my tests automatic sequential. This 5.6.0 is a relief compared to 5.5.0 and previous versions (since 4.6.0). I am very satisfied with this version!😀1.3KViews2likes1CommentProperties as not Strings?
Hello all I would like to send an object from one test suite to another using a runTestCase step. is it possible to pass an object, like context, into that and then use that object context(non-mapped values) in the testCase as an object and not a string?60Views1like2CommentsScripting goto next step
I am using SoapUI 5.7. In my test steps, I use a groovy script to conditionally jump past a step as it will fail if running the suite locally. I can skip to another step by name, but I am concerned if someone were to rename a step or rearrange them it would break things. As such, how can I just check what step index I am currently on and jump past the next step (current +2)? testrunner.gotoStepByName() testrunner.gotoStep() //--unable to get the index from the step class context.getCurrentStep()833Views1like5CommentsRequest is not available in MockService for script
I have prepared REST Mock Service. It contains PATH method request handling which has set "Script" as Dispatch. The foollowing script is set: import groovy.json.JsonSlurper def jsonInputString = mockRequest.getRequestContent() def cnt = new JsonSlurper().parseText(jsonInputString) log.info "test: " + cnt If the PATCH request is sent to the REST MockService, I get " Wed Apr 27 14:14:30 CEST 2022:ERROR:An error occurred [com.eviware.soapui.impl.wsdl.mock.DispatchException: Failed to dispatch using script; java.lang.IllegalArgumentException: Text must not be null or empty], see error log for details I have noticed that it works for POST method What can I get request in the script ? "458Views1like0CommentsLoadScripts not working: SOAPUI claims it may contain "malicious code" ||-( Why?
On a a colleague's machine SOAPUI refuses to start up mocks automatically. On my system (using same SOAPUI-version v5.6.0, same OS (Windows 10), same soapui project files) it works as it always did.On his machine mocks can be started manually and individually but not by running the LoadScript. In his log file I found multiple entries reading: "In project '<project name here>' we have detected Load script that may contain malicious code, if you do not want to receive this message please change the setting in preferences." What the heck is this supposed to mean? ||-( The loadscript reads: for (ms in project.mockServiceList) { // open window: def dp = com.eviware.soapui.support.UISupport.showDesktopPanel(ms) // start mockservice: ms.start() // minimize window: com.eviware.soapui.SoapUI.desktop.minimize(dp) } We are using this very same load script since several years in misc. projects. What causes SOAPUI to suddenly consider this as malicious code? Where is that preference setting that is referenced in the error message? We found nothing in preferences that sounds even vaguely related to maliscious code nor loadscripts (except the checkbox to disable them). And how to we convince SOAPUI to run this script?1.8KViews1like4CommentsTrying to create me a SOAP-UI plugin - archetype-catalog missing :-(
I would like to program me a SOAP-UI plugin.To do so I started following the tutorial at https://www.soapui.org/extension-plugins/developing-plugins/plugin-development/#1-3-Creating-a-simple-search-plugin. Unfortunately with that I am failing already in the very first step, namely to use maven to create me a basic plugin project: Running the described command mvn archetype:generate -DarchetypeGroupId=com.smartbear.maven.archetypes -DarchetypeArtifactId=soapui-plugin-archetype -DarchetypeCatalog=http://www.eviware.com/repository/maven2 at first looks fine and start downloading a LOT but then ends in: ... [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate (default-cli) on project standalone-pom: archetypeCatalog 'http://www.eviware.com/repository/maven2' is not supported anymore. Please read the plugin documentation for details. -> [Help 1] Where is that archetypeCatalog gone? Or what's else is the current best-practice to create such a plugin? Michael820Views1like0CommentsSoap call to code convertion
I've been struggeling with this for way to long now, I'm trying to have a service call working in PHP, that does work perfectly in SoapUI.... A service called "CheckIn@work" uses a what's called X.509 authentication. this users a p12-keystore with alias and password. The screen above is the setting I currently use for the request. The timestamp has just the (default?) value of 60 seconds. The keystore configuration is the follwoing: Now for the request configuration: Endpoint:https://services-sim.socialsecurity.be/SecurityTokenService/v1 The body is (and needs to be exacly) the follwoing: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header/> <soap:Body> <wst:RequestSecurityToken Context="abc" xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512"> <wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType> <wst:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</wst:RequestType> <wst:Claims Dialect="http://schemas.xmlsoap.org/ws/2006/12/authorization/authclaims"> <auth:ClaimType Uri="urn:be:smals:expeditor:number" xmlns:auth="http://schemas.xmlsoap.org/ws/2006/12/authorization"> <auth:Value>[AN_UNIQUE_VALUE]</auth:Value> </auth:ClaimType> </wst:Claims> </wst:RequestSecurityToken> </soap:Body> </soap:Envelope> I then get a big response if the request worked. In my case, the request succeeds in SoapUI, but it does not in PHP. The WSDL data looks like the following: I have no idea what SoapUI does in the background of authentication with the X509 certificate. The whole "tutorial" on how the SouapUI is being set up, can be found herehttps://www.socialsecurity.be/site_nl/general/helpcentre/soa/overview.htm(dutch) I can share my PHP code, but I don't think that that is "allowed" here, so i'll leave that for now (except if someone would need or want to see it). Hoping for someone who can explain to me how that soapUI handles this request and how I can reproduce this in another (PHP) language... Kindest regards Robin Rosiers865Views1like0Comments