Tool Usage

  1. In the ${MX_SDK_HOME}/toolkit/TestPlugin/config/config.py file, configure the properties of the plugin to be tested. The maximum size of the config file is 100 MB.
        "factory": "mxpi_pluginname",       # Plugin type
        "plugin_name": "mxpi_pluginname0",  # Plugin name
        "props": {                          # Plugin properties
            "dataSource": "mxpi_parentName0",
            "resizeHeight": "416",
            "resizeWidth": "416"
        }
  2. In the load parameter of the ${MX_SDK_HOME}/toolkit/TestPlugin/config/config.py file, configure the data input file of the plugin. If the plugin supports multiple inputs, you can configure multiple data input files.
    The content of a data input file must be the input data of the plugin to be tested.
        "load": [                           # Input file name of the load plugin. One input file corresponds to one load plugin.
            "input/pluginname0.json"
        ]
  3. In the dump parameter of the ${MX_SDK_HOME}/toolkit/TestPlugin/config/config.py file, if the plugin supports multiple outputs, you can configure multiple data output files.
        "dump": [                           # Output file name of the dump plugin. One output file corresponds to one dump plugin.
            "pluginname0-output.json"
        ]
  4. Run the single-plugin test tool to generate the pipeline file of the plugin to be tested and perform a stream test on the plugin.

    Run the run.sh script to generate the pipeline file of the plugin to be tested in the pipeline directory, and perform the stream test on the plugin to generate the data output file configured in dump. (The final execution file is main.py.)

    chmod +x run.sh && ./run.sh