Forum Discussion
Lee_M
Community Hero
The case above is calling the test name from an array, whichever function outputs this name, it will always be correct.
I mean call the test name from a function that is not a direct descent of the parent
EP - Execution Plan
AGubarev
4 years agoSmartBear Alumni (Retired)
function main()
{
let scenarios = ["order_book_test", "order_glass_test"]
for (var i=0; i<scenarios.length; i++)
{
aqTestCase.Begin(scenarios[i]);
Login();
Make_Order();
Logout();
aqTestCase.End();
}
}
function Login()
{
function navigate()
{
Log.Error("Unable to navigate")
}
navigate();
Log.Message("Pass auth");
}
function Make_Order(goods)
{
Log.Message("Make order")
}
function Logout()
{
Log.Message("Logout")
}
function EventControl1_OnLogError(Sender, LogParams)
{
Log.Warning("An error has been fired in scenario "+aqTestCase.CurrentTestCase.Name)
}
Related Content
- 12 months ago
- 10 months ago
- 12 years ago
- 15 years ago