Testsuite 'play all in folder' !StatusOK variable incorrectly false

Hello there, I’m experiencing a problem with UI.vision macro runstatus !StatusOK when running multiple macro’s together as part of a testsuite. In a specific situation this status seems to be wrongfully set to false for all macro’s except the first one that is part of the suite.
For example the suite contains 2 macros. Both do not get any error(no verify ignored error or any other, nothing in log), the first macro gets !StatusOK true but everything after that gets an incorrect !StatusOK false.

To be more specific the !StatusOK is incorrect when:

  • Running multiple macro’s in suite through ‘Play all in folder’
  • Underlying macro’s in testsuite call a different module to do a xclick/xtype
  • Underlying macro’s in testsuite call a different module to do a check on the !StatusOK

A bit of background:

I have a lage project with hundreds of macro’s. A lot of them contain 100+ commands. When I run complete suites sometimes I miss the verifyerrors since those are ignored and only visible in the log. When running 10 macro’s in a suite the logging easily gets bigger then the default max amount in UI.Vision and is therefore lost. The end summary in the log of when you run multiple tests also ignores the verify errors. So there is no way of knowing if those errors occured.
I also do not want to save the log for each macro and have to open dozens of .txt files to see if there were any ignored errors.
To circumvent this what I do is: at the end of each macro I Savetoscv if the testcase was succesfull or failed based on the !StatusOK variable. This creates a neat little overview of teststatus for all the macro’s.

The test suite with which this issue can be recreated:

  • ‘Test Suite 1’ contains macro’s ‘Test1’ & ‘Test2’ which are identical and give no error when run alone.
  • Both macro’s go to a website and then run 2 other macro’s(Module 1 & Results) which are outside of the testsuite:
  • macro ‘Module 1’ uses xclick and xtype to type a text
  • macro ‘Results’ checks the variabel !StatusOK and based on the value it echoes if the testcase was succesfull or failed.

I wanted to attach the project backup to this post but as a new user this is not possible.
So I’ll give the json’s of the testmacro in the suite and the 2 macro’s which are called from there:

{
  "Name": "Test1",
  "CreationDate": "2025-1-8",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://www.google.nl/",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "run",
      "Target": "/Module1",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "run",
      "Target": "/RESULTS",
      "Value": "",
      "Description": ""
    }
  ]
}
{
  "Name": "Module1",
  "CreationDate": "2025-1-8",
  "Commands": [
    {
      "Command": "XClick",
      "Target": "xpath=//textarea",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XType",
      "Target": "Lorem ipsum",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "type // xpath=//textarea",
      "Value": "Lorem ipsum",
      "Description": ""
    }
  ]
}
{
  "Name": "RESULTS",
  "CreationDate": "2025-1-8",
  "Commands": [
    {
      "Command": "if",
      "Target": "${!STATUSOK}==true",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "${!MACRONAME} succes",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "else",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "${!MACRONAME} failed",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    }
  ]
}

Thanks for the test case.

Just to clarify:

  • So the issue is that there should be no error, but !statusOK is nevertheless FALSE?

  • And is this related to XClick? Or if you remove the XClick command, the issue still happens?

Yes to both questions. The issue is that there should be no error but nevertheless !StatusOK is changed to FALSE.
And it does indeed seem to be related to the xclick/xtype. When I removed those and added a type the problem did not occur and the !StatusOK was TRUE.

I tested with 9.5.0 and can not recreate the error. When I run “test1” (as testsuite: play all in folder) I get this result:

Overall status: OK
Macro run: 1
Success: 1
Failure: 0

Thanks for all the effort in helping me and trying to reproduce the error. Its kinda hard to explain this specific case. Now that my forum user is able to attach files I can add some screenshots.

In your example it is correct but it will fail if there are more then 1 testcases in the suite. Inside the suite there is test1 and test2 which are identical and when run the test suite report will say 2 success but the echo based on the !StatusOK will say 1 test OK and 1 test Failed:

image

I’ve also attached the testproject:
uivision_backup test.zip (3.2 KB)