CocoQML Reference

cocoqmlscanner

Syntax:

cocoqmlscanner [<options>] <paths>...

Options:

  • <paths>: are the space-separated paths to the files and directories that will be instrumented or restored.

    The action depends on whether the option -r is set.

    If -r is not set, the <paths> are scanned recursively and each file that ends with .qml or .js is read and instrumented. A backup copy of each file is kept; it has the suffix .qmlbak or .jsbak, respectively. If there are already backup copies, nothing is done and the program returns with an error.

    If -r is set, all the backup files are renamed back to their old names, replacing the instrumented files. If there are no backup copies, the program does nothing and returns with an error.

  • -r | --restore: Enable the restore mode.
  • -c | --csmes-name=<filename>: Save the resulting .csmes file <filename>. A suffix .csmes is appended if it does not exist already.

    Without this option, the resulting data is saved as cocoqmlscanner_result.csmes.

  • -b | --blacklist-regex=<filename> | --blacklist=<filename>: Exclude certain paths from instrumentation. The <filename> is the path to a text file which contains in each line a regular expression. If one of the regular expressions matches a file name, the file is excluded from the instrumentation.

    Lines beginning with a # are ignored.

  • -B | --blacklist-wildcard=<filename>: Exclude certain paths from instrumentation. The <filename> is the path to a text file which contains in each line a wildcard expression. If one of the wildcard expressions matches a file name, the file is excluded from the instrumentation.

    Lines beginning with a # are ignored.

  • -e | --exclude-types=<filename>: Exclude certain QML object types from instrumentation. The <filename> is the path to a text file which contains in each line a QML object type. If one of the lines matches exactly the type in a QML object declaration, the entire declaration is excluded from the instrumentation.

    By default, the TestCase type is excluded.

    Lines beginning with a # are ignored.

  • -l | --logfile=<logfile>: If this variable is set, cocoqmlscanner writes its log messages to the given logfile.
  • --exclude-literal-properties: Exclude properties containing only literals (strings, numbers, etc.) from instrumentation. This restores the default behavior in CocoQML 7.2.0 and earlier.
  • --quiet: Disables all messages generated by cocoqmlscanner. This setting overrides the verbose mode.
  • --verbose: Enables verbose mode. This setting can be overridden by the quiet mode.
  • -v | --version: Print the version number of the program and finish.
  • -h | --help: Print a help message and finish.

The tracker plugin

The tracker plugin is provided in source form because the Qt version with which it is compiled must be the same as the Qt version of the QML application.

The following variables control various debug output generated by the tracker. All log messages are prefixed with CocoQML:.

  • COCOQML_OUTPUT: Set this variable to determine the directory and/or base name of the output .csexe file. The value of COCOQML_OUTPUT must be a relative or absolute path to an existing directory, a base name or a combination of both. If only a directory is given, the .csexe file is created in the directory with the default base name. If a base name is given, the output file will be <base name>.csexe. The default base name is usually <application name>_qml.

    For example, you can set COCOQML_OUTPUT=/home/user/my_run and the tracker plugin will write the output to /home/user/my_run.csexe.

    If this variable is unset or empty, a file <application name>_qml.csexe is created in the current working directory.

  • COCOQML_QUIET: Set this variable to 1 to disable all messages generated by the plugin. Usually, all messages will be printed to standard error, but if you rely on parsing standard error in your application, you can use this to avoid interference.

    This setting overrides the verbose mode, see below.

  • COCOQML_VERBOSE: Set this variable to 1 to enable verbose mode. If the verbose mode is active, the CocoQML extension will print additional messages that might be helpful for debugging purposes. Usually, you will not need to enable verbose mode.

    This setting can be overridden by quiet mode, see above.

  • COCOQML_LOGFILE: Set this variable to write the CocoQML plugin log messages to a file. The value of COCOQML_LOGFILE must be an absolute or relative file path. A relative file path is interpreted relative to the working directory of the application when it starts. If the log file already exists, the new data is appended to it. If the path contains directories, they must already exist, otherwise no log file will be created.

    For example, under Unix, you can set COCOQML_LOGFILE=/tmp/cocoqml.log. Since the directory /tmp/ exists in any normal Unix installation and is writable, all log messages are then written to the file /tmp/cocoqml.log

Coco v7.3.0 ©2024 The Qt Company Ltd.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.