> For the complete documentation index, see [llms.txt](https://docs.fieldcommgroup.org/dd-stat-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldcommgroup.org/dd-stat-documentation/documentation/openapi.md).

# Using the Command Line Interface

You operate the automation using a command line interface (CLI) program named ddstat.exe. To use it, open a Windows terminal in the root of a submission folder. &#x20;

You may use the Windows terminal that is integrated into VSCode. To do that, from the VSCode menu at the top, select:&#x20;

`Terminal > New Terminal`&#x20;

and a new Windows command terminal will open at the bottom of the VSCode window. &#x20;

The general form of command lines are:&#x20;

`ddstat <command> <folder>`&#x20;

{% hint style="info" %}
There is no hyphen in ‘ddstat’.&#x20;
{% endhint %}

The first argument is the command, one of: &#x20;

* init &#x20;
* audit&#x20;
* run&#x20;
* report&#x20;

The actions for these commands are described in sections below.&#x20;

If the \<folder> argument is not provided, then the automation will expect to find a submission folder configuration in the current working directory.&#x20;

If the \<folder> argument is provided, then the automation will execute from that folder. &#x20;

If the named folder (or current working directory if there is none) is not a submission folder, the automation will look through all the subfolders and run the automation in each submission folder it finds. You can batch the operation in this manner. &#x20;

### ddstat  --version&#x20;

This prints the version number of the test tool to the console output.&#x20;

### ddstat  --help

This prints brief instructions for using the CLI.&#x20;

### ddstat  init \<folder>

{% hint style="warning" %}
If init command is run in a submissions folder that was created previously, that information is not overwritten.
{% endhint %}

This command creates a new submission in the \<folder> argument if supplied or in the current working directory if not.  The new folder is populated with the required folders and any initial files that can be supplied by FieldComm Group.

If the \<folder> path exists, it will not be modified.

### ddstat  audit  \<folder>&#x20;

This command examines the contents of the \<folder> argument if supplied or the current working directory if not.  It prints errors and warnings encountered to the console output.&#x20;

Additionally, it creates a file named ‘audit.log’ in the TestReports folder that contains the result of the audit using a log level of ‘info’. It documents which items in the submission folder are missing or contain invalid data and info lines with contextual information. &#x20;

Audit.log helps the test engineer to correctly assemble the required configuration, HART Test System log files, and EDD source code required to operate the audit.&#x20;

{% hint style="info" %}
The output from the console is errors and warnings only, so sometimes context is missing from that information. If you have questions about the errors or warnings, open the audit.log file which contains \[info] output, providing the context needed to understand the diagnostics.
{% endhint %}

### ddstat  run  \<folder>&#x20;

This command runs the test automation in the \<folder> argument if it is present, or the current working directory if not. It begins by running the audit command and will terminate the execution if any errors are reported during the audit.&#x20;

This command will make at least two tokenizer runs, one for tokenizer version 8 and one for version 10. For campaigns of type of DDRevision or DeviceRevision, an additional run will be made using the historical DD source code that you provided.&#x20;

The tokenizer command line will source the header and other Standard Library files appropriately based upon the  IDERevision number and the CmnPrac revision number settings that you supplied in your DeviceOptions.xml file. You can observe these in the –I and –d command line options for the tokenizer  shown in the logging output.&#x20;

The Run command creates two folders in the root of the submission folder:

* `TestReports`
* `TokenizerOutPut`

The TestReports folder contains output files from the automation run. Some of these contain intermediate data that is created by and used by automation. Other files are of direct interest to the test engineer, these are:&#x20;

* `Audit.log`, described above&#x20;
* `Console.txt`, which contains the textual output from the automation run&#x20;
* `Detail.log`, the detailed logging output from the automation&#x20;
* `Summary.html`, the summary of the pass/fail information from the testing&#x20;

This folder also contains subfolders that will retain historical information from each automation run, including the date and time of the run in the filename. These will be useful if you are making changes and trying to understand the differences that your changes make to your automated test results.&#x20;

The TokenizerOutPut folder contains the encoded files that are candidates for registration.&#x20;

The detail.log file will show all the actions required to set up the tokenizer runs, invoke the tokenizers and will also display their console output.&#x20;

For each test case, the detail.log file will contain information like the following:&#x20;

```
[INFO] - Start: TestPointTFP1211Procedure002 :: TFP1211Procedure002 : TFP1211_002 - Testcase Execution has started... 

[INFO] - Description: TFP1211_002 Verify Commands or Data references (LIST, Value Array, Reference Array or other Variable reference which was previously referenced in a command) are not deleted when comparing to the previous source code revision.   

[INFO] - N/A: TestPointTFP1211Procedure002 :: TFP1211Procedure002 : TFP1211_002 does not apply to campaign type NewDevice. 

[INFO] - End: TFP1211_002  automation  Not Applicable (Skipped)
```

The information begins by listing the TFP number of the test, followed by the text of the description from the test specification.&#x20;

Next comes information, error and warning statements produced by the test automation or a tokenizer.&#x20;

Next is an \[INFO] line giving the disposition of the test.&#x20;

Last is an \[INFO] End: statement. It lists the short name for the test case, How the test case was evaluated (automation, tokenizer, manual) and the disposition.&#x20;

<table><thead><tr><th width="216">Outcome</th><th>Meaning</th></tr></thead><tbody><tr><td>[INFO] - Pass</td><td>Meets the test specification</td></tr><tr><td>[ERROR] - Fail</td><td>Does not meet the test specification</td></tr><tr><td>[INFO] - N/A</td><td>Does not apply to this EDD</td></tr><tr><td>[WARN] - Inconclusive</td><td>The automation cannot determine the outcome. This applies to the TFPs that are determined manually. It also applies when insufficient or incorrect data is supplied.</td></tr></tbody></table>

When the run command is complete, a tab will open in a VSCode editor named console.txt. This is a capture of the console output from the automation run.&#x20;

{% hint style="info" %}
There is no progress indication during the run. Because of the tokenizer runs that are included, it can take a minute or two for this to complete. This is a known deficiency. For now, wait for the console.txt tab to open to indicate completion.
{% endhint %}

## ddstat  report  \<folder>&#x20;

This command runs the report function in the \<folder> argument if it is present, or the current working directory if not.&#x20;

It begins by locating a single test report document in the root of the submission folder, searching for files that follow the pattern:&#x20;

`TR*.docx`&#x20;

It is an error for more than one such file to exist.  This will be reported in an audit.

The report command continues by opening the document, inserting results into the summary tables and subsections for each test case. The information placed in the subsections is drawn from the detail.log file produced by the Run command.&#x20;

{% hint style="warning" %}
If you have the test report file open in Word while running the report command, the report command will not be able to update the report document and will terminate with an error.&#x20;
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldcommgroup.org/dd-stat-documentation/documentation/openapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
