简体   繁体   中英

write to file from Loadrunner controller

I'm using Loadrunner controller 11.51, I have an issue when trying to open file to write the output results using "fopen" function, the file is unable to open. please note that the code is work when I'm running it on a VUGen(11.51). it seems that its a permission issue in the "LoadGenerators" used in LoadController. if any of you had faced such problem please advise.

the snippet of code I'm using:

    if ((file_stream = fopen(filename, access_mode)) == NULL)  
    {
        lr_error_message ("Cannot open or create %s", filename);   
        return -1;  
    }
    else
    {    
        fprintf(file_stream, "%s", "MyInfo" );
        fclose(file_stream);
    }

the returned value from fopen(filename, access_mode) function when I'm running the script from using Loadrunner controller is always null.

我已经尝试解决此问题的解决方案,并且通过将Controller机器作为生成器来解决,因为默认情况下,控制器对其机器具有完全权限。

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