Forum Discussion

smorri1967's avatar
smorri1967
New Contributor
7 years ago

VirtResponse getting 403 error when run in Jenkins

I have developed a TestSuite in ReadyAPI that is controlled by a Groovy Script.   The basic flow of the script is this: 1) collect and set parameters depending on custom properties 2) enable two VirtResponse steps that are configured to start when this groovy script runs 3) call an external web service and capture its response 4) wait for that external webservice to call our two VirtResponse steps and capture the requests sent to those steps 5) do some miscellaneous assertions to verify that responses are what was expected.   The groovy script controls the whole process flow which works awesomely, it changes parameters in all the disabled steps before executing them from the script and controls all the assertions by analyzing the requests and responses for each step that is executed.  This whole process works flawlessly when I run it from my ReadyApi installation on my workstation.   The goal is to run this project with Maven on a centralized Jenkins server that the rest of my team has access to.  All of our projects that do not contain virtResponse steps work great and are being used by my team mates.   If there is a VirtResponse step it appears to start a mock virt successfully but when the external services attempt to call the service now running on Jenkins it receives a 403 Forbidden error.

 

Here is the message showing the VirtResponse gets started:

[JettyMockEngine] Started Virt [VirtResponse62] on port [8088] at path [/cms/LtcrCreditCheckConsumingService62/v1

 

An attempt to access http://jenkins:8088/cms/LtcrCreditCheckConsumingService62/v1?wsdl returns the 403 forbidden error.

 

Is there some other configuration to Jenkins (since it works on my workstation), to enable the external service to call this Jetty Mock Service?

 

 

3 Replies

  • groovyguy's avatar
    groovyguy
    Champion Level 1

    I believe ServiceV only works for local service calls. For External services to call your mock, I think you need a license for Virt Server. This would allow a remote client to hit your MOCK. 

    • smorri1967's avatar
      smorri1967
      New Contributor

      I though that might be the case.  I have a trial floating virtServer license but have yet to get that working.  Can you give me some instructions on how to install the license on my Jenkins server and anything else I need to install on Jenkins (virtual server ?)

       

       

      • groovyguy's avatar
        groovyguy
        Champion Level 1

        Most of the documentation you'd need can be found here. I am not 100% certain you'd want to install VirtServer on your Jenkins server. You would probably need/want a new server for it? I am not 100% familiar with that product though.