ContributionsMost RecentMost LikesSolutionsNot able to set basic authentication for all test requests across all test suites in a REST project. I am trying to set basic authentication in all requests across multiple test suites in a REST project. To achieve that I am using a groovy script(kept in a different test suite), to set the username, password and endpoint for all requests. The problem seems to be that the username and password is reflected correctly in the Custom Properties section but when I run the actual REST service, there is an error since the authentication details are not taken up. Mentioned below is groovy Script I am using. Any insight into this issue is appreciated. SOAPUI version : Open Source v5.2.1 Groovy Script import com.eviware.soapui.SoapUI import com.eviware.soapui.settings.HttpSettings /* Explantion for the Groovy to set properties for all testsuites/testcases and testrequests inside a SOAP project * =================================================================================== * def Project : this identifies all the test suites present inside the project * def soapSuites : this identifies all the test cases inside the project * def soapRequestsList : this identifies all the requests inside a test case * method setPropertyValue : used to set all the properties as desired * * Auth preemptively is set true at the SOAP level * =================================================================================== */ def project = context.testCase.testSuite.project; for (testSuite in project.testSuiteList) { //log.info testSuite.name; def soapSuites = testSuite.getTestCaseList() for(soapTestCase in soapSuites){ //log.info soapTestCase.name def soapRequestsList = soapTestCase.getTestStepList() //log.info soapRequestsList.name for(soapRequest in soapRequestsList ){ soapRequest.setPropertyValue("Username","<username>") soapRequest.setPropertyValue("Password","<password>") soapRequest.setPropertyValue("Endpoint","<Using the endpoint of the environment under test>") } } } //To enable Pre-emptive authentication, set it true. Set it to false otherwise. //This is a SOAP level setting and is applicable for all projects in SOAPUI SoapUI.getSettings().setBoolean(HttpSettings.AUTHENTICATE_PREEMPTIVELY, true) SoapUI.saveSettings() Re: [Solved] [JDBC] Cannot connect to a MS SQL database Thanks for the answer PaulMS, worked like a charm! Copied sqljdbc41.jar and sqljdbc_auth.dll(x64 version for me) in the folder C:\Program Files\SmartBear\SoapUI-5.2.1\bin\ext Restarted SOAPUI(v5.2.1) and voila "The Connection Successfully Tested" pops up on my screen. Re: Trouble with SoapUITestCaseRunner Did you try importing the jars from SOAPUI lib folder? I was facing a similar issue, where i had added a maven dependency for only soapui. When I ran my junit tests it an returned an error similar to yours. Went through the smartbear junit-soap intergration page and added all the soapui jars present in the "lib" folder to my project and now it is successfully executing the junit tests. You can find the documentation for it here. Excerpt : "Copy all the jar files from the lib folder for SoapUI Pro Installation folder in class file path. Copy the soapui-pro-5.0.0.jar (or corresponding version) from the bin folder in SoapUI Pro intallation directory."