[SOLVED] About qml and qtuitestrunner

  • Hi,
    I have a simple qml application and a .qtt script to run the application using qtuitestrunner.

    path_to_qtuitestrunner path_to_testfile.qtt -V -o output file

    //this -V option actually displays time elapsed for each action/button clicked in the application which I am interested.
    -o : actually only logs the overall time elapsed for execution the whole testcase. It does not log the time elapsed for each action.
    -V : putting this option --- in terminal/command line shows time elapsed for each action (i.e. time taken for text entry/findByProperty/buttonClick etc).

    Would be great if someone please give me some hints how to get the time elapsed for each action that is shown on terminal to be logged in output log file.


  • Moderators

    Which platform are you on?

    In a unix environment you could use stdout as "logfile" (it has a entry in /dev called /dev/fd/0 ) and redirect everything into a file you store. Unfortunately this will not work on windows...

  • Hi Zaman,

    A small change to qsystemtest_p.cpp will do the trick. I've pushed this to git, it should be visible on http://qt.gitorious.org/qt-creator/qt-creator-qttest shortly. This adds the timings to the logs (as notes) instead of just sending them to stdout.

    An alternative is to not specify an output file using -o, but just to redirect stdout, eg,
    path_to_qtuitestrunner path_to_testfile.qtt -V > log.txt

    Hope this helps, please let me know how you get on (either here, or email me).


  • Hi David,
    Thats great. Alternative option works fine (&>log.txt). Im now doing the git checkout to get working with the latest one.

    Many Thanks.

  • Hi David,
    I have actually some more queries related to measuring performance related parameters.

    path_to_qtuitestrunner path_to_testfile.qtt -V &> log.txt
    is showing all the timings for each and every action and logging them to log file.

    Is there some parameter/options can be used here to get the cpu load as used during the application was running..........

    And also some options related to qtuitestrunner which does not work i.e.
    qtuitestrunner [file] [options]
    -maxtime ms

    using these two does not work or I`m using wrong syntax...

    Can you please help here solving these issues...


  • [quote author="mhzaman77" date="1291385176"]Hi David,
    I have actually some more queries related to measuring performance related parameters.

    hi zaman, can you create a new thread for the new query, the original problem is solved.
    searching in the forum later is easier this way :)

  • Hi Zaman,

    You're right, those options don't work correctly, they should be removed from the qtuitestrunner code (they are relics from the days of Qtopia performance testing).

    There is currently no way to get the application CPU usage through qtuitest, although it's obviously useful functionality - I'll add it to the "to do" list.


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.