Service Virtualization

Expand all | Collapse all

Lisa Invoke API Error - The test case is not in a project.

Jump to Best Answer

Koustubh Warty05-17-2016 11:09 PM

  • 1.  Lisa Invoke API Error - The test case is not in a project.

    Posted 05-15-2016 07:20 PM

    Hi All,

    I am trying to execute devtest test case using lisa invoke apis from local machine against the DevTest server which is on different host and getting error as "the test case is not in a project".

     

    URL : http://..../lisa-invoke/runTest?testCasePath=C:\\Project\\SOAPModel\\Tests\\SOAPvirtualServiceTestCase.tst

     

    Error :

    <?xml version="1.0" encoding="UTF-8"?>

    <invokeResult>

        <method name="RunTest">

            <params>

                <param name="testCasePath" value="C:\Project\SOAPModel\Tests\SOAPvirtualServiceTestCase.tst" />

                <param name="configPath" value="" />

                <param name="callbackKey" value="72170D9B1AF211E6A85C005056985E8C" />

                <param name="coordName" value="Coordinator" />

                <param name="stagingDocPath" value="" />

            </params>

        </method>

        <status>ERROR</status>

        <result>

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

    Test Case: SOAPvirtualServiceTestCase.tst

    Stack: java.lang.IllegalArgumentException: The test case is not in a project.

    Test Case: SOAPvirtualServiceTestCase.tst

      at com.itko.lisa.model.mar.ModelArchiveInfo.createTestMARInfo(ModelArchiveInfo.java:247)

      at com.itko.lisa.model.mar.TestMariBuilder.build(TestMariBuilder.java:102)

      at com.itko.lisa.invoke.webapp.LaunchLisaTestHelper.runTestNewSchool(LaunchLisaTestHelper.java:488)

      at com.itko.lisa.invoke.webapp.LaunchLisaTestHelper.runTest(LaunchLisaTestHelper.java:436)

      at com.itko.lisa.invoke.webapp.LaunchLisaTestHelper.invokeLisaTest(LaunchLisaTestHelper.java:292)

      at com.itko.lisa.invoke.webapp.InvokeLisaTestServlet.service(InvokeLisaTestServlet.java:109)

     

    Thanks.



  • 2.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-15-2016 11:04 PM

    The command will look for the path on your Registry machine. Are you getting the error even after placing the test cases on the Registry machine's Project folder? 



  • 3.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-15-2016 11:46 PM

    Hi Koustubh, I haven't tested this scenario. Do you recommend me to deploy test case on Registry as a part of MAR and provide a test case path to lisa invoke api request ? Cant I execute test case against remote registry (virtual service) ? Thanks.



  • 4.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-16-2016 12:04 AM

    Hi Koustubh, just for an update. Test case running successfully after placing it on the registry machine's project folder. Can you help me on test case execution with remote registry using lisa invoke apis ?

     



  • 5.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-17-2016 12:42 AM
    You might have to use cURL to pass test cases locally to a remote registry and VSE..




  • 6.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-17-2016 11:09 PM

    Did you try using curl?



  • 7.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-19-2016 12:17 PM

    Hi Koustub, I have placed my test case files on remote registry server and trying to execute it from different machine but getting same error. Dont know whether is a API issue or anything different ?

     

    I tries both the scenarios and getting same error as The test case is not in a project -

     

    1. Test case is on (Host-1) and trying to run it from (Host-1) using lisa invoke api against the remote registry (Host-2)

    2. Test case is on (Host-2) and trying to run it from (Host-1) using lisa invoke api against the remote registry (Host-2)

     

    Command:

    $ curl --insecure --request GET --url "https://abcd.com:1505/lisa-invoke/runTest?testCasePath=/tmp/SOAPVirtualServiceProject/Tests/SOAPvirtualServiceTestCase.tst&stagingDocPath=/tmp/SOAPVirtualServiceProject/Tests/StagingDocs/Run1User1Cycle.stg"

     

    Result:

    <?xml version="1.0" encoding="UTF-8"?>

    <invokeResult>

      <method name="RunTest">

        <params>

          <param name="testCasePath" value="/tmp/SOAPVirtualServiceProject/Tests/SOAPvirtualServiceTestCase.tst" />

          <param name="configPath" value="" />

          <param name="callbackKey" value="A01E00611DDC11E69AAA005056985E8C" />

          <param name="coordName" value="Coordinator" />

          <param name="stagingDocPath" value="/tmp/SOAPVirtualServiceProject/Tests/StagingDocs/Run1User1Cycle.stg" />

        </params>

      </method>

      <status>ERROR</status>

      <result>

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

    Test Case: /tmp/CASV/SOAPVirtualServiceProject/Tests/SOAPvirtualServiceTestCase.tst

    Stack: java.lang.IllegalArgumentException: The test case is not in a project.

    Test Case: /tmp/CASV/SOAPVirtualServiceProject/Tests/SOAPvirtualServiceTestCase.tst

            at com.itko.lisa.model.mar.ModelArchiveInfo.createTestMARInfo(ModelArchiveInfo.java:247)

            at com.itko.lisa.model.mar.TestMariBuilder.build(TestMariBuilder.java:102)

            at com.itko.lisa.invoke.webapp.LaunchLisaTestHelper.runTestNewSchool(LaunchLisaTestHelper.java:488)

            at com.itko.lisa.invoke.webapp.LaunchLisaTestHelper.runTest(LaunchLisaTestHelper.java:436)

           .....

      </result>

    </invokeResult>



  • 8.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-19-2016 05:45 PM

    I think you need the 'Projects' folder and then the actual projects under it...give that a try!



  • 9.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-19-2016 11:02 PM

    I don't think you can execute Invoke Api on Host-1 unless you have a Registry instance running there.

     

    With Registry running on Host-2, & project located at /tmp/SOAPVirtualServiceProject

     

    Can you try calling the following from a browser (assuming the port 1505 on Host-2 is accessible)

     

    http://abcd.com:1505/lisa-invoke/runTest?testCasePath=/tmp/SOAPVirtualServiceProject/Tests/SOAPvirtualServiceTestCase.t…



  • 10.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-20-2016 03:31 AM

    You can. That's where cURL comes into the picture. Without cURL you cannot pass a file remotely to the registry.



  • 11.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-20-2016 03:36 AM

    Wait you are using Lisa Invoke...I have gotten it to work with the REST Invoke 2 API in sending a mar file to the remote registry using cURL.

     

    Check this out - https://support.ca.com/cadocs/0/CA%20DevTest%20Solutions%208%200-ENU/Bookshelf_Files/Invoke/index.html



  • 12.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-23-2016 02:41 PM

    Aniket - Did you try using REST Invoke API based on the link I provided? That works fine with curl for a remote file....



  • 13.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-26-2016 05:38 PM

    Was this resolved? 

     

    I'm seeing the same error with similar steps. My entire project is replicated on remote Lisa/registry server.

     

    Remote server is Linux, paths to files received from sysadmin.[vars] below represent my info and are replaced with actual values, example below. Putting this in browser, getting the same error: An error occured in 'runTest'. Message: The configuration is not part of the same project as the test case. Any help appreciated.

     

    https://[MyRemoteRegisteryServer:Port]/lisa-invoke/runTest?testCasePath=

    /apps/Lisa8.2.0/tests/[PathToMyTst]&stagingDocPath=/apps/Lisa8.2.0/tests/StagingDocs/Run1User1Cycle.stg&configPath=/apps/Lisa8.2.0/tests/[PathToMyConfig]&coordName=Coordinator

     

    Thanks,

    -Jason



  • 14.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-26-2016 06:32 PM

    Please check the following

    configPath=/apps/Lisa8.2.0/tests/[PathToMyConfig]

     

    I think this should be configPath=/apps/Lisa8.2.0/Configs/[PathToMyConfig] (Assuming you have the entire project folder copied under /apps/Lisa8.2.0 folder)

     

     



  • 15.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-31-2016 01:35 PM

    Thanks for the response. I tried changing the config path as you suggest, but same error. Any other thoughts?



  • 16.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-31-2016 05:06 PM

    Jason/Aniket - I just tried and it works from a remote machine. See screenshot below -

     

     

    Postman running on my laptop --> accessing the remote Registry server to  invoke the API and providing the path to the test case. You can see that in the request as well as in the response. I did not provide the config path, staging path or the coordinator name....which could be anything as long as the path is correct. I am able to see this test case run against a VS and can also see the transaction count go up each time I run the test.

     

    This is 9.1.



  • 17.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-31-2016 05:51 PM

    Three differences I see in your working scenario and the one I'm having trouble with:

    1) OS Platform: Windows vs. mine is Linux

    2) DevTest Version: 9.1 vs. mine is 8.2

    3) Paths: .tst/.config/staging not all present under .tst path

     

    If I use Postman and just specify path to .tst, the error changes to: Failed to successfully create the archive. further down it lists filenotfound: /apps/Lisa8.2.0/tests/TIBCO/MWCoreApi/BillingArrangementResource/lisa.project (No such file or directory), which is true, that's not where the config lives and it is a different name.

     

    Below are the paths and error I see:

     

    <?xml version="1.0" encoding="UTF-8"?>

    <invokeResult>

        <method name="RunTest">

            <params>

                <param name="stagingDocPath" value="/apps/Lisa8.2.0/StagingDocs/Run1User1Cycle.stg" />

                <param name="coordName" value="Coordinator" />

                <param name="configPath" value="/apps/Lisa8.2.0/Configs/DIT_Environment.config" />

                <param name="testCasePath" value="/apps/Lisa8.2.0/tests/TIBCO/MWCoreApi/BillingArrangementResource/CoreAPI_Automation_BillingArrangement.tst" />

                <param name="callbackKey" value="7D5CD27E277911E6AAE20050568E772A" />

            </params>

        </method>

        <status>ERROR</status>

        <result>

            <message>An error occured in 'runTest'. Message: The configuration is not part of the same project as the test case.

    Test Case: /apps/Lisa8.2.0/tests/TIBCO/MWCoreApi/BillingArrangementResource/CoreAPI_Automation_BillingArrangement.tst

    Configuration: /apps/Lisa8.2.0/Configs/DIT_Environment.config

    Stack: java.lang.IllegalArgumentException: The configuration is not part of the same project as the test case.

    Test Case: /apps/Lisa8.2.0/tests/TIBCO/MWCoreApi/BillingArrangementResource/CoreAPI_Automation_BillingArrangement.tst

    Configuration: /apps/Lisa8.2.0/Configs/DIT_Environment.config



  • 18.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 05-20-2016 03:35 PM

    I've experienced this same issue and the solution for me was to go into lisa.properties file on the registry server and edit this property:

    lisa.portal.invoke.test.root

    and set it to the base path of where your projects are stored. For example:

    lisa.portal.invoke.test.root=C:/Program Files/CA/DevTest_9_1/Projects

     

    Once that is done, bounce your server components (Registry, Portal, Simulator, Coordinator, etc...) and retry. This resolved the issue for me. 



  • 19.  Re: Lisa Invoke API Error - The test case is not in a project.

    Posted 01-17-2017 03:35 PM

    Jason,

     

    Did Christopher's recommendation help you out with your issue?



  • 20.  Re: Lisa Invoke API Error - The test case is not in a project.
    Best Answer

    Posted 01-17-2017 03:39 PM

    Thanks for the reply. I worked with our server admins to isolate the correct path(s) and then I got the lisa-invoke api working. Thanks again for the follow up.