Forum Discussion

biuli's avatar
biuli
New Contributor
7 years ago

SoapUI Pro Maven plugin Auth Credentials not found

In Ready API 2.1 having a simple Soap UI project with two test scenarios. They both use the same Authorization and run ok from Ready API.

 

When adding them to a Jenkins job with maven plugin one test scenario works as before the other one fails as it cannot authenticate

 

 

Failing log from Jenkins:

 

09:24:55,441 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 401 Unauthorized
09:24:55,441 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
09:24:55,441 DEBUG [HttpClientSupport$SoapUIHttpClient] Target requested authentication
09:24:55,441 DEBUG [HttpClientSupport$SoapUIHttpClient] Authorization challenge processed
09:24:55,441 DEBUG [HttpClientSupport$SoapUIHttpClient] Authentication scope: BASIC ......
09:24:55,442 DEBUG [HttpClientSupport$SoapUIHttpClient] Credentials not found

 

OK test request log:

 

 11:02:10,020 DEBUG [HttpClientSupport$SoapUIHttpClient] Target requested authentication
11:02:10,020 DEBUG [HttpClientSupport$SoapUIHttpClient] Authorization challenge processed
11:02:10,021 DEBUG [HttpClientSupport$SoapUIHttpClient] Authentication scope: BASIC ....
11:02:10,021 INFO [HttpAuthenticationRequestFilter$UPDCredentialsProvider] .... <- Here credentials

 

 

Both request/test steps have the same auth (they call different services) but they both work locally from ReadyApi and not from Jenkins/maven.

 

I have tried to put manually the auth profile for the test step, inherit from parrent, change the order of the test suites/cases.

 

Either we are missing something very basic or this seems like a bug.

 

Is there a workaround?

How could we set manually the user/password auth mode as in maven they seem not to be sent over?

 

In the maven config pom.xml using:

SmartBearPluginRepository http://smartbearsoftware.com/repository/maven2

soapui-pro-maven-plugin  5.0.0

 

Tried with 5.1.1 but 

 

[ERROR] Failed to execute goal com.smartbear.soapui:soapui-pro-maven-plugin:5.1.1:test (default) on project fav-soapui: Execution default of goal com.smartbear.soapui:soapui-pro-maven-plugin:5.1.1:test failed: A required class was missing while executing com.smartbear.soapui:soapui-pro-maven-plugin:5.1.1:test: org/reflections/Configuration
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.smartbear.soapui:soapui-pro-maven-plugin:5.1.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/global/contint/apps/build_server/maven/FLS/local-repo-maven-3/com/smartbear/soapui/soapui-pro-maven-plugin/5.1.1/soapui-pro-maven-plugin-5.1.1.jar

1 Reply

  • biuli's avatar
    biuli
    New Contributor

    Found the following workaround:

     

    create at global level custom properties for the auth variables (user, password, auth type)

    create a Property Transfer at test step level where the global variables are assigned to the test step User, Passwd, Auth

     

    Other things I tried (unsuccesfully)

    from groovy modify the test case  auth variables (apparently at test step level the are null)

    from groovy  modify the test steps auth variables (apparently they are read-only)