ContributionsMost RecentMost LikesSolutionsRe: Not able to Load data from Excel java.lang.NoClassDefFoundError Bill77 No, they didn't. SmartBear saying they are not able to reproduce the issue. Even when customers facing and reporting the issue. How to read mock service responses from files Hi All, Have a mock service which expects multiple responses depending on the request path parameter (ex: emp id). For this thought to store responses in a folder at project level as JSON files (Ex: 123456.json). I did setup mock service in ReadyAPI, when I'm running this project on local (EX: http://localhost:8080/...) it's working fine with expected responses. But when I run this mock service on a virtual server (by drag and drop to server, http://svrt12345.com:8080/....) it's not reading response files. Not getting any error (getting 200 OK) but empty response. I tried to keep those test data files in Vert server (svrt123456.com:8080) at same location path where my local has (EX: D:/ReadyAPI/Project1/TestData/12345.json). API Request: /Countries/US/City/NYC/State/NY/EmpId/12345/EmpS/M/EmpSummary TestDataFile Path: ProjectDir/TestData/12345.json (12346.json, 12347.json..) ReadyAPI Version: 3.54.0 Used below script. I tried keeping this script multiple places like OnRequest script or Response Script or Script Dispatch Style but none of them worked. import groovy.json.JsonSlurper import java.nio.file.Files import java.nio.file.Paths import com.eviware.soapui.support.* // Get the request path def requestPath = mockRequest.getPath() // Extract path parameters from the request path def pathSegments = requestPath.tokenize('/') def empId = pathSegments[7] // Access the project object def projectDir = new File(context.mockService.project.path).getParent() // 2. Define the folder path relative to the project directoryr def testDataDirectory = new File(projectDir, 'TestData') // 3. Construct the full path of the JSON file based on the parameter def jsonFile = new File(testDataDirectory, "${empId}.json") // 4. Check if the file exists if (jsonFile.exists()) { // 5. Read the file content and return it as the Mock Response def jsonContent = jsonFile.text // 6. Set the JSON content to the mock response // mockResponse.responseContent = jsonContent; context.response = jsonContent; }else { // 7. Log an error and return an error response if the file doesn't exist log.error("File not found for Route: ${empId}") } If anyone has done this before or knowledge, please share your thoughts. TIA. Re: Bug: : Resource from resource path is getting cleared Yes, it was there in 3.53.0 as well. Can you please create a ticket at ReadyAPI: New Support Request | SmartBear Software Re: Not able to Load data from Excel java.lang.NoClassDefFoundError Update::: When I downgraded to ReadyAPI 3.47.0 it's working fine, Hope SmartBrear team will look at it. Not able to Load data from Excel java.lang.NoClassDefFoundError Hi All, Does anyone facing same issue as below? not sure it's something to do with Ready API or something else. When I'm trying to access data from Excel using "DataSource" step, getting below error. Mainly running whole testcase (Sometimes it's working fine when run "DataSource" step alone before running whole testcase). Once it's started throwing below error, even if run "DataSource" step alone as well same error. Problem Observed in Ready API Versions: 3.53.0 and 3.54.0 Error: ERROR: Exception during Test Execution java.lang.NoClassDefFoundError: org/apache/commons/io/file/attribute/FileTimes at org.apache.commons.compress.archivers.zip.X000A_NTFS.fileTimeToZip(X000A_NTFS.java:91) atorg.apache.commons.compress.archivers.zip.X000A_NTFS.setModifyFileTime(X000A_NTFS.java:424) atorg.apache.commons.compress.archivers.zip.ZipArchiveEntry.addNTFSTimestamp(ZipArchiveEntry.java:530) Any help appreciated. TIA. Re: Groovy script to retrive oAUth2.0 token Hey, I use oAuth2.0 token (Which is set and used at Auth Manager at Project level ), I added below code to Test Suite setup script, it automatically pulls new token every time it runs. // Import the required classes import com.eviware.soapui.impl.rest.actions.oauth.OltuOAuth2ClientFacade; import com.eviware.soapui.support.editor.inspectors.auth.TokenType; import com.eviware.soapui.model.support.ModelSupport; // Get a project def project = ModelSupport.getModelItemProject(context.getModelItem()); // Get the needed authorization profile def authProfile = project.getAuthRepository().getEntry("YourOAUTHProfileName"); //Create a facade object def tokenType = TokenType.ACCESS; def oAuthFacade = new OltuOAuth2ClientFacade(tokenType); // Request an access token in headless mode and assign it to the authorization profile we got earlier oAuthFacade.requestAccessToken(authProfile, true, true); // Access token retrieval may take time, so we need to pause the execution for 3 seconds to finish it. You may increase this value if needed. sleep(3000); // Posts a new token to the script log log.info("Set new token OAuth2.0: " + authProfile.getAccessToken()); MQTT Connection using Certs (CA, Client, etc.) Does anyone ever used MQTT connection using certificates (CA, Client, key file etc.). We were using Basic Auth for MQTT so far, it was working fine. but now are moving to Certificates. I tried different combination but non of them worked. Gave Certificates in MQTT SSL Properties Window CA (Company RootCA Certificate) with .crt Client Certificate (tried with .pfx/.jks) KeyFile(.key) with pass Tried giving Key File and Client Cert in ReadyAPI-> Preferences-> Security->SSL->KeyStore Getting "Error during message publishing: org.eclipse.paho.client.mqttv3.MqttSecurityException "Bad user name or password", some times "javax.net.ssl.SSLHandshakeException "Received fatal alert: bad_certificate". I'm Using ReadyAPI 3.51.0 Any help appreciated, TIA. Defect: Tool freezing When try to delete a testsuite which has multiple testcases Hi MConneely ReadyAPI-3.46.1 When trying to delete a test suite which has multiple testcases, the tool is freezing and have to kill it from task manager to get it work. Can you please report it respective team or give me the link to open an issue. Thanks!! Is drag and drop test steps disabled in Ready API 3.40.1 Not able to drag and drop test steps anymore, is it disabled or broke in Ready API 3.40.1?, I didn't see this change in release notes/bugs fixed. If anyone aware of this please let me know. Re: ReadyAPI 3.9.2 - Deactivate check for incorrect endpoint? Thank you Cekay for you replay. Yes, I did update vmoptions file, and it's working fine for me from executable run(ReadyAPI GUI) but it's still throwing error if we run projects from .bat file in task scheduler. Asper my understanding, we need to update .bat file with this url check by pass parameter, which is I'm not sure how to do and looking for help. (Tried couple diff ways like my above example, it didn't work ) Thanks!!