Service Virtualization

 View Only
Expand all | Collapse all

Creation of MAR from TestSuite

  • 1.  Creation of MAR from TestSuite

    Posted Apr 09, 2020 03:05 AM
    Hi Team,

    Could you please let me know How to create mar from the test suite and what is the url to execute that mar file and run the test suites?


    ------------------------------
    Regards,
    SaikiranGarapati
    ------------------------------


  • 2.  RE: Creation of MAR from TestSuite

    Posted Apr 10, 2020 01:05 AM
    Hi Saikiran,

    Please follow below steps:
    1. Create a MarInfo file
    2. Create a Mar file

    To create a MAR info file from an existing Test suite:
    -->In the Project panel of DevTest Workstation, right-click the suite and select Create MAR Info File.

    --> Enter a name for the MAR info file and select the configuration file and click OK

    -->The .mari file is created in the same folder the suite resides in.

    Once, the MarInfo file is created you can create a mar file from workstation  and select Build Model Archive option. Another option is to use the MakeMar utility available in  LISA_HOME\bin  directory
    Example: MakeMar --show=C:\Lisa\examples\MARInfos\AllTestsSuite.mari
    you can execute MakeMar -h for help options

    Thanks.


    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 3.  RE: Creation of MAR from TestSuite

    Posted Apr 10, 2020 03:00 AM
    Thanks Vaibhav for the reply. I am checking that one and let you know if i face any issues. 

    I am trying other option also from LISA INVOKE API. I am just trying to execute the below API and getting the error.

    http://ABCD:XXXX/lisa-invoke/runTest?testCasePath=examples/Tests/test.tst&stagingDocPath=examples/StagingDocs/1user1cycle0think.stg

        <message>An error occured in 'runTest'. Message: The test case is not in a project.

    Here what i m doing is, I just staged that test case to coordinator server and hitting that API , Please let me know do i need to do anything other than this to resolve this error. Do i need to copy that test case in to registry under the mentioned path in that API or not required?




  • 4.  RE: Creation of MAR from TestSuite

    Posted Apr 10, 2020 03:11 AM
    Edited by Vaibhav Jain Apr 10, 2020 03:15 AM
    Hi Saikiran,

    It seems the test case is not accessible within the project. The API looks fine but you might have to use complete path for the testcase.

    I would recommend put the absolute path of the test case instead of relative path and try. Do the same for staging doc as well.

    Also, you must uncomment the lisa.portal.invoke.test.root property in lisa.properties (defualt value is lisa.portal.invoke.test.root={{LISA_HOME}})
    The value should be the base path needed to find the project or projects where the tests or suites are located.
    Example, it wants the Lisa_Home directory as it goes to the examples directory for the tests and suites in that project.


    Thanks.

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 5.  RE: Creation of MAR from TestSuite

    Posted Apr 13, 2020 04:48 AM
    Hi Vaibhav,

    Thanks for the reply.

    Basic Question here is, 1) Do i need to place (Means copy and paste the project) the project in Registry box or not required and if i stage that test case from Work station that is enough.My Work station and Registry is available in different boxes.
    2. Uncommenting the lisa.portal.invoke.test.root Property should be in Registry only right 




  • 6.  RE: Creation of MAR from TestSuite

    Posted Apr 13, 2020 05:21 AM
    Hi Saikiran,

    Your test case should be available in the registry box (assuming you are running your Portalon the same machine). The details you provide(path) in url and config should be of same server.

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 7.  RE: Creation of MAR from TestSuite
    Best Answer

    Broadcom Employee
    Posted Apr 10, 2020 03:15 PM
    You should use the Test Invoke API that we released as a part of 10.3 instead of Lisa Invoke API. Lots of enhancements have been done including the ability to call a test and suite by name rather than having to create a mar file if that is a way that you choose to take.

    ------------------------------
    Head of Product Management: Service Virtualization
    CA Technologies - A Broadcom Company
    ------------------------------



  • 8.  RE: Creation of MAR from TestSuite

    Posted Apr 13, 2020 04:49 AM
    Hi Koustubh Warty,

    Thanks for the Reply, As you suggested i will try using that option also.


  • 9.  RE: Creation of MAR from TestSuite

    Posted Apr 15, 2020 07:21 AM
    Hi Koustubh Warty/Vaibhav ,

    Thank you very much your response.

    I was exploring the Test Invoke API,

    My requirement is, we have different environments as part of  our testing after creating the MAR info and MAR file for Suites or test cases we want to execute the entire suite for all environments by one API call by mentioning the different environments in the project config file

    e.g:1.https://XXXXXXX:XXXX/lisa-test-invoke/api/v1/tests/run?Environment=ULAB01
          2.https://XXXXXXX:XXXX/lisa-test-invoke/api/v1/tests/run?Environment=ULAB02
          3.https://XXXXXXX:XXXX/lisa-test-invoke/api/v1/tests/run?Environment=ULAB03

    the above URL is POST method which is for running the test case and in the body tag i browse the MAR file.

    So Is there any way we can do this through Test Invoke API?

    If Yes please let us know the solution.

    Note: ?Environment=ULAB01 that extra parameter i have added because if i give like that i was expecting it to execute the cases for different environment 





  • 10.  RE: Creation of MAR from TestSuite

    Posted Apr 15, 2020 08:07 AM
    Hi Saikiran,

    If you are executing the test cases from Mar file then it will not work. But in case you are planning to execute the testcases from the project, you can pass values for tags like Project, testName, configuration etc.

    Thanks.

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 11.  RE: Creation of MAR from TestSuite

    Posted Apr 15, 2020 08:26 AM
    Hi Vaibhav,

    Could you please give me an example how to call Test Invoke API by giving Project or test name etc... I am following  the below link documnetation, i did not find any API where i can give the Project name and other things.

    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/continuous-testing/devtest-solutions/10-3/using/using-the-apis/test-invoke-api.html

    If you are referring other documentation link please give it to me here.

    Thanks in Advance.



  • 12.  RE: Creation of MAR from TestSuite

    Posted Apr 15, 2020 08:32 AM
    Edited by Vaibhav Jain Apr 15, 2020 08:32 AM
    Change the version to 10.5 and on same page under heading "Execute a Test from Project". This may not be available in 10.3, do try once.

    Thanks.


    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 13.  RE: Creation of MAR from TestSuite

    Posted Apr 15, 2020 08:36 AM
    Thanks Vaibhav. I found that, it is available in 10.5


  • 14.  RE: Creation of MAR from TestSuite

    Posted Apr 15, 2020 08:43 AM
    You can also try using LISA INVOKE APIs for running tests as well [this is available in 10.3]
    /lisa-invoke/runSuite?suitePath=suitePath&[configPath=configPath]&[async=true]&[-D<CustomTag>=x]

    Thanks.

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------