1

Can we assign param value to a string variable? For example: web_reg_save_param_ex("paramname=p","LB={something}", "RB={something}", LAST);

How can we store p value in a string variable.

6
  • Are you looking to store a Loadrunner variable value in a C string? Commented Sep 21, 2016 at 19:20
  • Yes #James Can we do that? Commented Sep 22, 2016 at 1:56
  • Yes, there are a number of ways to move from a LoadRunner variable to a C string...... How familiar are you with the language of the tool, C? Commented Sep 23, 2016 at 2:42
  • Ok.. Coming to C language I can say I am an intermediate programmer Commented Sep 23, 2016 at 3:48
  • #James can you please tell me how to move a parameter from a LoadRunner to a string variable. Commented Sep 23, 2016 at 9:29

2 Answers 2

1

You can use utility function(lr_save_string() and lr_eval_string()).

web_reg_save_param_ex("paramname=p","LB={something}", "RB={something}", LAST);

lr_save_string(lr_eval_string("{p}"),"localVariable");

Sign up to request clarification or add additional context in comments.

1 Comment

Isn't this more or less a loop action? lr_save_string creates a parameter just like the one web_reg_save_param_ex does? I.e. not a C string like the one the original post requested.
0
  • strcpy()
  • strncpy()
  • sprintf() ...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.