Quantcast
Channel: All LoadRunner Practitioners Forum posts
Viewing all 12134 articles
Browse latest View live

TC: programmatically deterimining "Develop Script" mode?

$
0
0

Is there any type of IF(blah)... statement that I can use to determine if my TC script is executing in the Develop Script mode (as opposed to running under vuGen or the Controller)?

-Thanks, Terry


Re: TC: programmatically deterimining "Develop Script" mode?

$
0
0

Ht,

1) if we are "Develop script mode", we can't see any reply/run button in Vugen

        So, we can not run the script in Vugen 

2) in we are in controller,it doesnot depend on vugen or Develop mode

actually we are adding the script which we have to run the script in cotroller,it will upload the files to the controller

based on those files test will execute in controller (same for all protocols)

if we did any modification in the script in Develop script mode , if doesnot effect the script in controller mode,

if we want apply the changes in controller mode ,we need to refresh the script

Thanks, Ravi

 

Re: TC: programmatically deterimining "Develop Script" mode?

$
0
0

I am not making my desires clear: I want to execute some code when I am only executing the script in the Develop Script mode, as in:

If (running under Develop Script Mode) {
    run some statements...
}

- Thanks, Terry

 

Re: TruClient Ajax IE - Evaluate Javascript for GWT component

$
0
0

Hi Rosenthal,

Is there any way to record GWT component using ajax truclient protocol.

what is TC IE...how to implement in this feature with ajax truclient script

 

Re: TruClient Ajax IE - Evaluate Javascript for GWT component

$
0
0

Hi rana_ravi,

You are responding to a post over 2 years old. Perhaps a new post would be a better starting point.

'TC IE' was the separate protocol used to run only on IE browser in old versions.

In recent versions, all browser are unified under the 'TruClient Web' protocol.

GWT web applications are generally recordable with TruClient.

If you have issues with a specific application's code, I suggest raising the exact issue with as much details as possible, so advisors in the forum may try to assist.

 

Edo

Re: Loadrunner suitability for MAP application ?

$
0
0

Hi KAPIL,

Loadrunner offers multiple protocols. The choice depends on what you'd like to test:

  • If you're interested in loading the server with calls, the Web-HTTP/HTML protocol can be used.
  • If youd like to emulate a real use manipulating the map UI, TruClient protocol would be a better choice.

Each has it's pros and cons.

 

Hope this helps,

Edo

Re: Floating point number multiplication in LoadRunner

$
0
0

>Action()

 

You need to program to C99 Standards, the return type must be declared as int.

 

> i=atof(lr_eval_string("{UnitPrice}"));

> sprintf(result,"%2f",decimals);

>sprintf(finalOutput,"Value=%2f",result);


Where do you include <stdio.h> and <stdlib.h>?  result and finalOutput aren't char arrays.

 

:

>If you want to use a function that does not return an Int, it needs to be declared first.

 

That's not correct.  If you want to use ANY function you must declare it first.  ;-)

You also shouldn't be making up declarations but should be including the standard C headers:

<stdio.h> & <stdlib.h>

Re: TC: conditionally executing window.alert()

$
0
0

Hi Terry,

Using 'window.alert' is not a good practice, as it blocks the run of the script and may not work.

I'd strongly suggest using TC.log instead.

It will write the values you're interested in to the log, where you can review them after the replay for both interactive and load mode.

 

Edo


Re: using parameters in strings in TC 12.53

$
0
0

Hi Terry,

I'll address each of the issue you raised in this last post:

  1. TC.log writes to TruClient log, which is available even after the browser is closed, to allow offline analysis.
    In Firefox, you can view the log during replay - in General SettingsInteractive OptionsFirefox Settings> enable Display log messages.
    The log can also be viewed in VuGen ('Firefox - Interactive' for the interactive replay).
    To write directly to the Firefox console, use 'window.console.log'.
  2. That does seem to be an issue with TruClient. I will make sure it is reported and handled in a future release.
  3. That is a good workaround for issue #2.

Edo

