Service Virtualization

  • 1.  Need to customise the Reporting!

    Posted Mar 12, 2017 11:57 PM

    Hey  

     

    I need to customise the DevTest reporting, that include details of all the assertions that were fired for each test step with their expected and actual value. Also I would like to capture the step response in the reporting as well. Need some guidance to write the script.

     

    I feel the DevTest SDK and the recently written pdf (guide for scripting in DevTest) lacks proper guidance and tutorials to actually write scripts in DevTest. Also, the unavailability of content assist in DevTest makes it even harder! Is there any repository available where I can see other people's scripts?? Anything on this will be helpful!



  • 2.  Re: Need to customise the Reporting!

    Posted Mar 21, 2017 11:00 AM

    Does this idea CUSTOMIZED LISA REPORTS address your need?



  • 3.  Re: Need to customise the Reporting!

    Posted Mar 22, 2017 12:16 PM

    Hi Dave,

     

    It does! 

    Yet to identify the solution though! 



  • 4.  Re: Need to customise the Reporting!

    Posted Mar 21, 2017 03:32 PM

    Hi,   I have done so custom reports/the way we wanted to display the results on server console .. (but latest versions of devtest will not support server console).. refer the below code snippet only for reference and you can get some ideas..

     

    import com.itko.lisa.vse.stateful.model.Request;
    import com.itko.lisa.vse.stateful.model.Response;
    import com.itko.lisa.vse.stateful.model.TransientResponse;
    import java.util.ArrayList;
    import java.util.logging.Logger;
    import com.itko.util.Parameter;
    import com.itko.util.ParameterList;
    import java.util.logging.Level;

    /* to display in xml format
    def theBody = lisa_vse_request.aetBodyText();
    testExec.setStateObject("theBody",theBody);
    testExec.warn("Received message payload at LISA ", theBody);
    */

    def theJsonBody = testExec.getStateObject("lisa.vse.http.current.transaction.body");
    testExec.warn("Received message payload at LISA", theJsonBody);


    responseList = testExec.getStateObject("lisa.vse.response");
    def responseText = "";
    TransientResponse response = responseList.get(0);
    //testExec.warn("JSON response sent from LISA", responseText);
    responseText = responseText + response.getBodyAsString();

    testExec.warn("JSON response sent from LISA", responseText);


    ParameterList metadata = response.getMetaData();
    def content_type=metadata.getParameter("Content-Type");
    def http_response_code=metadata.getParameter("HTTP-Response-Code");
    def http_response_code_text=metadata.getParameter("HTTP-Response-Code-Text");
    _logger.error("[content_type]==> {}", content_type);
    _logger.error("[http_response_code] ==> {}", http_response_code);
    _logger.error("[http_response_code_text] ==> {}", http_response_code_text);



  • 5.  Re: Need to customise the Reporting!

    Posted Mar 22, 2017 12:21 PM

    Hey Jagath,

     

    Thanks for your reply  really appreciate it!

     

    I've few questions -

     

    1) What do you mean by server console here?

    2) Where can we get to know all the packages/ classes available in DevTest? - I really need help here, not having the proper information which class to use paralyses me!

    3) Where we can get to know the methods available for these classes?

    4) Is there a way to enable content assist in DevTest so that it shows all the available classes?



  • 6.  Re: Need to customise the Reporting!

    Posted Mar 23, 2017 07:29 AM

    Take a look in your installation folder  (  LISA_HOME/doc/SDKJavaDoc.zip ).  For example,  C:\DevTest_9.5.1\doc\SDKJavaDoc.zip if you installed DevTest in a directory DevTest_9.5.1 on C: