winIDEA SDK
test_coverage_get_status.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_getStatus():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 covCtrl = ic.CCoverageController2(connMgr, 'example.trd', "u")
16 covCtrl.waitUntilLoaded(5000, isThrow=True)
17
18 status = covCtrl.getStatus()
19 print(f"Get current analyzer state:")
20 print(f"\tReturn code: {status.getReturnCode()}")
21 print(f"\tIs analyzer active: {status.isActive()}")
22 print(f"\tIs analyzer busy: {status.isBusy()}")
23 print(f"\tIs document empty: {status.isDocumentEmpty()}")
24 print(f"\t... explore other methods.")
25 print(f"Additionally, dump status with '.toString()' method:\n{status.toString()}")
26 covCtrl.close()
27
28
29if __name__ == "__main__":
30 test_getStatus()