Call a test suite from a Macro

Hi,
A very basic question probably: How can I run a test suite from my Macro? I want to run all Macros in a under a test suite by calling the test suite from another macro.

You can run test suite (= all macros in a certain folder) via the command line API.

You can not run a test suite from within another macro directly. But you can use RUN to run another macro.

=> So I recommend to use the command line API to build your test automation sequence.

Hi, Is there a design/best practise reason for this? It would have seen obvious to build the runs via calling suites. Or will this feature be implemented soon? :slight_smile:

The command line API is the best option, as it allows you to even react to issues with IF/Then logic etc.

Also, you can run test suites from the command line.

Thanks for the tips! We tried to run the macros with XRun commands (2 separate lines currently) so that we could run several macros in several folders by using only 1 macro.

For some reason, this was not successful. Sometimes the error message is:
[error] No tab with id: 82.
[error] Error #180: No connection to browser tab

Sometimes it’s only the Error #180: No connection to browser tab. I haven’t found a logic that applies to it.

The macro as a JSON:

{
“Name”: “PageTestsXRun”,
“CreationDate”: “2021-11-4”,
“Commands”: [
{
“Command”: “comment”,
“Target”: “XRun // “C:\Program Files (x86)[\Google\Chrome\Application\chrome_proxy.exe](file://Google/Chrome/Application/chrome_proxy.exe/)” “,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XRun”,
“Target”: ““C:\Program Files (x86)[\Google\Chrome\Application\chrome_proxy.exe](file://Google/Chrome/Application/chrome_proxy.exe/)””,
“Value”: “”[file:///folder/uivision/ui.vision.html?direct=1&closeRPA=0&folder=C:\folder\uivision\macros\Apps\CT HoU\Delivery Portfolio\Page tests\Actuals and KPI Trends](file:///folder/uivision/ui.vision.html?direct=1&closeRPA=0&folder=C:\folder\uivision\macros\Apps\CT%20HoU\Delivery%20Portfolio\Page%20tests\Actuals%20and%20KPI%20Trends)””,
“Description”: “”
},
{
“Command”: “XRun”,
“Target”: ““C:\Program Files (x86)[\Google\Chrome\Application\chrome_proxy.exe](file://Google/Chrome/Application/chrome_proxy.exe/)””,
“Value”: “”[file:///folder/uivision/ui.vision.html?direct=1&closeRPA=0&folder=C:\folder\uivision\macros\Apps\CT HoU\Delivery Portfolio\Page tests\DSO](file:///folder/uivision/ui.vision.html?direct=1&closeRPA=0&folder=C:\folder\uivision\macros\Apps\CT%20HoU\Delivery%20Portfolio\Page%20tests\DSO)"",

“Description”: “”
}
]
}

Sometimes the macro runs successfully, but only 1 of the lines (Xrun commands) are actually run so it seems not to run the other one.

Are we using the XRun commands incorrectly? And is there a reason why I cannot use a simple Command: Run and then give a macro folder (test suite) as a Target so it would run all of the macros in a folder? And preferably I could also use an attribute for running a folder (test suite) - also including subfolders. Could you please take that as a feedback for developing the UI.vision in the future if there’s no reason why that cannot be done :slight_smile:

Thanks in advance!

Can you please post a screen video of the issue? This will help clarify it.

And/or: If possible, please send a login to a test server so that we see and debug the issue further. This is usually a great way to trouble shoot issues quickly.