Using an SSL Cert to connect to amazon EC2

$
0
0

Hi All,

We need to complete testing from the cloud so are going with Amazon EC2. I understand that I need a CA Cert to secure the communications.

Can someone confirm whether the Certs that the gen_ca_cert.exe creates can be used here or do I need to generate a security cert from an existing CA Cert?

My client does have a security cert that can be used, but they want me to provide an SSL Certificate Request (sometimes a .csr file?). But I can't find where to generate this.

Thanks in advance (Hopefully I get a response before these forums go read only tomorrow :))

 

Thanks, Brian.

Load Generator fail while execution in Performance Center.

$
0
0

Hi Everyone,

I encountered following problems while doing executions in HP Performance center.

Controller failed during the execution of SAP GUI scripts.

Load generators failed, reason CPU utilization for this host is above 80%.

No sooner than I started the execution, LGs started to fail .

Note:

* I restarted LGs before execution

* Cleared Temp

*Cleared MDRV logs.

*Ran scripts as thread.

Please tell me the probable reason of these problems and what should be done to avoid such problems.

 

Thanks and Regards

Bhanu Bisen

Pop up Dilalog box is not getting invoked

$
0
0

Hi Friends

 

I have an issue where am able to record creation of an event without any issue. while creating the event we invoke pop up dialog boxes where we enter details and then the event gets over. All the event is captured and recording is done

 

But while replaying the script the pop up is not getting invoked and am getting the following error

Action.c(191): Error: ctrx_sync_on_window("RIB iTWO (EN)") failed. Server IP address = 192.168.21.180:1494. The window does not exist.
The window currently in focus: "RIB iTWO 2015"

 

Refer the script as below

 

