Forum Discussion

Cavaler's avatar
Cavaler
New Contributor
8 years ago

AQtime automation: how to change profiler settings?

Hello everyone,

 

I am trying to use AQtime 8.0 COM interface to run Coverage analysis on a simple test app (for a start).

That's what I am doing on Python:

aqtime = Dispatch("AQtime.AQtime")
intmgr = aqtime.IntegrationManager

intmgr.NewProjectFromModule(sys.argv[1])
intmgr.SelectProfiler("Coverage Profiler")
intmgr.SelectRunMode("Normal")
intmgr.Start("C:\\test.xml", "")

Profiling runs, and results are generated.

But profiling is done by routines only, not by lines. It is changed in GUI easily, but I cannot find a way to change profiler settings automatically.

 

I assume it could be done using some Managers provided by IaqBaseManager - but there is no documentation on that interface and its derivatives.

 

Can anyone help me out?


  • Cavaler wrote:

     

    But profiling is done by routines only, not by lines. It is changed in GUI easily, but I cannot find a way to change profiler settings automatically.


    Hi Cavaler,

     

    To profile by lines, use:

    intmgr.AreaManager.FullCheck = True
    intmgr.AreaManager.FullCheckLevel = 2   # eplLines

    See Managing Profiling Areas via COM for more info and examples.

     

    Alternatively, you can create a pre-configured project and use that project instead.

  • Cavaler's avatar
    Cavaler
    New Contributor

    Also, I would greatly appreciate a way to read generated results programmatically.

    Theoretically I can parse generated xml - but there must be an easier way

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Cavaler wrote:

     

    But profiling is done by routines only, not by lines. It is changed in GUI easily, but I cannot find a way to change profiler settings automatically.


    Hi Cavaler,

     

    To profile by lines, use:

    intmgr.AreaManager.FullCheck = True
    intmgr.AreaManager.FullCheckLevel = 2   # eplLines

    See Managing Profiling Areas via COM for more info and examples.

     

    Alternatively, you can create a pre-configured project and use that project instead.