Forum Discussion
>but is only available with test plans and not single runs
try to use aqTestCase object, maybe it helps
>Does SmartBear recommend any reporting apps
TestComplete has special support of Jenkins, AzureDevOps, Zephyr - these tools are for orchestration, but have their reporting as well.
This tools have their pros and cons. And maybe you need to choose one of it mostly not as reporting tool, but if you have plans to get additional value to your QA processes.
If we talk only about reporting systems, internally, we test how TestComplete works with Allure. And it works 🙂
>when you export the html files, do you know if there is a way to add the test title to the report (with editing it manually)
it depends how do you export the log. If you do it automatically, yes, you can set the name of the file:
TestComplete.exe "C:\My Projects\MySuite.pjs" /run /p:MyProj /exportLog:"C:\TestLogs\Log.html"
>Is there a way we can output the text name automatically - that I can add to, say, the event 'onStopTest'
not sure how you split the code by tests and what do you run, but maybe this helps for you:
function EventControl1_OnLogError(Sender, LogParams)
{
var strFoo = aqConvert.VarToStr(arguments.callee.caller);
Log.Message(strFoo.split(" ")[1].split("(")[0])
}
arguments.callee.caller
I will further investigate this approach, but last time I ran it, it got one of the subfunctions names (eg Close dialogue, which is called multiple times and is not the parent script run)
- AGubarev4 years agoSmartBear Alumni (Retired)
aqTestCase.Begin("Name 1"); Log.Message(aqTestCase.CurrentTestCase.Name) aqTestCase.End();
- Lee_M4 years agoCommunity Hero
Thanks,
This has a limitation, this would only work if your case was in a test case using the EP and will not work for simple tests (or testing when building the tests)
If you call the name of a case then I have found it needs to be hardcoded, you can't ready the initiator of the current test
e.g.
- order_book_test
(test sections)
1, login
1.1, navigate - (say which function test is going to this page, ref will get login and not order_book_test)
2, order book "testing"
3, logout
- AGubarev4 years agoSmartBear Alumni (Retired)
>this would only work if your case was in a test case using the EP
what does "EP" mean?
>you can't ready the initiator of the current test
Sorry, didn't catch the idea.
So, you have an example:
The test case name : order_book_test Steps: 1. Login 1.1. Navigate 1.2. Pass auth 2. Make order 3. Logout
Do you want something like this?
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(scenarios[i].split("_")[1]); Logout(); aqTestCase.End(); } } function Login() { Log.AppendFolder(arguments.callee.name); Log.Message("Navigate"); Log.Message("Pass auth"); Log.PopLogFolder(); } function Make_Order(goods) { Log.AppendFolder(arguments.callee.name + ": " + goods); Log.Message("Make order") Log.PopLogFolder(); } function Logout() { Log.AppendFolder(arguments.callee.name); Log.Message("Logout") Log.PopLogFolder(); }
Related Content
- 12 months ago
- 10 months ago
- 12 years ago
- 15 years ago