Action()
{

    web_url("Nmrcl-CtxWeb", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Resource=0", 
        "RecContentType=text/html", 
        "Referer=", 
        "Snapshot=t1.inf", 
        "Mode=HTML", 
        EXTRARES, 
        "Url=receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=custom/style.css", ENDITEM, 
        "Url=receiver/images/1x/folder_template_C13BB96DEBC9F30F.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=receiver/images/1x/CitrixReceiver_WebScreen_CBE548FB8FEE049E.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=receiver/images/common/ReceiverFullScreenBackground_46E559C0E6B5A27B.jpg", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=receiver/js/external/hammer.v2.0.2.min_5507D46265FF2372.js", ENDITEM, 
        "Url=receiver/js/external/velocity.min_51C6C258BB124409.js", ENDITEM, 
        "Url=receiver/js/external/slick.min_FEB62CC230E2BA2A.js", ENDITEM, 
        "Url=receiver/images/1x/actionSprite_531B7A6FF85CA98E.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=receiver/js/ctxs.core.min_1D6DC421BAD069AE.js", ENDITEM, 
        "Url=receiver/js/ctxs.webui.min_DE392E359134A54E.js", ENDITEM, 
        "Url=receiver/js/external/jquery.dotdotdot.min_E12BB49CEDE48AB1.js", ENDITEM, 
        "Url=custom/script.js", ENDITEM, 
        "Url=custom/strings.en.js", ENDITEM, 
        "Url=receiver/images/1x/viewSprite_B2F322BDCB824FAF.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=receiver/images/common/authspinner_B0BCD339560CA593.gif", ENDITEM, 
        "Url=Resources/Icon/L0NpdHJpeC9ObXJjbC1DdHgvcmVzb3VyY2VzL3YyL2NuaERaM0IzUjFodVIxWXZiMDFOT1ZwYVVFb3hTbVZrWjFOM1BRLS0vaW1hZ2U-?size=128", ENDITEM, 
        "Url=Resources/Icon/L0NpdHJpeC9ObXJjbC1DdHgvcmVzb3VyY2VzL3YyL1dFY3dPREZXZURaSGF6bFZXVWxhUzFkUlRtdGtRMFJIYkVodlBRLS0vaW1hZ2U-?size=128", ENDITEM, 
        LAST);

    web_add_auto_header("X-Citrix-IsUsingHTTPS", 
        "No");

    web_add_auto_header("X-Requested-With", 
        "XMLHttpRequest");

/*Correlation comment - Do not change!  Original value='E45C4EE79DC593EE798A4C6A87B8CA11' Name ='CsrfToken' Type ='ResponseBased'*/
    web_reg_save_param_regexp(
        "ParamName=CsrfToken",
        "RegExp=CsrfToken=(.*?);",
        SEARCH_FILTERS,
        "Scope=Cookies",
        "IgnoreRedirections=No",
        LAST);

    web_custom_request("Configuration", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Home/Configuration", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/xml", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t2.inf", 
        "Mode=HTML", 
        "EncType=", 
        LAST);

    web_add_auto_header("Csrf-Token",
        "{CsrfToken}");

    web_custom_request("GetDetectionTicket", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/ClientAssistant/GetDetectionTicket", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t3.inf", 
        "Mode=HTML", 
        "EncType=", 
        LAST);

    web_submit_data("GetDetectionStatus", 
        "Action=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/ClientAssistant/GetDetectionStatus", 
        "Method=POST", 
        "RecContentType=application/json", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t4.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=ticket", "Value=CDT_MGi6hckSsm_DTEBaeKA8Wwln8ZJrA0XKEcbgnirfbmjylTQoiMZo34V8A6x80odx", ENDITEM, 
        LAST);

    web_add_cookie("CtxsUserPreferredClient=Native; DOMAIN=192.168.21.176");

    web_add_cookie("CtxsClientDetectionDone=true; DOMAIN=192.168.21.176");

    web_add_cookie("CtxsHasUpgradeBeenShown=true; DOMAIN=192.168.21.176");

    web_submit_data("List", 
        "Action=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Resources/List", 
        "Method=POST", 
        "RecContentType=text/plain", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t5.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=format", "Value=json", ENDITEM, 
        "Name=resourceDetails", "Value=Default", ENDITEM, 
        LAST);

    web_custom_request("GetAuthMethods", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Authentication/GetAuthMethods", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/xml", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t6.inf", 
        "Mode=HTML", 
        "EncType=", 
        LAST);

    web_custom_request("Login", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/ExplicitAuth/Login", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/vnd.citrix.authenticateresponse-1+xml", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t7.inf", 
        "Mode=HTML", 
        "EncType=", 
        EXTRARES, 
        "Url=../receiver/images/1x/CitrixStoreFront_auth_14B96BFF2B0A6FF8.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        LAST);

    lr_save_string(lr_decrypt("59105c0848e3d509ba38d288"), "PasswordParameter");

    lr_think_time(5);

    web_submit_data("LoginAttempt", 
        "Action=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/ExplicitAuth/LoginAttempt", 
        "Method=POST", 
        "RecContentType=application/xml", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t8.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=username", "Value=Ribuser", ENDITEM, 
        "Name=password", "Value={PasswordParameter}", ENDITEM, 
        "Name=saveCredentials", "Value=false", ENDITEM, 
        "Name=loginBtn", "Value=Log On", ENDITEM, 
        "Name=StateContext", "Value=", ENDITEM, 
        LAST);

    web_add_cookie("CtxsPasswordChangeAllowed=true; DOMAIN=192.168.21.176");

    web_submit_data("List_2", 
        "Action=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Resources/List", 
        "Method=POST", 
        "RecContentType=application/json", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t9.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=format", "Value=json", ENDITEM, 
        "Name=resourceDetails", "Value=Default", ENDITEM, 
        EXTRARES, 
        "Url=../receiver/images/1x/CitrixReceiverLogo_Home_5C24BCEC5A182425.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=../receiver/images/1x/ico_search_E84E3D63D821F80D.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=../receiver/images/1x/search_close_BC5A22358E58905F.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=../receiver/images/1x/img_favorites_empty_7FBE69CFC0FDDB2D.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        LAST);

    web_custom_request("GetUserName", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Authentication/GetUserName", 
        "Method=POST", 
        "Resource=0", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t10.inf", 
        "Mode=HTML", 
        "EncType=", 
        EXTRARES, 
        "Url=../receiver/images/1x/spinner_white_auth_button_53FD5A337A529DA7.gif", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=../receiver/images/1x/spinner_5CF0D1C8A76AAC8E.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        LAST);

    web_submit_data("Q29udHJvbGxlci5OTVJDTC1UZXN0", 
        "Action=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Resources/GetLaunchStatus/Q29udHJvbGxlci5OTVJDTC1UZXN0", 
        "Method=POST", 
        "RecContentType=application/json", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t11.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=createFileFetchTicket", "Value=false", ENDITEM, 
        LAST);

    ctrx_nfuse_connect("http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Resources/LaunchIca/Q29udHJvbGxlci5OTVJDTC1UZXN0.ica?CsrfToken={CsrfToken}&IsUsingHttps=No&launchId=1494244273173", CTRX_LAST);

    ctrx_wait_for_event("LOGON", CTRX_LAST);

    ctrx_sync_on_window("RIB iTWO (EN)", ACTIVATE, 0, 0, 801, 601, "snapshot1", CTRX_LAST);

    ctrx_mouse_click(597, 139, LEFT_BUTTON, 0, "RIB iTWO (EN)=snapshot2", CTRX_LAST);

    lr_think_time(7);

    ctrx_mouse_click(606, 135, LEFT_BUTTON, 0, "RIB iTWO (EN)=snapshot3", CTRX_LAST);

    ctrx_sync_on_window("Create New Project", ACTIVATE, 44, 7, 713, 588, "snapshot4", CTRX_LAST);

    ctrx_type("33312", "", CTRX_LAST);

    ctrx_mouse_click(196, 119, LEFT_BUTTON, 0, "Create New Project=snapshot5", CTRX_LAST);

    ctrx_type("pewest", "", CTRX_LAST);

    lr_think_time(5);

    ctrx_mouse_click(476, 555, LEFT_BUTTON, 0, "Create New Project=snapshot6", CTRX_LAST);

    ctrx_mouse_click(476, 555, LEFT_BUTTON, 0, "Create new Project - Data transfer=snapshot7", CTRX_LAST);

    ctrx_mouse_click(476, 555, LEFT_BUTTON, 0, "Create new Project - Settings=snapshot8", CTRX_LAST);

    lr_think_time(21);

    ctrx_sync_on_window("\\Projects\\LoadRunner Test Prj\\3332 V1 (Tender) - RIB iTWO 2015", ACTIVATE, -8, -8, 1377, 785, "snapshot9", CTRX_LAST);

    ctrx_mouse_click(1346, 17, LEFT_BUTTON, 0, "\\Projects\\LoadRunner Test Prj\\3332 V1 (Tender) - RIB iTWO 2015=snapshot10", CTRX_LAST);

    ctrx_logoff(CTRX_NORMAL_LOGOFF, CTRX_LAST);

    web_add_cookie("CtxsDesktopAutoLaunchDone=no; DOMAIN=192.168.21.176");

    web_custom_request("Disconnect", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Sessions/Disconnect", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t12.inf", 
        "Mode=HTML", 
        "EncType=", 
        LAST);

    web_custom_request("Logoff", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Authentication/Logoff", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=text/plain", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t13.inf", 
        "Mode=HTML", 
        "EncType=", 
        LAST);

    return 0;
}

working with parameters and xpath

$
0
0

Hi all,

I'd like to create an array and the reuse it in an xpath expression and taking the occurence corresponding to the virtual user number, how should I do ?

 

for example

array[1] = "....   "

array[2] =" .... "

......

 

the and xpath:

/html/body/td/div[text()=" <  array [i]  > "]

where i correspond to the virtual user number

 

 

 

Unable to record a Java applet

$
0
0

Hi,

We are using LR 12.53 version and trying to record a java applet which is using GWT with Ajax Truclient protocol.

LR is not recognising applet part and not generating any steps for applet.

Cany anyone guide me on this

 

 

Viewing all 12134 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>