Highlighted
Trusted Contributor.
Trusted Contributor.
673 views

Why in develop mode Evaluate C failed, but in VuGen it works?

Jump to solution

I use version 12.02 (and for some reasons I cant change this version to the new one)

Running from VuGen:

Starting action Init.
t=00002295ms: ** 1: Evaluate C function dummy** started [MsgId: MMSG-205180]
//Here some additional logs, which prodused by dummy() dunction
t=00003074ms: ** 1: Evaluate C function dummy** successfully completed [MsgId: MMSG-205180]
Ending action Init.

Running from TrueClient editor

09:50:48: Init
09:50:48: ** 1: Evaluate C function dummy** started
09:50:48: ** 1: Evaluate C function dummy** failed - -2140798973
09:50:49: Init

What I do wrong?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Why in develop mode Evaluate C failed, but in VuGen it works?

Jump to solution

Hi,

It should be possible to use lr_load_dll from TruClient C-functions. The limitation I am familiar with is with regards to including additional header and c files. You should centralize your logic in the C-functions.c file only.

If you still experience issues, there is another option which might be useful as a general direction.
1. Create a Web (HTTP/HTML) script that will collect the data from MySQL using libmysql
2. Store the data in LoadRunner Virtual Table Server from the Web (HTTP/HTML) script
3. Schedule the TruClient script to run after the Web script finished (using LR/PC scheduler)
4. Initialize user data from VTS - TC has API to get data from VTS

Regards,
Shlomi

View solution in original post

0 Likes
8 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Why in develop mode Evaluate C failed, but in VuGen it works?

Jump to solution

Hi,

Did you run the entire script or just the Evaluate C step only?
Some steps require execution of the full script since they require additional process to be running. That additional process is not created when replaying a single step.

Regards,
Shlomi

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Why in develop mode Evaluate C failed, but in VuGen it works?

Jump to solution

I just press button "Replay" (because no any other buttons there)

 

I need to record additional steps, but for this I need to do some steps before (including running some C-code)

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Why in develop mode Evaluate C failed, but in VuGen it works?

Jump to solution

Hi,

1. Please attach a screenshot that shows which button you press
2. If you can share the script with me to have a look send me a private message and we can follow-up there
3. Open a support ticket. It should be easy to resolve.

Regards,
Shlomi

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Why in develop mode Evaluate C failed, but in VuGen it works?

Jump to solution

I made a "minimal example of problem" and during this activity I find out that i happens then my c-file contain any includes.

1. I press this button, then problem appears.

TruClient.png

 

2. I've attached the minimal project, which shows my problem.

3. Ok, I'll try. But I'm not sure, that their support will help me with outdated VuGen version. (anyway I've already tested it in 12.60 and this problem exists)

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Why in develop mode Evaluate C failed, but in VuGen it works?

Jump to solution

Hi,

Thanks for investing the time in sharing this data.

The script you shared is not running also from VuGen because you are trying to include another file from the C-Functions file - that is not supported. If you put #include "db_grinder.h" in remark the script will run correctly from both VuGen and TruClient.

If you need extra logic please add it as additional functions in C-functions file. Give it a try and let me know how it goes.

Regards,
Shlomi

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Why in develop mode Evaluate C failed, but in VuGen it works?

Jump to solution

The script you shared is not running also from VuGen

I've made missprtint in db_grinder.h - I miss semicolon, with It it works in VuGen. I'm sorry.

If you need extra logic please add it as additional functions in C-functions file.

I need to use libmysql to obtain some testdata (for example login/pasword for mail box). So, anyway I need to include it's header (and load DLL). Is it impossible for TruClient?

 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Why in develop mode Evaluate C failed, but in VuGen it works?

Jump to solution

Hi,

It should be possible to use lr_load_dll from TruClient C-functions. The limitation I am familiar with is with regards to including additional header and c files. You should centralize your logic in the C-functions.c file only.

If you still experience issues, there is another option which might be useful as a general direction.
1. Create a Web (HTTP/HTML) script that will collect the data from MySQL using libmysql
2. Store the data in LoadRunner Virtual Table Server from the Web (HTTP/HTML) script
3. Schedule the TruClient script to run after the Web script finished (using LR/PC scheduler)
4. Initialize user data from VTS - TC has API to get data from VTS

Regards,
Shlomi

View solution in original post

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Why in develop mode Evaluate C failed, but in VuGen it works?

Jump to solution

Ok. I'll try to do somthing of that.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.