Service Virtualization

 View Only

RegressionRunner API - testCaseProperties - TEST_SUITE_NAME

  • 1.  RegressionRunner API - testCaseProperties - TEST_SUITE_NAME

    Posted Sep 17, 2014 07:20 AM

    Hi All,

     

    My first post on CA Communities so kindly ignore any naivety in the post.

     

    We have developed a custom report by extending the LISA API's to generate an HTML Report which confirms to our internal standards.

     

    To generate this report we are getting details from RegressionRunner class to access test case related details. The code for this is as below:

     

    RegressionRunner rRunner = null;

    rRunner = (RegressionRunner) getCoordinator().getAllTests().get(numTestCasesRun);

    debug("###RegressionRunner returned::" + rRunner.getName());

    testCaseName = rRunner.getLisaTestName();

    testCasePath = rRunner.getTestCasePath();

     

    HashMap propertiesMap = (HashMap)System.getProperties().get(testCasePath);

    if (propertiesMap == null) { debug("###propertiesMap for testCase is NULL"); return null;}

     

    Properties testCaseProperties = (Properties)propertiesMap.get(testCasePath);

    if (testCaseProperties == null){ debug("###testCase properties for testCase is NULL"); return null;}

     

    This is being called in a function names getLISAProperties (our name) with a key being passed to get the specific detail.

     

    Now issue comes for the code when we try to get the TEST_SUITE_NAME from LISA.

     

    To simplify i'm writing the return line as:

    debug("###TestCase Propertey Key coming from LISA is:: "+ testCaseProperties.getProperty(TEST_SUITE_NAME));

    return testCaseProperties.getProperty(TEST_SUITE_NAME);

     

    Most of the times it works fine and returns the correct value "examples_project" (let's say suite name is examples"). But at times it sends only "examples" instead of "examples_project" which makes the reporting go haywire as it thinks the "examples_project" is already ended and a new test-suite is opened.

     

    On windows/suse it works fine. On linux redhat it makes this issue and occurs quite frequently. Due to the above, we are not able to generate a reliable result for our Test Server which generates report automatically on the build machine.

     

    Any help/pointers to solve it will be appreciated. Thanks in advance.

     

    Regards,

    Maulik