Service Virtualization

  • 1.  Get virtual service when real service fails based on status code like 500,501.. 400,401

    Posted Jul 21, 2017 07:17 AM

    how to redirect to ca dev virtual service when real service fails based on there status code.

     

    We have an option in CA dev test to get virtual response if no response from live system(failover).

     

    But, i need to get exception when the status code is 500, 501... and i need to get virtual response when status code is 400, 401... 

    How can i customize?

    Need to add some more steps in VSM?



  • 2.  Re: Get virtual service when real service fails based on status code like 500,501.. 400,401
    Best Answer

    Posted Jul 24, 2017 12:14 PM

    Hi Vinay,

     

    Try to add an assertion in the Live Invocation step to verify what is the response - example: Ensure Result Contains Expression - Ensure Result Contains Expression Assertion - DevTest Solutions - 10.1 - CA Technologies Documentation

    If it finds the status code you want, then the next step could be Go To: VS Image Response Selection.

     

    Hope it helps.

    Heloisa



  • 3.  Re: Get virtual service when real service fails based on status code like 500,501.. 400,401

    Posted Jul 25, 2017 02:29 AM

    Hello Vinju,

     

    Can you show me by screen shot where is this option to enable failover? Also can you let me know please, have you enabled this during creating virtual service or test case?

     

    I am also having same use case but want to know how we can implement this. Your help can sort it out. Also just want to tell you that I am using Lisa 7.5.2 version as of now.

     

    Cheers..

     

    Shivam Garg



  • 4.  Re: Get virtual service when real service fails based on status code like 500,501.. 400,401

    Posted Jul 25, 2017 11:27 AM

    Shivam,

     

    The execution mode 'Failover' can be enabled using the Server Console or DevTest Portal.

    This option is available starting with DevTest 8.0. When the execution modes Stand In, Failover, and Learning were added.

     

    Heloisa



  • 5.  Re: Get virtual service when real service fails based on status code like 500,501.. 400,401

    Posted Jul 25, 2017 10:16 PM

    Thanks Heloisa.

     

    yesterday only I noticed.



  • 6.  Re: Get virtual service when real service fails based on status code like 500,501.. 400,401

    Posted Aug 17, 2017 09:20 AM

    Sorry, for being late

    Got resolved with my issue bro...

    There is an option in CA Workstation to Work with Status Code. This can be done once you create Virtual Service. Don't know about from which version it supports but i'm using v9.5.1. 

     

    In VSM  Live Invocation Step we could able to give Status codes for which we can get virtual response.

     

    At the same in Dev test portal we need to keep execution mode in Fail over mode.

     

    If you need any detailed explanation i can give you more