Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
HGrube Absent Member.
Absent Member.
1985 views

Testscript: Single "UserCheck" step causes 2 steps in the result set

Jump to solution

Hello,

when I use a UserCheck in my TestPartner testscript like

UserCheck "TS_2", True, "inIndex1: " + CStr(inIndex1)

in the result set I can find the related step (for example):

Steps        Result         Result Detail
User Check   Passed         inIndex1: 1

but additional I get another second step:

Steps        Result         Result Detail
User         Check

Why is it designed like this?

In my opinion the second result step is totally obsolete and the TestPartner design should be changed for future versions in this point...

What do you mean?

Regards

Holger

0 Likes
1 Solution

Accepted Solutions
Micro Focus Contributor
Micro Focus Contributor

RE: Testscript: Single "UserCheck" step causes 2 steps in the result set

Jump to solution

The code is not only recording the result of the command, i.e. that the command executed successfully (that is the ExecuteCheck or the UserCheck) but also the result of the check itself (pass/fail).  So there are 2 things being recorded in the result here.

Consider the scenario where the check could not be executed because (say) the check was deleted or it could not find an attach name.  In this case the command (ExecuteCheck) fails and there is no pass or fail.  As for the UserCheck, the code was specifically designed to emulate the ExecuteCheck functionality so that "checks" are shown in the result in a consistent manner.

//*eggbox
0 Likes
4 Replies
Micro Focus Contributor
Micro Focus Contributor

RE: Testscript: Single "UserCheck" step causes 2 steps in the result set

Jump to solution

There are some technical reasons why there are 2 entries,

Consider the following script

UserCheck "blah", True, "something"
ExecuteCheck "mycheck"

Note that the commands in the script are UserCheck and ExecuteCheck, note that the check is a Property Check.

The way the result is generated for checks is that the check is executed and the entry (pass/fail) is written to the result.  Then the default handling for a command is processed which generates the second entry.

So you get

Line Steps Result Result Detail Command Details
1 User Check Passed something blah, -1, something
2 UserCheck blah, -1, something
3 Property Check Passed Check executed successfully mycheck
4 ExecuteCheck mycheck

 

 

 

 

Lines 1 and 3 is the generation of the pass/fail (as described above), note that the text is the actual type of check that is executed not the command that created it.

Lines 2 and 4 is the recording of the commands that were executed.

 

//*eggbox
0 Likes
HGrube Absent Member.
Absent Member.

RE: Testscript: Single "UserCheck" step causes 2 steps in the result set

Jump to solution

OK, if this is the default way for executing commands then I would expect first the recording of the command and then the result of the command (sounds more logical for me).

Anyhow - the second line looks very redundant and gives no further information to the user (especially in this order).

Regards

Holger

0 Likes
Micro Focus Contributor
Micro Focus Contributor

RE: Testscript: Single "UserCheck" step causes 2 steps in the result set

Jump to solution

The code is not only recording the result of the command, i.e. that the command executed successfully (that is the ExecuteCheck or the UserCheck) but also the result of the check itself (pass/fail).  So there are 2 things being recorded in the result here.

Consider the scenario where the check could not be executed because (say) the check was deleted or it could not find an attach name.  In this case the command (ExecuteCheck) fails and there is no pass or fail.  As for the UserCheck, the code was specifically designed to emulate the ExecuteCheck functionality so that "checks" are shown in the result in a consistent manner.

//*eggbox
0 Likes
HGrube Absent Member.
Absent Member.

RE: Testscript: Single "UserCheck" step causes 2 steps in the result set

Jump to solution

OK, I see. And thanks for the detailed answer.

Regards

Holger

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.