简体   繁体   中英

Getting “picked up Java tool options” error while running a test script in HPALM integrated with CA LISA

I am trying to integrate HP-ALM with CA-LISA (a service virtualization tool). On trying to run the below test script

function Test_Main(Debug, CurrentTestSet, CurrentTest, CurrentRun)
{
    try
    {
        TDOutput.Clear();
        lisa = new ActiveXObject("MercuryLisaBridge.MercuryTestRunner");
        lisa.Init(TDConnection, TDOutput);
        lisa.Reload(ThisTest);

        if (Debug) lisa.Debug(ThisTest);
        if (!Debug) lisa.Run(CurrentTest, CurrentRun);
    }
    catch(e)
    {
        TDOutput.Print("Run-time error [" + (e.number & 0xFFFF) + "] : " + e.description);
    }
}

I am getting this error

Run-time error [5376] : Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xbootclasspath/a:"C:\Program Files (x86)\HP\Unified Functional Testing\bin\java_shared\classes\jasmine.jar"
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook

错误屏幕截图

_JAVA_OPTIONS and JAVA_TOOL_OPTIONS are environment variables which allows you to provide default values for Java options which will be picked up by every JVM (see details on http://progexc.blogspot.com.cy/2013/12/what-i-discovered-while-trying-to-pass.html and Difference between _JAVA_OPTIONS JAVA_TOOL_OPTIONS and JAVA_OPTS for details).

This variables are set by UFT installer (and probably by some other HP ALM related stuff).

I'm not sure why it causes your script to fail (maybe because they are written in standard error stream - I don't remember), but if you want to elimimate them you need to clear those two environment variables on the machine where script is running. I would clear them for a particular process, but leave them untouched globally, because it may affect UFT stuff.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM