How to resolve the error “java.lang.Exception: TestCase [TestCase] failed without assertions"
Hi, Thanks in advance I am running soap ui testsuite it is working fine, I have created groovy and java in soapui assertion if timeout or service gives any error it will send email alert, while running the testsuite it is sending mail if the service is giving any error or read timeout. But I am trying same thing through “Launch TestRunner” it is not working and giving below mentioned errors. Please help to resolve this issue soapui project has been attached. Error: Running SoapUI TestRunner for [CustomerService-Testing] directory: C:\Program Files\SmartBear\SoapUI-5.0.0\bin\. command: cmd.exe /C testrunner.bat -sCustomerServiceTestSuite -cCustomerServiceTestCase C:\Users\sairam\Desktop\Testingjobs\CustomerService-Testing-soapui-project.xml SoapUI 5.0.0 TestCase Runner Configuring log4j from [C:\Program Files\SmartBear\SoapUI-5.0.0\bin\soapui-log4j.xml] 21:55:19,709 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\Users\sairam\soapui-settings.xml] 21:55:22,805 INFO [WsdlProject] Loaded project from [file:/C:/Users/sairam/Desktop/Testingjobs/CustomerService-Testing-soapui-project.xml] 21:55:24,552 INFO [SoapUITestCaseRunner] Running SoapUI tests in project [CustomerService-Testing] 21:55:24,553 INFO [SoapUITestCaseRunner] Running TestCase [CustomerServiceTestCase] 21:55:24,581 INFO [SoapUITestCaseRunner] Running SoapUI testcase [CustomerServiceTestCase] 21:55:24,605 INFO [SoapUITestCaseRunner] running step [Test Request] 21:55:25,117 ERROR [WsdlSubmit] Exception in request: java.net.SocketTimeoutException: Read timed out 21:55:25,118 ERROR [SoapUI] An error occurred [Read timed out], see error log for details 21:55:25,146 INFO [SoapUITestCaseRunner] Assertion [SOAP Response] has status UNKNOWN 21:55:25,147 INFO [SoapUITestCaseRunner] Assertion [Schema Compliance] has status UNKNOWN 21:55:25,147 INFO [SoapUITestCaseRunner] Assertion [Not SOAP Fault] has status UNKNOWN 21:55:25,147 INFO [SoapUITestCaseRunner] Assertion [Script Assertion] has status UNKNOWN 21:55:25,148 ERROR [SoapUITestCaseRunner] Test Request failed, exporting to [C:\Program Files\SmartBear\SoapUI-5.0.0\bin\CustomerServiceTestSuite-CustomerServiceTestCase-Test_Request-0-FAILED.txt] 21:55:25,150 ERROR [SoapUITestCaseRunner] Error saving failed result: java.io.FileNotFoundException: C:\Program Files\SmartBear\SoapUI-5.0.0\bin\CustomerServiceTestSuite-CustomerServiceTestCase-Test_Request-0-FAILED.txt (Access is denied) java.io.FileNotFoundException: C:\Program Files\SmartBear\SoapUI-5.0.0\bin\CustomerServiceTestSuite-CustomerServiceTestCase-Test_Request-0-FAILED.txt (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.PrintWriter.<init>(Unknown Source) at com.eviware.soapui.tools.SoapUITestCaseRunner.afterStep(SoapUITestCaseRunner.java:725) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:251) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:152) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:81) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:645) at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:602) at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:399) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:162) at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:93) at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:119) 21:55:25,154 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [CustomerServiceTestCase], time taken: 517ms, status: FAILED 21:55:25,155 INFO [SoapUITestCaseRunner] TestCase [CustomerServiceTestCase] finished with status [FAILED] in 517ms 21:55:25,155 ERROR [SoapUITestCaseRunner] java.lang.Exception: TestCase [CustomerServiceTestCase] failed without assertions 21:55:25,156 ERROR [SoapUI] An error occurred [TestCase [CustomerServiceTestCase] failed without assertions ], see error log for details java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149) at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:110) at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:264) at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:98) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247) at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doReceiveResponse(HttpClientSupport.java:147) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:247) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:362) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:324) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:237) at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:127) at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:80) at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:242) at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:419) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:152) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:81) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:645) at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:602) at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:399) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:162) at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:93) at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:119) java.lang.Exception: TestCase [CustomerServiceTestCase] failed without assertions at com.eviware.soapui.tools.SoapUITestCaseRunner.throwFailureException(SoapUITestCaseRunner.java:535) at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:437) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:162) at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:93) at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:119)6.2KViews0likes1CommentSoapUI Java API sending simple Http POST
Hi, I'm using Soap UI java API for some basic functionality, such as sending soap requests and running a wsdl mock service. Now however I want to simply create a default project; a test suite; a test case and a http request test step. But I can't find out how to go about this using the Java API. Since I have no wsdl I only want to maka a simple HTTP POST call. Setting this up in SoapUI gui, no problems but I don't get which java methods to use when doing this programmatically. Can anyone give me a pointer, or two? Thanks in advance! // Nisse BakkerudSolved4.5KViews0likes3Commentssoapui setup script not executed when test case or test step run from java
Hi, When I try to run an individualtest case or a test step in a test suitefrom Java , The set up script for the test suite is not executed ! Any way to run this setup scrip explicitly ? or any other work around except having individual set upscripts for a test case ?4.3KViews0likes8CommentsAdd Upload button for OpenAPI 2.0 file as Octet-Stream
Context I am using OpenAPI ver 2.0 I have API which consumesapplication/octet-stream(JavaInputStream) Issue In OpenAPI ver 2.0 I can only set input type asmultipart/form-data(link) to have upload button. When I have applied this solution for my swagger: <code> "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "parameters": [ { "in": "formData", "name": "messageFile", "description": "Description...", "required": true, "type": "file" } ] </code> I am getting following error:Unsupported Media Typeafter sending a file - itis normal due to my API wants octet-stream. Question Is it possible to have upload button using OpenAPI ver 2.0 andapplication/octet-streamlike: If no, then what will be better solution / workaround for this?Solved3.6KViews0likes3CommentsReading PDF /PDDocument.load_3 or load not found
Hi, I have tried to setup PDF reading accoring to instructions found here https://support.smartbear.com/articles/testcomplete/testing-pdf-files-with-testcomplete/#Extr_Data_pdf I have javavirtualmachineC:\Program Files (x86)\Java\jre1.8.0_131\bin\client\jvm.dll and I have added pdf-box 1.8.13.jar and classes to project https://www.dropbox.com/s/16ojffsuzzr53rc/javasettings.PNG?dl=0 In script I get error "Unknown name load_3". same for load and load_2. Code completion works only until JavaClasses.org_apache_pdfbox_pdmodel.PDDocumentafter PDDocument nothing is shown. But for example code completion in JavaClasses.org_apache_pdfbox_util.PDFTextStripper shows three instances of NewInstance? What is wrong here? My code is quite simple function LoadPdf( FileName ); var docObj; begin docObj := JavaClasses.org_apache_pdfbox_pdmodel.PDDocument.load_3( FileName ); result := docObj; end; I have TestComplete 12. thanks, mikaSolved2.9KViews0likes2CommentsIssue while Running SOAPUI xml from Java in a container like Jboss Server
I am trying to run the SOAP UI project xml from the Java end and that java project is a web application that has been deployed in Jboss server. The SOAPUI xml is running for the first time and report is generating but the server is getting hanged after that .. and also it is not allowing to do any successive run . I am closing the SOAPUI Thread also completely. Please find the code snippet which I have written for this. //SOAPUI xml file path set here runner.setProjectFile((String) detail.get("testcasepath")); runner.setOutputFolder(filePath + timeStamp); // Executing the xml and generating the report runner.setJUnitReport(true); runner.setPrintReport(true); try { LOGGER.error("Run Started"); runner.run(); } catch (Exception e1) { System.out.println("Execution failed due to : "); e1.printStackTrace(); } } // Need to shutdown all the threads invoked by each SoapUI TestSuite SoapUI.getThreadPool().shutdown(); try { SoapUI.getThreadPool().awaitTermination(1, TimeUnit.MINUTES); } catch (InterruptedException e) { e.printStackTrace(); } // Now to shutdown the monitor thread setup by SoapUI Thread[] tarray = new Thread[Thread.activeCount()]; Thread.enumerate(tarray); for (Thread t : tarray) { if (t instanceof SoapUIMultiThreadedHttpConnectionManager.IdleConnectionMonitorThread) { ((SoapUIMultiThreadedHttpConnectionManager.IdleConnectionMonitorThread) t) .shutdown(); } } // Finally Shutdown SoapUI itself. SoapUI.shutdown();2.7KViews0likes11CommentsHow do I properly define an example for a nullable property in OpenAPI 3?
I am using OpenAPI and openapi-generator-maven-plugin with Spring Boot. I'm trying to create an example object in my response. I've followed the suggestions of several different web pages, especially this one: https://swagger.io/docs/specification/adding-examples/ But no matter what I try, I can't get the example data to show up correctly. Here the object that should be in a request: Period: type: object required: - startDate - endDate properties: startDate: type: string format: date nullable: true example: "2021-01-01" endDate: type: string format: date nullable: true example: "2030-01-01" CreateInstancesRequest: type: object required: - id properties: id: $ref: '#/components/schemas/Id' period: allOf: - $ref: '#/components/schemas/Period' But I get not what I want: I expect something like this: { "id": "some-id", "period": { "endDate": "2020-01-01", "startDate": "2022-01-01" } } But maybe I am wrong because generated java code for the Period class: I thinkpresentproperty from actual example came fromorg.openapitools.jackson.nullable.JsonNullableclass. Can you help me, please?Swagger show file content via @ExampleProperty annotation
I am using swagger 3.0.0-Snapshot to create documentation for my Spring Boot application. My maven dependencies are <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>3.0.0-SNAPSHOT</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>3.0.0-SNAPSHOT</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-spring-webmvc</artifactId> <version>3.0.0-SNAPSHOT</version> </dependency> My swagger config class is as simple as possible: @Configuration @EnableSwagger2WebMvc public class SwaggerConfig { @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .useDefaultResponseMessages(false) .select() .apis(RequestHandlerSelectors.basePackage("com.mycompany.cs")) .paths(PathSelectors.any()) .build() .pathMapping("/") .useDefaultResponseMessages(false); } And my controller method has the following annotation: @ApiOperation(value = "Hello world", httpMethod = "POST") @ApiResponses(value = { @ApiResponse(code = 200, message = "OK", examples = @Example(value = @ExampleProperty(mediaType = "application/json", value = exampleValue))) }) It is working and shows in Swagger UI "Example Value" field value that has constant string exampleValue that is private static String. The question is how to pass the content of json file that is in resources folder to @ExampleProperty value? I tried to read file content in static block and pass it to initialize final String with it, but then the compiler says that "Attribute value has to be constant". The content of json file must be shown in example field in Swagger UI.2.3KViews0likes0CommentsUndefined SerialPort
Hi, I am a beginner in both TestComplete and Scripting (Java). I am trying to send sequence and read the com port of a device using TestComplete. I found the code on this page:https://support.smartbear.com/testcomplete/docs/scripting/working-with/com-ports.html I copied the function Test() on the page and tried to run it. I received an error message saying 'Cannot read property 'SerialPort' of undefined. I am not sure whats going on, could anyone help me. I did the test on a VM, .NET already installed, "NET Classes Support' plug-in is installed and enabled". Thanks in advance.Solved1.8KViews0likes4Comments[JAVA] [JAX-RS] Server InvalidDefinitionException: Cannot construct instance by using oneOf
Hi Smartbear Community, I have the following swagger.yaml that uses theoneOfkeyword and I used the latest Swagger codegen tools (3.0.22) to create a server stub for JAX-RS Jersey. openapi: 3.0.0 info: version: 0.0.1 title: Polymorphism example description: '' paths: /animal: post: summary: Create a new animal requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Animal' responses: '201': description: Created components: schemas: Animal: properties: name: type: string props: oneOf: - $ref: '#/components/schemas/Fish' - $ref: '#/components/schemas/Dog' Fish: type: object properties: depth: type: integer Dog: type: object properties: country: type: string I am trying to post the following example object: { "name":"Foo", "props":{ "country":"Bar" } } But this results in the following exception: javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `io.swagger.model.OneOfAnimalProps` (no Creators, like default construct, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 30] (through reference chain: io.swagger.model.Animal["props"]) at org.glassfish.jersey.servlet.WebComponent.serviceImpl (WebComponent.java:432) at org.glassfish.jersey.servlet.WebComponent.service (WebComponent.java:370) at org.glassfish.jersey.servlet.ServletContainer.service (ServletContainer.java:389) at org.glassfish.jersey.servlet.ServletContainer.service (ServletContainer.java:342) at org.glassfish.jersey.servlet.ServletContainer.service (ServletContainer.java:229) at org.eclipse.jetty.servlet.ServletHolder.handle (ServletHolder.java:808) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1669) at io.swagger.api.ApiOriginFilter.doFilter (ApiOriginFilter.java:15) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle (ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle (SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle (SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle (ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope (ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope (SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope (ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle (ContextHandlerCollection.java:215) at org.eclipse.jetty.server.handler.HandlerCollection.handle (HandlerCollection.java:110) at org.eclipse.jetty.server.handler.HandlerWrapper.handle (HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle (Server.java:497) at org.eclipse.jetty.server.HttpChannel.handle (HttpChannel.java:310) at org.eclipse.jetty.server.HttpConnection.onFillable (HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run (AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run (QueuedThreadPool.java:555) at java.lang.Thread.run (Thread.java:748) Swagger-codegen version Swagger-codegen version: 3.0.22 Command line used for generation CLI command:java -jar swagger-codegen-cli.jar generate -i openapi.yaml -l jaxrs-jersey -o jaxrs-jersey/ Any advise how to fix this issue is much appreciated!1.6KViews0likes4Comments