testform import
testform [global options] import [options] <address> <remote-id>The testform import command brings existing remote resources (e.g. GitHub Issues created manually in the web browser prior to adopting Testform) under Testform management without deleting or recreating them.
Command Options
Section titled “Command Options”| Option | Default | Description |
|---|---|---|
-scope=<scope> |
testcase |
Target scope (testcase, testrun, or testplan). |
-lock=false |
true |
Disables state locking during import. |
-no-color |
false |
Disables colored console output. |
Intelligent Code Reconstruction (Smart Diffing)
Section titled “Intelligent Code Reconstruction (Smart Diffing)”When you import an existing issue:
- Testform queries the Provider API and reads the full title, body, labels, assignees, and milestone.
- It writes the binding to
testform.state. - If the scenario does NOT yet exist in your local
.featurefile, Testform will automatically reconstruct the Gherkin scenario and append it to your file! - It compares the issue against defaults in
main.ymlandBackground:to keep your code DRY.
Real Execution Example
Section titled “Real Execution Example”$ testform import -scope=testcase "auth.case.feature.@tc-5" 104
github_testcase.auth_case_feature__tc_5: Importing from ID "104"...github_testcase.auth_case_feature__tc_5: Import prepared! Prepared github_testcase for import on auth.case.feature.@tc-5github_testcase.auth_case_feature__tc_5: Refreshing state... [id=104]
Import successful!
The resources that were imported are shown above. These resources are now inyour Testform state and will henceforth be managed by Testform.After importing, run testform plan to verify that your local scenario code matches the imported state with zero drift.
Exit Codes
Section titled “Exit Codes”0: Resource successfully imported.1: Remote issue not found, or resource already managed in state.